[issue41339] make queue.Queue objects iterable

2020-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I prefer the current API because it makes the blocking step explicit. That isn't the kind of thing that should be hidden behind a "for" or buried in another tool that accepts an iterable argument, sorted(q), for example. Also, the get() method supports

[issue41339] make queue.Queue objects iterable

2020-07-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41339] make queue.Queue objects iterable

2020-07-19 Thread Alan Iwi
New submission from Alan Iwi : It is possible to make `queue.Queue` and `queue.SimpleQueue` objects iterable by adding simple `__iter__` and `__next__` methods. This is to suggest adding these methods to the existing `Queue` and `SimpleQueue` so that they are iterable by default. ``` class