How can I get the function's caller?

Fredrik Lundh fredrik at
Thu Sep 14 13:37:24 CEST 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.


More information about the Python-list mailing list