[New-bugs-announce] [issue35118] Add peek() or first() method in queue

Windson Yang report at bugs.python.org
Tue Oct 30 23:20:18 EDT 2018


New submission from Windson Yang <wiwindson at gmail.com>:

I found other languages like Java and C++ have the method to access the first value in Queue like first() and peek(). Since we use deque_ to create Queue now, it's easy to implement in python using the index. Otherwise, we can add this to the document? I also found some discussion_ here.


.. _deque: 
 https://github.com/python/cpython/blob/master/Lib/queue.py#L205

.. _discussion https://mail.python.org/pipermail/python-list/2010-March/569930.html

----------
assignee: docs at python
components: Documentation
messages: 328963
nosy: Windson Yang, docs at python
priority: normal
severity: normal
status: open
title: Add peek() or first() method in queue
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

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


More information about the New-bugs-announce mailing list