0

I have a module to which additional functions are programmatically getting written to.
I.e.:

def fun1():   # function written on 27.02.13
    ...

def fun2():   # function written on 28.02.13
    ...

I would like to add docstrings to the module itself and these functions during runtime without modifying the file.

Is this possible to do via another script?

MattSchmatt
  • 850
  • 8
  • 18

1 Answers1

2

You can, just add a __doc__ attribute to the module:

import foo

foo.__doc__ = '''My docstring for this module'''
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343