Issue30197
Created on 2017-04-28 11:06 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 1341 | merged | serhiy.storchaka, 2017-04-28 11:09 | |
| PR 1345 | merged | serhiy.storchaka, 2017-04-28 16:31 | |
| PR 1346 | merged | serhiy.storchaka, 2017-04-28 16:35 | |
| PR 1347 | merged | serhiy.storchaka, 2017-04-28 16:46 | |
| Messages (6) | |||
|---|---|---|---|
| msg292527 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-04-28 11:06 | |
Proposed patch adds two features to functions swap_attr() and swap_item() in the test.support module. 1. They now work (rather than failing in __exit__) when delete the attribute or item inside the with block. There were several cases when I refused to use these functions instead of manually coded try/finally due to lack of this feature. 2. The original value of the attribute or item can be assigned to the target of "as" in the with statement. This can save a line of the code in some cases. |
|||
| msg292536 - (view) | Author: STINNER Victor (vstinner) * | Date: 2017-04-28 16:17 | |
New changeset d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83 by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. (#1341) https://github.com/python/cpython/commit/d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83 |
|||
| msg292539 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-04-28 17:05 | |
New changeset 712114b3f9f5f98f03c66a80607b6f7101c5cc90 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. (GH-1341) (#1345) https://github.com/python/cpython/commit/712114b3f9f5f98f03c66a80607b6f7101c5cc90 |
|||
| msg292541 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-04-28 17:05 | |
New changeset 910ba937e90ffe3aa154a5b27dc7e2c3d3c88d1f by Serhiy Storchaka in branch '3.5': [3.5] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. (#1341) (#1346) https://github.com/python/cpython/commit/910ba937e90ffe3aa154a5b27dc7e2c3d3c88d1f |
|||
| msg292542 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-04-28 17:06 | |
New changeset 941ea53b5776aaeb9dc1026e482a4ce5c5768830 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30197: Enhance swap_attr() and backport swap_item() in test.test_support. (#1341) (#1347) https://github.com/python/cpython/commit/941ea53b5776aaeb9dc1026e482a4ce5c5768830 |
|||
| msg378109 - (view) | Author: Will Chill (wburchill7) | Date: 2020-10-06 10:47 | |
Thought I'd send |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:45 | admin | set | github: 74383 |
| 2020-10-06 10:48:50 | wburchill7 | set | files: - March 23rd 2017.htm |
| 2020-10-06 10:47:05 | wburchill7 | set | files:
+ March 23rd 2017.htm nosy: + wburchill7 messages: + msg378109 |
| 2017-04-28 17:07:22 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017-04-28 17:06:32 | serhiy.storchaka | set | messages: + msg292542 |
| 2017-04-28 17:05:55 | serhiy.storchaka | set | messages: + msg292541 |
| 2017-04-28 17:05:07 | serhiy.storchaka | set | messages: + msg292539 |
| 2017-04-28 16:46:21 | serhiy.storchaka | set | pull_requests: + pull_request1459 |
| 2017-04-28 16:35:02 | serhiy.storchaka | set | pull_requests: + pull_request1458 |
| 2017-04-28 16:31:04 | serhiy.storchaka | set | pull_requests: + pull_request1457 |
| 2017-04-28 16:17:28 | vstinner | set | nosy:
+ vstinner messages: + msg292536 |
| 2017-04-28 11:09:58 | serhiy.storchaka | set | pull_requests: + pull_request1452 |
| 2017-04-28 11:06:00 | serhiy.storchaka | create | |