[Python-Dev] cpython: Minor clean-ups for heapq.

Raymond Hettinger raymond.hettinger at gmail.com
Tue May 27 23:54:35 CEST 2014


On May 27, 2014, at 1:58 AM, Serhiy Storchaka <storchaka at gmail.com> wrote:

> Perhaps it is worth to add simple comment explaining why this is not equivalent to just list(zip(it, range(n))). Otherwise it can be unintentionally "optimized" in future.

FWIW, that is covered by the test cases.
If you substitute list(zip(it, range(n))), the tests fail.


Raymond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140527/391d90cf/attachment.html>


More information about the Python-Dev mailing list