Author ezio.melotti
Recipients amaury.forgeotdarc, ezio.melotti, lemburg, loewis, vstinner
Date 2010-07-08.22:15:57
SpamBayes Score 0.0197721
Marked as misclassified No
Message-id <1278627362.86.0.0248833902364.issue9198@psf.upfronthosting.co.za>
In-reply-to
Content
I suggest to:
  1) keep the current behavior for non-BMP chars (i.e. print them normally);
  2) change isprintable to consider the Zx categories printable (this will affect repr() too);
  3) change displayhook (*NOT* sys.stdout.encoding) to use backslashreplace when the string contains chars that are not encodable with sys.stdout.encoding *.

* note that this will affect only the objects that are converted with repr() in the interpreter e.g. ">>> x = 'foo'; x" and *NOT* ">>> x = 'foo'; print(x)". Since the first behavior exists *only* in the interactive interpreter it won't be inconsistent with normal programs ("x = 'foo'; x" in a program doesn't display anything).
History
Date User Action Args
2010-07-08 22:16:02ezio.melottisetrecipients: + ezio.melotti, lemburg, loewis, amaury.forgeotdarc, vstinner
2010-07-08 22:16:02ezio.melottisetmessageid: <1278627362.86.0.0248833902364.issue9198@psf.upfronthosting.co.za>
2010-07-08 22:15:58ezio.melottilinkissue9198 messages
2010-07-08 22:15:57ezio.melotticreate