Message300211
I'm concerned that is would provide near zero benefit but would set us up for future bugs by tightly coupling two ideas that I would like to be able to reason about separately.
The logic for list.extend() makes a potential overallocation, fills the list, and fixes-up the overallocation if needed (I want that logic should all stay together). And list_resize() should have its own separate logic as well.
For a course grained operation like extend(), I really don't mind having a code path that makes a relatively cheap test that only occasionally useful.
So, thank you for the suggestion, but I'm going to decline on the grounds that 1) the current code is sometimes useful, 2) it is always cheap, 3) that removing it is odds with the principles of loose coupling and high cohesion, 4) it creates a risk of introducing unnoticed errors in the future the list_resize logic were to change, and 5) no one else has stepped forward to advocate this patch. |
|
Date |
User |
Action |
Args |
2017-08-13 05:12:20 | rhettinger | set | recipients:
+ rhettinger, Oren Milman |
2017-08-13 05:12:20 | rhettinger | set | messageid: <1502601140.45.0.778586650805.issue31147@psf.upfronthosting.co.za> |
2017-08-13 05:12:20 | rhettinger | link | issue31147 messages |
2017-08-13 05:12:19 | rhettinger | create | |
|