3 ms·
Doesn't always blow up. Notably b"key" and "key" are now distinct dictionary keys, and both can coexist in the same dict. Is the absence of an optional key a fa
by tedunangst 7y ago
Doesn't always blow up. Notably b"key" and "key" are now distinct dictionary keys, and both can coexist in the same dict. Is the absence of an optional key a fatal error? No, the program runs, and just does the wrong thing, or fails to copy the right value to the next stage, or whatever. Fun to debug.
- takeda 7y agoTo get b'key' and 'key' in a dictionary in python 3 you really need to try hard. The only reasonable scenario I can think of is when you are porting python 2 code to python 3 and play with .decode() and .encode().