[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.96,1.97

Moshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Tue, 11 Jul 2000 07:36:11 +0300 (IDT)


On Mon, 10 Jul 2000, Eric S. Raymond wrote:

> Update of /cvsroot/python/python/dist/src/Lib
> In directory slayer.i.sourceforge.net:/tmp/cvs-serv11503/dist/src/Lib
> 
> Modified Files:
> 	urllib.py 
> Log Message:
> Moves some test code into the scope of if __name__ == '__main__', where it
> won't get loaded when we're using the classes in this module.

Why? It's only parsed once (under usual conditions) per installation, it's
cost in memory is not so high, and it's cool to be able to test via

'''
import urllib
urllib.main()
'''
--
Moshe Zadka <moshez@math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez