"Phillip J. Eby" <[EMAIL PROTECTED]> 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com