module with __call__ defined is not callable?
Kent Johnson
kent at kentsjohnson.com
Thu Feb 9 06:13:50 EST 2006
Antoon Pardon wrote:
> This make me wonder. Would it be possible to do something with
> metaclasses so that after
>
> class SomeClass(MetaClass):
> ...
>
> SomeClass() will be equivalent to MetaClass.__call__(SomeClass)
I think that's already what happens. IIUC type.__call__ implements the
standard class creation calling __new__ and __init__.
Kent
More information about the Python-list
mailing list