Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

>> FWIW, the standard library queue module doesn't have 
>> a straight-forward way to implement a peek() method.

> I currently use `q.deque[0]`

The Queue class is only allowed to call _init, _qsize, _put, and _get.  It is 
not allowed to directly touch the underlying data structure.  Otherwise, 
subclasses relying on the abstraction would fail.

----------

_______________________________________
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