From 13e89463e3cfe2a349307ee09217c17fa7274bad Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 1 Jul 2008 19:56:00 +0000 Subject: Fix a few urllib bugs (NameErrors). Also directly import names from the various urllib submodules, saves attribute lookup and is much cleaner. --- Lib/urllib/parse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/urllib/parse.py') diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index 71cc36908d..8edc9635d3 100644 --- a/Lib/urllib/parse.py +++ b/Lib/urllib/parse.py @@ -416,11 +416,11 @@ def urlencode(query,doseq=0): # urllib.parse.unquote('abc%20def') -> 'abc def' # quote('abc def') -> 'abc%20def') -def toBytes(url): - """toBytes(u"URL") --> 'URL'.""" +def to_bytes(url): + """to_bytes(u"URL") --> 'URL'.""" # Most URL schemes require ASCII. If that changes, the conversion # can be relaxed. - # XXX get rid of toBytes() + # XXX get rid of to_bytes() if isinstance(url, str): try: url = url.encode("ASCII").decode() -- cgit v1.2.1