This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2019年03月23日 05:43 by terry.reedy, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12507 | merged | terry.reedy, 2019年03月23日 06:06 | |
| PR 12510 | merged | miss-islington, 2019年03月23日 07:50 | |
| PR 12518 | merged | terry.reedy, 2019年03月23日 21:35 | |
| PR 12526 | merged | miss-islington, 2019年03月24日 21:12 | |
| Messages (11) | |||
|---|---|---|---|
| msg338643 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月23日 05:43 | |
Replace 3 occurrences of 'd = d1.copy(); d.update(d2)' pattern with 'd = {**d1, **d2}'. Also remove unnecessary imports and uses of __main__.
|
|||
| msg338648 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2019年03月23日 06:52 | |
It is not unnecessary. globals() is not the same as __main__.__dict__. It may be possible to use a ChainMap instead of merging dicts, but I do not think it matters. |
|||
| msg338655 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月23日 07:50 | |
New changeset 2b75155590eb42d25e474b776ee9fdcc4b3dc840 by Terry Jan Reedy in branch 'master': bpo-36405: Use dict unpacking in idlelib (#12507) https://github.com/python/cpython/commit/2b75155590eb42d25e474b776ee9fdcc4b3dc840 |
|||
| msg338656 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月23日 07:55 | |
I hit merge before seeing your post here. I based the globals change on >>> import __main__ >>> __main__.__dict__ is globals() True |
|||
| msg338657 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2019年03月23日 08:01 | |
It is true only in the main script or REPL. But you executed that code in imported modules. |
|||
| msg338659 - (view) | Author: miss-islington (miss-islington) | Date: 2019年03月23日 08:08 | |
New changeset 00986ec5530f004fca2c2675a822c73f06283bdf by Miss Islington (bot) in branch '3.7': bpo-36405: Use dict unpacking in idlelib (GH-12507) https://github.com/python/cpython/commit/00986ec5530f004fca2c2675a822c73f06283bdf |
|||
| msg338661 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月23日 09:55 | |
You mean that the patch will execute the code in imported module where the two are not even equal. So I will revert the '__main__' changes. I found two differences in completion behavior with the patch. One is a failure that should work, another is a success that should fail. I will try to turn at least one of them into a new test that fails before the reversion and passes after. |
|||
| msg338702 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月23日 21:36 | |
Also, __builtins__ is only a module, with a __dict__, in __main__. |
|||
| msg338755 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月24日 21:12 | |
New changeset 0fe4513d9a5510ae91c0da7eb0433f79a6d4dda9 by Terry Jan Reedy in branch 'master': bpo-36405: IDLE - Restore __main__ and add tests (#12518) https://github.com/python/cpython/commit/0fe4513d9a5510ae91c0da7eb0433f79a6d4dda9 |
|||
| msg338757 - (view) | Author: miss-islington (miss-islington) | Date: 2019年03月24日 21:32 | |
New changeset 2b580146a53311e4202b0be63040740cdc01f1f5 by Miss Islington (bot) in branch '3.7': bpo-36405: IDLE - Restore __main__ and add tests (GH-12518) https://github.com/python/cpython/commit/2b580146a53311e4202b0be63040740cdc01f1f5 |
|||
| msg338765 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月24日 23:10 | |
Immediate followup is #30348, add autocomplete tests. At least one would have failed with the initial patch. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:12 | admin | set | github: 80586 |
| 2019年03月24日 23:10:32 | terry.reedy | set | messages: + msg338765 |
| 2019年03月24日 21:44:05 | terry.reedy | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019年03月24日 21:32:42 | miss-islington | set | messages: + msg338757 |
| 2019年03月24日 21:12:42 | miss-islington | set | stage: commit review -> patch review pull_requests: + pull_request12477 |
| 2019年03月24日 21:12:30 | terry.reedy | set | messages: + msg338755 |
| 2019年03月23日 21:36:32 | terry.reedy | set | messages:
+ msg338702 stage: patch review -> commit review |
| 2019年03月23日 21:35:51 | terry.reedy | set | stage: commit review -> patch review pull_requests: + pull_request12469 |
| 2019年03月23日 09:55:46 | terry.reedy | set | messages:
+ msg338661 stage: patch review -> commit review |
| 2019年03月23日 08:08:58 | miss-islington | set | nosy:
+ miss-islington messages: + msg338659 |
| 2019年03月23日 08:01:53 | serhiy.storchaka | set | messages: + msg338657 |
| 2019年03月23日 07:55:46 | terry.reedy | set | messages: + msg338656 |
| 2019年03月23日 07:50:29 | miss-islington | set | pull_requests: + pull_request12461 |
| 2019年03月23日 07:50:17 | terry.reedy | set | messages: + msg338655 |
| 2019年03月23日 06:52:03 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg338648 |
| 2019年03月23日 06:06:31 | terry.reedy | set | keywords:
+ patch stage: commit review -> patch review pull_requests: + pull_request12458 |
| 2019年03月23日 05:43:09 | terry.reedy | create | |