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 pewscorner
Recipients pewscorner
Date 2021-11-06.13:10:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org>
In-reply-to
Content
When exec'ing code with an illegal character after the line continuation character '\', python 3.11.0a2 raises this strange exception:

  SystemError: Negative size passed to PyUnicode_New

Here's an example where '#' is the illegal character:

  exec('1,\\#\n2')

I expected the following exception (which is raised by Python 3.10.0, and also by Python 3.11.0a2 when using eval instead of exec, or when the string content is put into its own file and run as a normal script):

  SyntaxError: unexpected character after line continuation character
History
Date User Action Args
2021-11-06 13:10:52pewscornersetrecipients: + pewscorner
2021-11-06 13:10:52pewscornersetmessageid: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org>
2021-11-06 13:10:51pewscornerlinkissue45738 messages
2021-11-06 13:10:51pewscornercreate