Raymond Hettinger added the comment:

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.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31147>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to