How can a function find the function that called it?

Daniel Urban urban.dani at gmail.com
Fri Dec 24 13:26:06 EST 2010


On Fri, Dec 24, 2010 at 17:24, kj <no.email at please.post> wrote:
> (BTW, I don't understand why inspect doesn't provide something as
> basic as the *class* that the method belongs to, whenever applicable.
> I imagine there's a good reason for this coyness, but I can't figure
> it out.)

One function object can "belong to" (be in the namespace of) more than
one class, so there is no "the class".



More information about the Python-list mailing list