On Wed, Apr 29, 2020 at 9:01 PM Ram Rachum <r...@rachum.com> wrote: > Is there a strategic decision to limit deque to certain operations of > doubly-linked lists and not others? That would make sense. Is that decision > written somewhere with the rationale behind it? That would be interesting to > read. >
"""Deques are a generalization of stacks and queues (the name is pronounced “deck” and is short for “double-ended queue”). Deques support thread-safe, memory efficient appends and pops from either side of the deque with approximately the same O(1) performance in either direction.""" I'm not seeing any evidence that this is a doubly-linked list. It might happen to be implemented using one in current versions of CPython, but that's not mandated anywhere. Is there a particular reason to mandate this for all Pythons for all time? As Paul says, you can always implement your own doubly linked list. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/W2KYK2OQKXKKV6Q4YIADBAXHJRY4EIYU/ Code of Conduct: http://python.org/psf/codeofconduct/