[issue11244] Negative tuple elements produce inefficient code.

Eugene Toder report at bugs.python.org
Thu Mar 10 22:17:52 CET 2011


Eugene Toder <eltoder at gmail.com> added the comment:

As discussed on the list, peephole refuses to fold -0. The reasons for this are unclear. Folding was disabled with this commit:
http://hg.python.org/cpython/diff/660419bdb4ae/Python/compile.c

Here's a trivial patch to enable the folding again, along with a test case. make test passes with the patch.
The change is independent from Antoine's patches.

----------
nosy: +eltoder
Added file: http://bugs.python.org/file21073/fold-0.patch

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


More information about the Python-bugs-list mailing list