summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/parse.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-07-01 19:56:00 (GMT)
committerGeorg Brandl <georg@python.org>2008-07-01 19:56:00 (GMT)
commit13e89463e3cfe2a349307ee09217c17fa7274bad (patch)
treea4c5721842f9bbfd9a8a5681a44a56a5409f1aba /Lib/urllib/parse.py
parent1abcbf8e193019b16f5a7e71c176667fb679baab (diff)
downloadcpython-13e89463e3cfe2a349307ee09217c17fa7274bad.zip
cpython-13e89463e3cfe2a349307ee09217c17fa7274bad.tar.gz
cpython-13e89463e3cfe2a349307ee09217c17fa7274bad.tar.bz2
Fix a few urllib bugs (NameErrors).
Also directly import names from the various urllib submodules, saves attribute lookup and is much cleaner.
Diffstat (limited to 'Lib/urllib/parse.py')
-rw-r--r--Lib/urllib/parse.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index 71cc369..8edc963 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()