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 Mark.Shannon, gvanrossum, vstinner
Date 2022-04-01.18:05:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648836304.15.0.435986460147.issue47185@roundup.psfhosted.org>
In-reply-to
Content
python-dev thread:
https://mail.python.org/archives/list/python-dev@python.org/thread/KWSPCLXDHBAP2U4LBSMLQEOC7LREDMPB/

Mark wrote:

"You can pass the exception table the same way you pass all the other arguments. The exception table depends on the code, but that is nothing new. The bytecode library already recomputes the consts, names, etc."

Constants and names are easy to build, it's just an array and the bytecode refers to their index.

Building the exception table is more complicated. It's nice that the format is documented in https://github.com/python/cpython/blob/main/Objects/exception_handling_notes.txt but it would be more convenient to put it in the regular Python documentation (docs.python.org), no? I discovered that file by mistake with filename completion in my editor while looking for Objects/exceptions.c :-)
History
Date User Action Args
2022-04-01 18:05:04vstinnersetrecipients: + vstinner, gvanrossum, Mark.Shannon
2022-04-01 18:05:04vstinnersetmessageid: <1648836304.15.0.435986460147.issue47185@roundup.psfhosted.org>
2022-04-01 18:05:04vstinnerlinkissue47185 messages
2022-04-01 18:05:04vstinnercreate