Python documentation available as ZIP files

Charles G Waldman cgw at fnal.gov
Fri Jul 23 17:31:25 EDT 1999


Les Schaffer writes:

 > class IMHO  ( $0.02 ):
 >   
 >     """of course, one can ENCOURAGE "common enough" by supplying bzip2
 >     for something popular like documentation and watch your community
 >     GROW acceptance of the new compression standard"""
 > 
 >     smile = "  :-)  "
 > 
 >     def __init__(self, agree_wth_me):
 > 
 >        if agree_with_me == YEP:
 >           os.system('tar cvf dem_docs dem_docs.tar.bz2 --use_compress-program=bzip2')
 > 
 > 	print self.__doc__
 > 
 > 	print smile
 > 
 >         print   "Les Schaffer godzilla at netmeg.net"
 > 
 > 	raise " WARNING: it must be friday afternoon!!!  "
 > 

I agree with you.  But shouldn't that be "print self.smile" ?  I got a 
NameError when I tried to run your code  ;-)

But seriously, this is a mistake I've seen a lot of people make with
class variables,  just want to make sure we don't spread around any
misconceptions.





More information about the Python-list mailing list