[Python-Dev] possible use of __decorates__ in functools.decorator

Luis P Caamano lcaamano at gmail.com
Wed May 10 03:30:06 CEST 2006


Turns out I didn't need to use the __decorates__ attribute to get the
name of the class.  I posted on clp (what I should've done in the
first place) and got an answer back pretty quickly.  After a duh!,
hitting my forehead and a couple "of couse" comments, it was as simple
as saving the original caller via a sys._getframe(2) call in the
decorator factory.

Sorry for the noise.

--
Luis P Caamano
Atlanta, GA USA


More information about the Python-Dev mailing list