Self function

Paul Rubin http
Tue May 5 03:22:48 EDT 2009

bearophileHUGS at writes:
> This happens to me more than one time every year.
> So I have written this:
> ...
>         self_name = getframeinfo(currentframe()).function

ZOMG, you've got to be kidding.  I'd expect Pylint to catch that sort
of error statically.  If not, the best approach is probably to extend
Pylint to handle those cases.  The frame crawling stuff just comes
across as madness to me.

More information about the Python-list mailing list