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.

Author rhettinger
Recipients Oren Milman, rhettinger
Date 2017-08-13.05:12:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502601140.45.0.778586650805.issue31147@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-08-13 05:12:20rhettingersetrecipients: + rhettinger, Oren Milman
2017-08-13 05:12:20rhettingersetmessageid: <1502601140.45.0.778586650805.issue31147@psf.upfronthosting.co.za>
2017-08-13 05:12:20rhettingerlinkissue31147 messages
2017-08-13 05:12:19rhettingercreate