返回顶部

收藏

Why Use str on a doc string?

更多
def foo(): print 2 

foo() 

print foo.__doc__  
foo.__doc__ == None

print str(foo.__doc__)

# The str function takes the null value and returns a string representation of it, 

#can use either == None or is None, but is None is faster.

标签:Python,Buildin,Function

收藏

0人收藏

支持

0

反对

0

发表评论