Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
In your solution to vector you use
Vector:You also hardcode
Vectorin__add__.Above it, though, in
__getitem__you get the class by usingclass(self). This seems inconsistent, and probably incorrect. If you were to subclassVector, for instance, it would break when negating an instance of the subclass.