[Python-Dev] Re: CVS: python/dist/src/Lib urllib.py,1.107,1.108
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Sun, 3 Dec 2000 23:07:17 +0100
> 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').
With conventions, it is a difficult story. I'm pretty certain that
users typically see that particular american standard as ASCII (to the
extend of calling it "a s c two"), not ascii.
As for speed - feel free to change the code if you think it matters.
> + 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...)
Why does it not have to do with Unicode conversion? A conversion from
Unicode to ASCII was attempted, and failed.
I guess I would be more open to suggested changes if you had put them
into the patch manager at the time you've reviewed the patch...
Regards,
Martin