urllib "quote" problem

MRAB python at mrabarnett.plus.com
Fri Aug 20 21:13:52 CEST 2010


John Nagle wrote:
> On 8/20/2010 8:41 AM, Aahz wrote:
>> In article<4c5eef7f$0$1609$742ec2ed at news.sonic.net>,
>> John Nagle<nagle at animats.com>  wrote:
>>>
>>>      This looks like code that will do the wrong thing in
>>> Python 2.6 for characters in the range 128-255.  Those are
>>> illegal in type "str", but this code is constructing such
>>> values with "chr".
>>
>> WDYM "illegal"?
> 
>   Type "str" in Python 2.6 is ASCII, 0..127.
> 
Actually 'str' in Python 2.6 is bytestring, or ASCII + other characters,
by which I mean that the other characters aren't affected by .lower,
etc.



More information about the Python-list mailing list