New submission from Michiel Holtkamp:

The standard module cgi.py from Python 2.x imports urllib, but urllib is not 
used. This causes a little bit of extra memory usage and a small increase in 
load time. It's not much, but it was enough for me to notice when I was 
profiling my program.

I think the urllib import can be safely removed in 2.6 and 2.7. I've tested 
without the import and it works as expected in my case.

In Python 3.2 (other 3.x versions not checked), urllib.parse is imported but 
here it is actually used, so no problem there.

PS. first time submitting a bug here, so if I'm doing something wrong, please 
be gentle :)

----------
components: Library (Lib)
messages: 178055
nosy: mjholtkamp
priority: normal
severity: normal
status: open
title: Superfluous import in cgi module
type: performance
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16765>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to