[issue21074] Too aggressive constant folding

Raymond Hettinger report at bugs.python.org
Mon Mar 31 01:34:40 CEST 2014


Raymond Hettinger added the comment:

> check parameters before compute the result is simple

Handling the general case (all sequences and all operators) isn't really simple.  It also involves doing more computations and making more assumptions than we want to do in this code (it is not a great place to be  running code that could raise exceptions, trigger GC, etc).

I admire your inclination to "fix" this but doing so makes it slower and more fragile.  This code has worked well for a long time and we should be reluctant to muck with it just to handle an arcane case that has a trivially easy work-around.

----------

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


More information about the Python-bugs-list mailing list