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 terry.reedy
Recipients THRlWiTi, belopolsky, terry.reedy
Date 2019-04-22.19:05:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On my puzzlement above: repr(s) is a string of 3 characters -- s bracketed by quote characters.  print(repr(s)) fails.  I am not sure how s gets expanded to the full escape in IDLE.  ascii(s) expands all non-ascii and adds extra quotes.  Need to check Shell code.

In the python REPL, astral chars are not expanded to escape sequences.

>>> s='\U0001f603'
>>> s
'😃'  # Windows REPL shows two replacement boxes instead of 😃

#36698 is about astral chars in exceptions messages.

>>> raise Exception(s)

results in the Exception traceback, 3 Unicodedecode tracebacks, and a restart.
Date User Action Args
2019-04-22 19:05:27terry.reedysetrecipients: + terry.reedy, belopolsky, THRlWiTi
2019-04-22 19:05:27terry.reedysetmessageid: <>
2019-04-22 19:05:27terry.reedylinkissue22742 messages
2019-04-22 19:05:27terry.reedycreate