On Wed, May 13, 2015 at 8:45 AM, andrew cooke <and...@acooke.org> wrote: >>>> 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.
You're not returning anything from Foo.__new__, so the result of the constructor is None. None.__init__ does nothing. -- https://mail.python.org/mailman/listinfo/python-list