Re: urllib "quote" problem

2010-08-20 Thread MRAB
John Nagle wrote: On 8/20/2010 8:41 AM, Aahz wrote: In article<4c5eef7f$0$1609$742ec...@news.sonic.net>, John Nagle 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

Re: urllib "quote" problem

2010-08-20 Thread Robert Kern
On 8/20/10 1:50 PM, John Nagle wrote: On 8/20/2010 8:41 AM, Aahz wrote: In article<4c5eef7f$0$1609$742ec...@news.sonic.net>, John Nagle 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

Re: urllib "quote" problem

2010-08-20 Thread John Nagle
On 8/20/2010 8:41 AM, Aahz wrote: In article<4c5eef7f$0$1609$742ec...@news.sonic.net>, John Nagle 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 "c

Re: urllib "quote" problem

2010-08-20 Thread Aahz
In article <4c5eef7f$0$1609$742ec...@news.sonic.net>, John Nagle 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"? -- Aahz

urllib "quote" problem

2010-08-08 Thread John Nagle
This warning appeared from urllib.quote: "/usr/local/lib/python2.6/urllib.py:1222: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal res = map(safe_map.__getitem__, s) " Here's urllib.quote from Python 2.6: def quo