Remove various sys.version_info >= 3 checks

This commit is contained in:
Chris Hennes
2022-11-07 21:52:24 -06:00
committed by Uwe
parent d02bb1b7ea
commit fa8e0a6865
3 changed files with 3 additions and 11 deletions

View File

@@ -155,13 +155,7 @@ Py::Object Vector2dPy::getattro(const Py::String &name_)
//
std::string name( name_.as_std_string( "utf-8" ) );
if (name == "__members__") { // Py2
Py::List attr;
attr.append(Py::String("x"));
attr.append(Py::String("y"));
return attr;
}
else if (name == "__dict__") { // Py3
if (name == "__dict__") {
Py::Dict attr;
attr.setItem(Py::String("x"), Py::Float(v.x));
attr.setItem(Py::String("y"), Py::Float(v.y));