How do I print documentation strings within classes
For functions i can do this:
def func():
"""
doc string
"""
print func.__doc__
Is it possible to do the same thing with a class
class MyClass(object):
def __init__(self):
"""
doc string
"""
i = MyClass()
print i.__doc__
This doesn't work. It only prints out None.
Am writing a text game and I want to use the doc string as an instruction to the player without using the print command
Thanks