[issue25843] lambdas on the same line may incorrectly share code objects

R. David Murray report at bugs.python.org
Mon Dec 14 11:52:39 EST 2015


R. David Murray added the comment:

Ah, haypo explained the code to me, and now I understand your comment Serhiy.

So, the replacement happens because of (a) an optimizer general rule and (b) the fact that code object *can* be compared.

So it sounds like Armin's suggestion of making an exception for code objects in the optimizer is the correct solution.

The issue with code objects that aren't really equal comparing equal would then be a separate bug that affects, as Serhiy said, only testing (that we know of...who knows what people like PJE might be doing with comparing code objects :)

----------

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


More information about the Python-bugs-list mailing list