getting the current function

Gary Robinson garyrob at mac.com
Fri Sep 7 12:19:47 EDT 2007


> This all seems a bit too complicated. Are you sure you want to do
> this? Maybe you need to step back and rethink your problem.

In version 2.1 Python added the ability to add function attributes -- see http://www.python.org/dev/peps/pep-0232/ for the justifications. A counter probably isn't one of them, I just used that as a quick example of using thisfunc(). 

I've just never liked the fact that you have to name the function when accessing those attributes from within the function. And I thought there might be other uses for something like thisfunc().

-- 

Gary Robinson
CTO
Emergent Music, LLC
garyrob at mac.com
207-942-3463
Company: http://www.goombah.com
Blog:    http://www.garyrobinson.net



More information about the Python-list mailing list