[Python-ideas] descriptors outside of classes
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Mar 30 23:13:00 CEST 2011
Eric Snow wrote:
> I was just thinking along those same lines. Sounds like twisted already
> does it. Does it amount to using a custom __import__?
I don't know what Twisted does, but I was thinking of
an attribute called __moduleclass__ that works a bit
like the old __metaclass__ attribute.
Then you could do
class __moduleclass__:
... descriptor definitions go here ...
--
Greg
More information about the Python-ideas
mailing list