>>> def foo(): ... """my text""" ... print foo.__doc__ ... >>> foo() my text