Subclassing array

bruno at modulix onurb at xiludom.gro
Fri May 5 06:54:59 EDT 2006


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 parameters, raising an
> exception.
> 
> That's why I have to use this *arg **kw syntax in order to allow my
> subclasses having any arguments without causing troubles. Am I right ?
> 

To put it short : yes !-)

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list