You must make your class a Vector2Dsubclass object, otherwise many of them will not work properly. What will not work includes __new__and super.
This should work fine:
class Vector2D(object):
def __new__(cls, *args, **kw):
print "Testing new"
return super(Vector2D,cls).__new__(cls)
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return "X:" + str(self.x) + ",Y:" + str(self.y)
, , , __new__ __init__, __new__, (object) __new__, .