Python学习笔记(四)DocStrings
#!/usr/bin/python# Filename: func_doc.pydef printMax(x, y): '''Prints the maximum of two numbers. The two values must be integers.''' x = int(x) # convert to integers, if possible y = int(y) if x > y: print x, 'is maximum' else: print y, 'is maximum'printMax(3, 5)print [b]printMax.__doc__[/b]