> But then nothing will be passed to __init__ on the subclass.
> 
> Andrew

>>> class Foo:
...     def __new__(cls, *args, **kargs):
...         print('new', args, kargs)
...         super().__new__(cls)
... 
>>> class Bar(Foo):
...     def __init__(self, a):
...         print('init', a)
... 
>>> Bar(1)
new (1,) {}

no "init" is printed.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to