Understanding and working with __metaclass__

David M. Wilson dw-google.com at botanicus.net
Mon Dec 8 14:50:00 EST 2003


Hi there,

I've been sitting on the __metaclass__ feature for about 2 weeks now,
and haven't really got that far with it. It looks like a very powerful
tool, and I think I have even already identified places in my code
where I could use it quite effectively, but I can't quite tell what it
is /meant/ to be used for, or indeed what it is popularly used for.

Is there a page, posting, or other place I can turn to to get a
developer's run-down on the practical uses of __metaclass__? The
Python documentation states very clearly what it does, but I fear that
journeying off on my own with it will lead to some terrible habit
formation, and I already have enough of those to deal with. :)   (:set
ts=3 ;)

Thanks for your time,


David.




More information about the Python-list mailing list