[Python-3000] bytes and dicts (was: PEP 3137: Immutable Bytes and Mutable Buffer) (original) (raw)
Adam Hupp adam at hupp.org
Fri Sep 28 20:34:36 CEST 2007
- Previous message: [Python-3000] bytes and dicts (was: PEP 3137: Immutable Bytes and Mutable Buffer)
- Next message: [Python-3000] bytes and dicts (was: PEP 3137: Immutable Bytes and Mutable Buffer)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/28/07, Guido van Rossum <guido at python.org> wrote:
Well, maybe this is a good enough argument to give up. If the best we can say is that having a bytes and a str as keys may cause a TypeError on lookups, I'm not sure it is worth it to try to raise the probability that it'll actually be raised...
Would it make sense to have dict ignore TypeError on lookups? Alternatively, the byte/str comparison could throw a specific subclass of TypeError that dict ignored e.g. IncompatibleComparisonError.
-- Adam Hupp | http://hupp.org/adam/
- Previous message: [Python-3000] bytes and dicts (was: PEP 3137: Immutable Bytes and Mutable Buffer)
- Next message: [Python-3000] bytes and dicts (was: PEP 3137: Immutable Bytes and Mutable Buffer)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]