Finding defining class in a decorator

lcaamano lcaamano at gmail.com
Tue May 9 14:20:17 EDT 2006


Nice.  I had to call _getframe(2) to account for the wrapper but the
idea seems to work OK, that is, save the name of the decorator's
original caller at definition time while creating the wrapper function.
 Much better than doing that at runtime.

Thanks

--
Luis P Caamano
Atlanta, GA USA




More information about the Python-list mailing list