Re: Name of function caller

2007-05-15 Thread James Stroud
HMS Surprise wrote: > Is there a way that a function may access the doc string or func_name > of the caller? > > Thanks, > > jvh > Add a parameter to the function to avoid mutilating your code with implementation specific inspection: def fun(caller, *original_parameters): do_something_to_c

Re: Name of function caller

2007-05-15 Thread John Machin
On May 16, 8:56 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > On May 15, 5:13 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > On May 15, 4:59 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > > Is there a way that a function may access the doc string or func_name > > > of the caller? > > > > Than

Re: Name of function caller

2007-05-15 Thread HMS Surprise
On May 15, 5:13 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On May 15, 4:59 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > Is there a way that a function may access the doc string or func_name > > of the caller? > > > Thanks, > > > jvh > > Yes. The inspect module allows you to look up the cal

Re: Name of function caller

2007-05-15 Thread Paul McGuire
On May 15, 4:59 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Is there a way that a function may access the doc string or func_name > of the caller? > > Thanks, > > jvh Yes. The inspect module allows you to look up the call stack for information on the caller, the caller's caller, local vars, etc

Name of function caller

2007-05-15 Thread HMS Surprise
Is there a way that a function may access the doc string or func_name of the caller? Thanks, jvh -- http://mail.python.org/mailman/listinfo/python-list