Name of function within the function?
Dula, Debbie (EXCHANGE:RICH2:2C25)
violet at americasm01.nt.com
Thu Jul 1 11:41:35 EDT 1999
More information about the Python-list mailing list
Thu Jul 1 11:41:35 EDT 1999
- Previous message (by thread): Name of function within the function?
- Next message (by thread): Name of function within the function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've looked and looked, but can't find the answer to this ... I'm sure it's right in front of me ... I want the current function's name to be output in my error messages, but can't figure out how a function can get its own name (without already knowing it). For example, def f1(): print "Error in function", f1.__name__ is not really useful for what I need as I might as well print "Error in function f1". Is there any generic way I can get the current function's name? Thanks, Debbie
- Previous message (by thread): Name of function within the function?
- Next message (by thread): Name of function within the function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list