[docs] [issue35118] Add peek() or first() method in queue

Windson Yang report at bugs.python.org
Wed Oct 31 01:23:49 EDT 2018


Windson Yang <wiwindson at gmail.com> added the comment:

For deque, we can add peek() function to deque or just make it clear in the document that we can use deque[0] to access the first element(I can only find index method in the document)

For Queue, I found Java and C++ has the function like first() or peek(), I'm not sure should we also implement a method like this.


* http://www.cplusplus.com/reference/queue/queue/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35118>
_______________________________________


More information about the docs mailing list