q987654 发表于 2017-4-21 10:55:41

python -- docstring

  


def PrintMax(x, y):
'''Prints the maximum of two numbers.
The two balues must bu integers.''';
x = int(x);
y = int(y);
if x > y :
print x, 'is muaximum';
else:
print y, 'is maximum';
PrintMax(1, 3);
print PrintMax.__doc__

 
页: [1]
查看完整版本: python -- docstring