D
David
Inside a function I need to get the function's caller's name. How can I get
it?
thanks in advance.
David
it?
thanks in advance.
David
David said:Inside a function I need to get the function's caller's name. How can I get
it?
thanks in advance.
David said:Inside a function I need to get the function's caller's name. How can I get
it?
I am writing a big (for me) program and it would be helpful to have a dummyWhat do you need this name for, just as a materr of interest? There are
ways of manipulating the stack frames, but they'll be slow and possibly
unreliable.
Check out the thread "__LINE__ and __FILE__ functionality in Python?"
(messages posted 2006-0813).
David said:Il Wed, 13 Sep 2006 07:34:45 +0100, Steve Holden ha scritto:
I am writing a big (for me) program and it would be helpful to have a dummy
function like this:
def function_A_subfunction_B(self, ....)
dummy()
that display a standard message like this:
"Dummy: 'function_A_subfunction_B' in module 'module' is not defined yet"
regards
David
One way would be to have dummy() raise an exception, which it catches.David said:Il Wed, 13 Sep 2006 07:34:45 +0100, Steve Holden ha scritto:
I am writing a big (for me) program and it would be helpful to have a dummy
function like this:
def function_A_subfunction_B(self, ....)
dummy()
that display a standard message like this:
"Dummy: 'function_A_subfunction_B' in module 'module' is not defined yet"
David said:I am writing a big (for me) program and it would be helpful to have a dummy
function like this:
def function_A_subfunction_B(self, ....)
dummy()
that display a standard message like this:
"Dummy: 'function_A_subfunction_B' in module 'module' is not defined yet"
David said:Il 13 Sep 2006 00:31:47 -0700, John Machin ha scritto:
I'll check thankyou!
Traffic in this NG is so high that is difficult to stay uptodate.
in Python.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.