[docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3

Raymond Hettinger report at bugs.python.org
Fri Oct 8 21:02:33 CEST 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Refuse the temptation to hypergeneralize ;-)

Also refuse the temptation to double the size of the docs (more != better).

In the case of min/max, the pure python versions may add some value in showing that the first match is what is returned.  But the code will also be a bit convoluted because it needs paths for key-argument case and for the screwy interpretation of 1 arg vs multiple args.

The pure python code is there for any() and all() to show the early out feature and to suggest how you could roll-your-own if you want different behavior (such as returning the value of the first exception).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10029>
_______________________________________


More information about the docs mailing list