overriding __call__ in metaclasses

Ben Wolfson wolfson at midway.uchicago.edu
Mon Aug 26 21:38:29 EDT 2002


When overriding __call__ in metaclasses, is there a preferred way to go
about getting the actual instance?  The only example I can find in a
not-very-thorough search is in test_descr.py, which just uses a dummy
class:

    class _instance(object):
        pass

Is that acceptable in general?

-- 
BTR
You're going to set me up as a kind of slovenly attached pig that
Jack Kornfeld can slice down in his violent zen compassion?
 -- Larry Block



More information about the Python-list mailing list