Examples of descriptors?

Raymond Hettinger vze4rx4y at verizon.net
Sun Jun 1 09:41:47 EDT 2003


"Edward C. Jones"
> What, exactly, is a "descriptor"? The closest thing to a definition that
> I can find is: a class that defines __get__, __set__, and __delete__.
> Where can I find some examples?

Here is a draft write-up on descriptors:
    http://tinyurl.com/d63d

Parts to be added:
* data descriptors
* more detail behind object.__getattribute__

Comments are welcome.


Raymond Hettinger








More information about the Python-list mailing list