Changes by Éric Araujo mer...@netwok.org:
--
nosy: +merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5110
___
___
Python-bugs-list mailing
Ezio Melotti ezio.melo...@gmail.com added the comment:
What I'm proposing is not to change the default error handler to
'backslashreplace', but just the behavior of sys.displayhook.
--
___
Python tracker rep...@bugs.python.org
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: -haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5110
___
___
Atsuo Ishimoto ishim...@gembook.org added the comment:
My proposal to make backslashreplace a default error handler
for interactive session was rejected by Guido [1].
Does something like
PYTHONIOENCODING=ascii:backslashreplace
work for you? With PYTHONIOENCODING, you can effectively make
Ezio Melotti ezio.melo...@gmail.com added the comment:
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
STINNER Victor victor.stin...@haypocalc.com added the comment:
martin IIUC, this patch breaks PEP3138,
martin so it clearly must be rejected.
After reading the PEP3138, it's clear that this issue is not bug, and
that we can not accept any patch fixing the issue without breaking the
PEP.
Ezio Melotti ezio.melo...@gmail.com added the comment:
I've also noticed that if an error contains non-encodable characters,
they are escaped:
raise ValueError(\u2620 can't be printed here, but '\u00e8' works
fine!)
Traceback (most recent call last):
File stdin, line 1, in module
ValueError:
Ezio Melotti ezio.melo...@gmail.com added the comment:
Problem: use different (encoding) rule for the display hook and for
print() may disturb new users (Why does chr(...) work whereas
print(chr(...)) fails?).
This is the same behavior that Python2.x has (with the only difference
that Py2