[Python-Dev] Re: python/dist/src/Lib DocXMLRPCServer.py, 1.4, 1.5 cookielib.py, 1.6, 1.7 copy.py, 1.43, 1.44 optparse.py, 1.12, 1.13 pickle.py, 1.160, 1.161 subprocess.py, 1.13, 1.14 unittest.py, 1.37, 1.38 xmlrpclib.py, 1.36, 1.37

Fredrik Lundh fredrik at pythonware.com
Mon Feb 7 17:52:55 CET 2005


> Reduce the usage of the types module.

> Index: xmlrpclib.py
> ===================================================================
> RCS file: /cvsroot/python/python/dist/src/Lib/xmlrpclib.py,v

    # Notes:
    # this version is designed to work with Python 2.1 or newer.

> -    dispatch[IntType] = dump_int
> +    dispatch[int] = dump_int

$ python2.1
>>> type(0) == int
0
>>> type([]) == list
0
>>> type({}) == dict
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'dict' is not defined

</F> 





More information about the Python-Dev mailing list