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 <rep...@bugs.python.org> <http://bugs.python.org/issue25843> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com