[Python-Dev] RFC: readproperty
Michael Hudson
mwh at python.net
Wed Sep 28 17:06:54 CEST 2005
"Phillip J. Eby" <pje at telecommunity.com> writes:
> Unfortunately, finding out a descriptor's name is non-trivial; it'd be nice
> if there were a descriptor hook __bind__(cls,name) that was called by
> classes during cls.__new__ or assignment to a class attribute, and which
> you could define to return a replacement descriptor. It seems like one of
> the first metaclasses I end up writing in any new project is something to
> do this, and I believe Ian Bicking has encountered the same thing in e.g.
> SQLObject.
I've done this many times too, but I've never really felt the need to
propose a change to Python for it. I guess one could modify the
descriptor protocol slightly, but is it worth it? Hmm, dunno.
Cheers,
mwh
--
First time I've gotten a programming job that required a drug
test. I was worried they were going to say "you don't have
enough LSD in your system to do Unix programming". -- Paul Tomblin
-- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html
More information about the Python-Dev
mailing list