Function docstring as a local variable

Tim Johnson tim at johnsons-web.com
Sun Jul 10 19:41:21 CEST 2011


Consider the following:
## code
def test():
    """This is my docstring"""
    print(??)  ## can I print the docstring above?
## /code
It possible for a function to print it's own docstring?

thanks
(pointers to docs could be sufficient)
-- 
Tim 
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com



More information about the Python-list mailing list