3

Consider this function call

def f1():
    doc = 'how can I get the doc string of whoever calling me?'

def f2():
    '''Docstring'''
    f1()
    

f1 and f2 can be in different modules.

Is there any way f1() knows the doc string of whoever calling it? f2() in above example.

Allan Xu
  • 7,998
  • 11
  • 51
  • 122

0 Answers0