-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Description
Feature or enhancement
Bug description:
collections.deque
is a list-like object that supports fast insertion and removal of elements at either the beginning or the end. Although it doesn't state this goal explicitly, I believe it's intended to be a drop-in replacement for list
.
Lib/test/list_tests.py
is a file containing unit tests for list-like objects. It's designed to be used with any arbitrary list-like object. However, currently collections.deque
doesn't test against it.
I assume the collections.deque
object is working fine, and testing it against Lib/test/list_tests.py
wouldn't uncover anything. Still, I think more tests are always a good thing. So I propose to incorporate list_tests.py
into the deque
test suite. It would only be a small amount of work, and who knows, the tests might discover something someday.
CPython versions tested on:
3.13
Operating systems tested on:
Linux