摘要: 1 callable内建函数判断一个名字是否为一个可调用函数>>> import math>>> x = 1>>> y = math.sqrt>>> callable(x)False>>> callable(y)True2 记录函数(文档字符串)>>> def square(x): 'calculates the square of number x' return x * x>>> square.func_doc'calculates the 阅读全文
posted @ 2011-11-08 10:45 jinmengzhe 阅读(683) 评论(0) 推荐(1) 编辑