"Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Terry Reedy wrote: | > I think standard Python should somehow have two options: escape everything | > but ASCII (for unambuguity and old display systems) and escape nothing that | > is potentially printable (leaving partially capable systems to fare as they | > will). In-between solutions will ultimately be programmer and system | > specific. | | If repr() is made to work as Martin suggests (i.e. only escape the | unprintable stuff), then the unicode_escape codec can be used fairly | easily to restore the 2.x escape everything non-ASCII behaviour.
so print(s.encode('unicode_escape)) ? Fine with me, especially if that or whatever is added to the repr() doc. _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com