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 <1555959927.89.0.841147745276.issue22742@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-04-22 19:05:27terry.reedysetrecipients: + terry.reedy, belopolsky, THRlWiTi
2019-04-22 19:05:27terry.reedysetmessageid: <1555959927.89.0.841147745276.issue22742@roundup.psfhosted.org>
2019-04-22 19:05:27terry.reedylinkissue22742 messages
2019-04-22 19:05:27terry.reedycreate