Why Use str on a doc string? : Doc String : Development PYTHON examples


PYTHON examples » Development » Doc String »

 

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.

           
         
  



Leave a Comment / Note


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


PYTHON examples

 Navioo Development
» Doc String