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 Dennis Sweeney
Recipients BTaskaya, Dennis Sweeney, eric.smith, sbz
Date 2020-12-08.03:55:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607399717.28.0.241583596861.issue42422@roundup.psfhosted.org>
In-reply-to
Content
Why not just fix bogus_code_obj.py?

Something like this (using the replace method) would make it more future-proof to similar changes in the code object constructor signature (and be more readable!):

import dis
POP_TOP = dis.opmap['POP_TOP']
wordcode = bytes([POP_TOP, 0] * 10)
f = lambda: None
f.__code__ = f.__code__.replace(co_code=wordcode)
f()
History
Date User Action Args
2020-12-08 03:55:17Dennis Sweeneysetrecipients: + Dennis Sweeney, eric.smith, sbz, BTaskaya
2020-12-08 03:55:17Dennis Sweeneysetmessageid: <1607399717.28.0.241583596861.issue42422@roundup.psfhosted.org>
2020-12-08 03:55:17Dennis Sweeneylinkissue42422 messages
2020-12-08 03:55:17Dennis Sweeneycreate