Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue24569

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Inconsistent PEP 0448 implementation
Type:behaviorStage:resolved
Components:Versions:Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: benjamin.peterson, python-dev, veky
Priority:normalKeywords:

Created on2015-07-05 13:05 byveky, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Messages (5)
msg246312 -(view)Author: Vedran Čačić (veky)*Date: 2015-07-05 13:05
It seems the consequences ofPEP 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.)    {0:1, **{0:2}, 0:3, 0:4}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 withoutPEP 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.
msg246319 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-07-05 15:39
New changeseta4df0fe62b46 by Benjamin Peterson in branch '3.5':set items in dict displays from left to right (closes#24569)https://hg.python.org/cpython/rev/a4df0fe62b46New changeset75852d90c225 by Benjamin Peterson in branch 'default':merge 3.5 (#24569)https://hg.python.org/cpython/rev/75852d90c225
msg246322 -(view)Author: Vedran Čačić (veky)*Date: 2015-07-05 15:49
Benjamin, you're my hero. :-)I'm not really at home in C source... is it possible that you have also changed    {0:1, 0:2}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.
msg246323 -(view)Author: Benjamin Peterson (benjamin.peterson)*(Python committer)Date: 2015-07-05 15:53
Python 3.3.5 (default, Aug 19 2014, 23:45:33) [GCC 4.7.3] on linuxType "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 linux2Type "help", "copyright", "credits" or "license" for more information.>>> {0:1, 0:2}{0: 2}
msg246324 -(view)Author: Vedran Čačić (veky)*Date: 2015-07-05 16:35
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.
History
DateUserActionArgs
2022-04-11 14:58:18adminsetgithub: 68757
2015-07-05 16:35:23vekysetmessages: +msg246324
2015-07-05 15:53:31benjamin.petersonsetnosy: +benjamin.peterson
messages: +msg246323
2015-07-05 15:49:53vekysetmessages: +msg246322
2015-07-05 15:39:29python-devsetstatus: open -> closed

nosy: +python-dev
messages: +msg246319

resolution: fixed
stage: resolved
2015-07-05 13:11:10vekysettype: behavior
versions: + Python 3.5
2015-07-05 13:05:43vekycreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp