How can I get the function's caller?

Fredrik Lundh fredrik at pythonware.com
Thu Sep 14 07:37:24 EDT 2006


"David" wrote:

> 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"

that's spelled

    def function_A_subfunction_B(self, ....)
        raise NotImplementedError

in Python.

</F> 






More information about the Python-list mailing list