[Python-ideas] descriptors outside of classes

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Mar 30 00:16:33 CEST 2011


Eric Snow wrote:
> Here's another outlandish idea.  How about if descriptors could be used 
> outside of classes.  I.e. any global or local variable could be assigned 
> a descriptor object and the descriptor protocol would be respected for 
> that variable.

There's a major problem with that: if *every* variable behaves
that way, then how do you pass around and manipulate descriptor
objects themselves?

-- 
Greg



More information about the Python-ideas mailing list