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 scoder
Recipients Arfrever, asvetlov, gvanrossum, larry, martin.panter, ncoghlan, python-dev, scoder, vstinner, yselivanov
Date 2015-07-03.06:23:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is not purely about speeding up the code. It's also about avoiding to replace the code object of a function, which is essentially a big and clumsy hack only to achieve setting a flag. Some tools, namely line_profiler, use the current code object as a dict key for state keeping. Replacing the reference in "__code__" might confuse them if they happened to catch a reference before.

That's why I asked for applying at least the simple patch that sets the flag with a C level helper function. But I'd be ok with applying the latest patch as it is. The non-flag-setting parts are simple and a straight forward translation of the current Python code.
Date User Action Args
2015-07-03 06:23:22scodersetrecipients: + scoder, gvanrossum, ncoghlan, vstinner, larry, Arfrever, asvetlov, python-dev, martin.panter, yselivanov
2015-07-03 06:23:22scodersetmessageid: <>
2015-07-03 06:23:22scoderlinkissue24325 messages
2015-07-03 06:23:22scodercreate