A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045436.html below:

[Python-Dev] heapq API

[Python-Dev] heapq API [Python-Dev] heapq APIArmin Rigo arigo at tunes.org
Thu Jun 17 14:03:25 EDT 2004
Hello Raymond,

On Sat, Jun 12, 2004 at 04:38:56AM -0400, Raymond Hettinger wrote:
> def heapiter(heap):
>     "Return a destructive iterator over the heap's elements,
> smallest-to-largest"

Is there a reason why the heap cannot simply be made iterable?
The suggested heapiter() is destructive, but e.g. sys.stdin is also
destructively iterable, so that would not be unprecedented.
Alternatively, would a non-destructive algorithm be significantly slower or
bad for some other reason?


Armin

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4