这真是一个好东西,很喜欢。php里面没有。Python把
每一样东西 都作为对象,包括这个函数
- def 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 printMax.__doc__