[Python-Dev] RE: Hot-To Guide for Descriptors (original) (raw)
Raymond Hettinger python at rcn.com
Thu Jan 22 13:27:28 EST 2004
- Previous message: [Python-Dev] RE: Hot-To Guide for Descriptors - Nits! :-)
- Next message: [Python-Dev] RE: Hot-To Guide for Descriptors - Nits! :-)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I think all of the topics are best understood in terms of three groups: > classic classes, new-style classes, and roll your own classes. Lumping > the latter two together won't help one bit.
[Aahz]
While that's technically true, most of the idiomatic uses of metaclasses that I've seen do result in the creation of "normal" new-style classes. We don't want to obscure that, either, IMO.
Okay, I've added a paragraph to the descriptor guide:
""" The details above show that the mechanism for descriptors is embedded in the getattribute() methods for object, type, and super. Classes inherit this machinery when they derive from object or if they have a meta-class providing similar functionality. Likewise, classes can turn-off descriptor invocation by overriding getattribute(). """
Raymond Hettinger
- Previous message: [Python-Dev] RE: Hot-To Guide for Descriptors - Nits! :-)
- Next message: [Python-Dev] RE: Hot-To Guide for Descriptors - Nits! :-)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]