Re: [Python-checkins] CVS: python/dist/src/Lib urllib.py,1.107,1.108

"Martin v. Löwis" wrote:
You should make this: 'ascii' -- encoding names are lower case per convention (and the implementation has a short-cut to speed up conversion to 'ascii' -- not for 'ASCII').
+ except UnicodeError: + raise UnicodeError("URL "+repr(url)+" contains non-ASCII characters")
Would it be better to use a simple ValueError here ? (UnicodeError is a subclass of ValueError, but the error doesn't really have something to do with Unicode conversions...)
+ return url
def unwrap(url):
-- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
participants (1)
-
M.-A. Lemburg