This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients anselm.kruis, vstinner
Date 2017-10-23.15:44:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1508773480.11.0.213398074469.issue31835@psf.upfronthosting.co.za>
In-reply-to
Content
> The fix is simple. Replace the faulty sub-expression by
> (co->co_flags & (~PyCF_MASK)) == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE))

I proposed PR 4087 to implement this optimization.

I wouldn't call it a "fix", since the "co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)" check exists since Python 2.7 at least (whereas Python 2.7 also has CO_FUTURE_xxx flags).

> Just a minor performance issue.

I prefer to call it a performance opportunity :-)
History
Date User Action Args
2017-10-23 15:44:40vstinnersetrecipients: + vstinner, anselm.kruis
2017-10-23 15:44:40vstinnersetmessageid: <1508773480.11.0.213398074469.issue31835@psf.upfronthosting.co.za>
2017-10-23 15:44:40vstinnerlinkissue31835 messages
2017-10-23 15:44:40vstinnercreate