Mega Code Archive

 
Categories / Python Tutorial / Function
 

Function Attributes

def foo():     'foo() -- properly created doc string' def bar():     pass bar.__doc__ = 'Oops, forgot the doc str above' bar.version = 0.1 help(foo) foo() print bar.version print foo.__doc__ print bar.__doc__