[issue4631] urlopen returns extra, spurious bytes

Antoine Pitrou report at bugs.python.org
Sun Feb 8 16:59:01 CET 2009

Antoine Pitrou <pitrou at free.fr> added the comment:

On the principle, the test looks good.
If you want to avoid the 'if "%" in value' hack, you can use the
named-parameter form of string formatting:

>>> "localhost:%(port)s" % dict(port=8080)
>>> "localhost" % dict(port=8080)

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list