Get parent function

Posted by Morgoth on Stack Overflow See other posts from Stack Overflow or by Morgoth
Published on 2010-03-27T15:41:43Z Indexed on 2010/03/27 15:43 UTC
Read the original article Hit count: 188

Filed under:

Is there a way to find what function called the current function? So for example:

def first():
    second()

def second():
    # print out here what function called this one

Any ideas?

© Stack Overflow or respective owner

Related posts about python