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

Emanuel Barry report at bugs.python.org
Mon Dec 14 10:54:45 EST 2015


Emanuel Barry added the comment:

I see. Is there any to special-case those so that only closures use that? Maybe by checking on the function object itself - the function itself would be quite similar, as well.

@Mark - I think you've misunderstood me (others did too, so I'm going to assume I just explained poorly) - I'm not debating the use of comparing code objects, I'm talking about the implicit replacement of code objects in functions. However, it seems to be of use, so outright removing the behaviour isn't an option.

----------

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


More information about the Python-bugs-list mailing list