Why does __init__ not get called?

Steven Bethard steven.bethard at gmail.com
Fri Aug 12 01:52:07 CEST 2005


Steven Bethard wrote:
> def __call__(cls, *args, **kwargs):
>     obj = cls.__new__()
>     if not isinstance(obj.__class__, cls):
              ^^^^^^^^^^
              issubclass

>         return obj
>     obj.__class__.__init__(obj, *args, **kwargs)
>     return obj

STeVe



More information about the Python-list mailing list