[docs] [issue29724] Itertools docs propose a harmful “speedup” without any explanation
Raymond Hettinger
report at bugs.python.org
Sun Mar 5 13:32:37 EST 2017
Raymond Hettinger added the comment:
The reason that this comment was added was to note the recipes themselves are unoptimized and to provide some guideance on how that could be done. The recipes themselves are provided in the cleaner looking form.
FWIW, localizing variables is one of the few code optimizations available to python programmers. It is not uncommon in the standard library eventhough there are some people who just don't like it (including apparently the OP).
Sorry Chris, I'm going to reject this. The note is correct, the optimization is valid, and so is the original purpose for adding it.
----------
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29724>
_______________________________________
More information about the docs
mailing list