can't instantiate following inner class

Gian Mario Tagliaretti g.tagliaretti at gmail.com
Thu Dec 28 06:46:27 EST 2006


Gabriel Genellina wrote:

>  >>> class One(object): pass
> ...
>  >>> a = One(1,2)
> Traceback (most recent call last):
>    File "<stdin>", line 1, in ?
> TypeError: default __new__ takes no parameters
> 
> How do you make Python silently ignore the arguments?

sorry, my bad, that beauvoir was python 2.2 it was fixed in python 2.3 (I
didn't know since I always override __init__) and it will raise a TyoeError
as you have pointed out.

cheers
-- 
Gian Mario Tagliaretti



More information about the Python-list mailing list