A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-August/068025.html below:

[Python-Dev] unicode hell/mixing str and unicode as dictionary keys

[Python-Dev] unicode hell/mixing str and unicode as dictionary keys [Python-Dev] unicode hell/mixing str and unicode as dictionary keysMichael Foord fuzzyman at voidspace.org.uk
Mon Aug 7 19:07:29 CEST 2006
David Hopwood wrote:[snip..]
>
>   
>>> we should, of course, continue to use the one we always used (for
>>> "ascii", there is no difference between the two).
>>>       
>> +1
>>
>> This seems the most (only ?) logical solution.
>>     
>
> No; always considering Unicode and non-ASCII byte strings to be distinct
> is just as logical.
>   
Except there has been an implicit promise in Python for years now that 
ascii byte-strings will compare equally to the unicode equivalent: lots 
of code assumes this. Breaking this is fine in principle - but for Py3K 
not Py 2.x.

That means Martin's solution is the best for the current problem. (IMHO 
of course...)

Michael
http://www.voidspace.org.uk/python/index.shtml


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4