Re: Subclassing array

2006-05-05 Thread bruno at modulix
TG wrote: > That's great, thanks ! > > To put it short, when I create a Stimulus object, it first seek > __new__() method. But if I don't define it, it looks for the one > defined in Vector. This raises a problem because the parameters passed > to Stimulus(params) aren't fitting with Vector parame

Re: Subclassing array

2006-05-05 Thread TG
That's great, thanks ! To put it short, when I create a Stimulus object, it first seek __new__() method. But if I don't define it, it looks for the one defined in Vector. This raises a problem because the parameters passed to Stimulus(params) aren't fitting with Vector parameters, raising an excep

Re: Subclassing array

2006-05-04 Thread Bruno Desthuilliers
Sion Arrowsmith a écrit : > Alex Martelli <[EMAIL PROTECTED]> wrote: > >>TG <[EMAIL PROTECTED]> wrote: >> >>>When I call Vector.__init__() in Stimulus, doesn't it also call __new__ >>>? I don't understand the detail of callings to __new__ and __init__ in >>>python inheritance ... >> >>Calling a (n

Re: Subclassing array

2006-05-04 Thread Sion Arrowsmith
Alex Martelli <[EMAIL PROTECTED]> wrote: >TG <[EMAIL PROTECTED]> wrote: >> When I call Vector.__init__() in Stimulus, doesn't it also call __new__ >> ? I don't understand the detail of callings to __new__ and __init__ in >> python inheritance ... >Calling a (new-style) class does __new__ first, THE

Re: Subclassing array

2006-05-04 Thread Alex Martelli
TG <[EMAIL PROTECTED]> wrote: ... > When I call Vector.__init__() in Stimulus, doesn't it also call __new__ > ? I don't understand the detail of callings to __new__ and __init__ in > python inheritance ... Calling a (new-style) class does __new__ first, THEN calls the class's __init__ on the re