Re: python bug when subclassing list?

2008-11-11 Thread Ethan Furman
Hamish McKenzie wrote: I want to write a Vector class and it makes the most sense to just subclass list. I also want to be able to instantiate a vector using either: Vector( 1, 2, 3 ) OR Vector( [1, 2, 3] ) so I have this: class Vector(list): def __new__( cls, *a ): try:

Re: python bug when subclassing list?

2008-11-11 Thread Steve Holden
Hamish McKenzie wrote: I want to write a Vector class and it makes the most sense to just subclass list. I also want to be able to instantiate a vector using either: Vector( 1, 2, 3 ) OR Vector( [1, 2, 3] ) so I have this: class Vector(list): def

python bug when subclassing list?

2008-11-06 Thread Hamish McKenzie
I want to write a Vector class and it makes the most sense to just subclass list. I also want to be able to instantiate a vector using either: Vector( 1, 2, 3 ) OR Vector( [1, 2, 3] ) so I have this: class Vector(list): def __new__( cls, *a ): try:

python bug when subclassing list?

2008-11-06 Thread Hamish McKenzie
I want to write a Vector class and it makes the most sense to just subclass list. I also want to be able to instantiate a vector using either: Vector( 1, 2, 3 ) OR Vector( [1, 2, 3] ) so I have this: class Vector(list): def __new__( cls, *a ): try: print a

Re: python bug when subclassing list?

2008-11-06 Thread Arnaud Delobelle
Hamish McKenzie [EMAIL PROTECTED] writes: I want to write a Vector class and it makes the most sense to just subclass list. I also want to be able to instantiate a vector using either: Vector( 1, 2, 3 ) OR Vector( [1, 2, 3] ) so I have this: class Vector(list): def __new__(