Hello
If I have the Vector class below, is there a means by which I can have
the following behaviour
A = Vector(1, 2)
print A
(1, 2)
A = 0
print A
(0, 0)
If there is such a means, will it still work with the __slots__
attribution uncommented?
Thanks
class Vector(object):
#__slots__ =
Gerard Flanagan wrote:
Hello
If I have the Vector class below, is there a means by which I can have
the following behaviour
A = Vector(1, 2)
print A
(1, 2)
A = 0
print A
(0, 0)
If there is such a means, will it still work with the __slots__
attribution uncommented?
No, you
On 19 Nov 2005 05:29:07 -0800
Gerard Flanagan [EMAIL PROTECTED] wrote:
If I have the Vector class below, is there a means by
which I can have the following behaviour
A = Vector(1, 2)
print A
(1, 2)
A = 0
print A
(0, 0)
As has already been mentioned, A = 0 rebinds the name A
to the