New submission from Windson Yang <wiwind...@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@python
components: Documentation
messages: 328963
nosy: Windson Yang, docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue35118>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to