[Python-Dev] unicode hell/mixing str and unicode as dictionary keys (original) (raw)

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Tue Aug 8 18:42:14 CEST 2006


Martin v. Löwis wrote:

David Hopwood schrieb:

Michael Foord wrote:

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. I think you must have misread my comment: Indeed. The misunderstanding originates from your sentence starting with "no", when, in fact, you seem to be supporting the proposal I made.

I had misunderstood what the existing Python behaviour is. I now think the current behaviour (which uses "B.decode(system_encoding) == U") is definitely a bad idea, especially in cases where the system encoding is not US-ASCII, but I agree that it can't be changed for 2.5.

-- David Hopwood <david.nospam.hopwood at blueyonder.co.uk>



More information about the Python-Dev mailing list