Why Use str on a doc string? : Str : Buildin Function PYTHON examples


PYTHON examples » Buildin Function » Str »

 

Why Use str on a doc string?


Why Use str on a doc string?



def foo(): print 

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.

           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Buildin Function
» Str