Message292527
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. |
|
Date |
User |
Action |
Args |
2017-04-28 11:06:00 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ezio.melotti, michael.foord |
2017-04-28 11:06:00 | serhiy.storchaka | set | messageid: <1493377560.96.0.413320673715.issue30197@psf.upfronthosting.co.za> |
2017-04-28 11:06:00 | serhiy.storchaka | link | issue30197 messages |
2017-04-28 11:06:00 | serhiy.storchaka | create | |
|