New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent PEP 0448 implementation #68757
Comments
It seems the consequences of PEP-0448 weren't really thought through. :-/ (And BTW why isn't it in "What's new in Python 3.5"? I know there is a file with full details, but I guess this really should be notable enough.)
Do you know what is the value of that dict? And does it make sense to you? It surely doesn't make sense to me (though I understand the implementation). I know things are really subtle and even Guido gets it wrong (https://bugs.python.org/msg234413), even without PEP-0448, but this particular instance is horrible. ValueError would be perfect, I'd be ok with 4, I'd shrug on 1, I'd frown on 2, but I _scream_ on 3. Please fix this until it's too late and fictional "backward compatibility" starts to freeze the wrong behaviour. |
New changeset a4df0fe62b46 by Benjamin Peterson in branch '3.5': New changeset 75852d90c225 by Benjamin Peterson in branch 'default': |
Benjamin, you're my hero. :-) I'm not really at home in C source... is it possible that you have also changed
to be {0:2} (as opposed to {0:1} as it is now)? I'm completely fine with that and find it more logical (and as I said in the previous message, it matches BDFL's mental model, which is the real reference implementation of Python:), but I'm afraid backward compatibility zealots will ruin the fun. |
Python 3.3.5 (default, Aug 19 2014, 23:45:33)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> {0:1, 0:2}
{0: 2}
Python 2.7.9 (default, Dec 24 2014, 23:52:11)
[GCC 4.8.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> {0:1, 0:2}
{0: 2} |
Ah, so it was broken _only_ on 3.5. That should teach me not to uninstall Py3.x as soon as Py3.x+1 comes out. :-) Ok, thank you very much. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: