bpo-47178: Improve the implementations of Sequence.index and MutableSequence.extend in collections.abc#32150
bpo-47178: Improve the implementations of Sequence.index and MutableSequence.extend in collections.abc#32150geryogam wants to merge 8 commits intopython:mainfrom
Conversation
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
…equence.extend (fix)
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Am marking this as closed because the changes are incorrect. |
|
Example that succeeds with the current code but fails with the proposed revision to index() Here the issue is that when stop is None, the index() code should iterate until it hits an IndexError rather than relying on _len_ which can be inaccurate or can reflect an actual size change during iteration. |
|
Thanks for the example. Indeed, I overlooked that I have opened a separate PR that moves the unrelated |
This P.R. will make the following changes to the
collections.abcmodule:Sequence.index.selfwhen a sequence extends itself in functionMutableSequence.extend.https://bugs.python.org/issue47178