Author ezio.melotti
Recipients atsuoi, ezio.melotti, giampaolo.rodola, loewis, vstinner
Date 2009-04-01.02:42:00
SpamBayes Score 2.50874e-05
Marked as misclassified No
Message-id <>
In the first message I said that this breaks the PEP3138 because I
thought that the solution was to change the default error-handler to
'backslashreplace', but this was already proposed and refused.

sys.displayhook provides a way to change the behavior of the interactive
interpreter only when ">>> foo" is used. The PEP doesn't seem to say
anything about how ">>> foo" should behave.

Moreover, in the alternate solutions [1] they considered to use
sys.displayhook (and sys.excepthook) but they didn't because "these
hooks are called only when printing the result of evaluating an
expression entered in an interactive Python session, and doesn't work
for the print() function, for non-interactive sessions or for
logging.debug("%r", ...), etc."

This is exactly the behavior I intended to have, and, being a unique
feature of the interactive interpreter, it doesn't lead to inconsistence
with other situations.

Date User Action Args
2009-04-01 02:42:05ezio.melottisetrecipients: + ezio.melotti, loewis, atsuoi, vstinner, giampaolo.rodola
2009-04-01 02:42:04ezio.melottisetmessageid: <>
2009-04-01 02:42:01ezio.melottilinkissue5110 messages
2009-04-01 02:42:00ezio.melotticreate