2008/4/15 Guido van Rossum <[EMAIL PROTECTED]>: > On Tue, Apr 15, 2008 at 6:10 PM, Michael Urman <[EMAIL PROTECTED]> wrote: > >The third use, to represent strings unambiguously, is not a major point, > > This is very much dependent on who is looking. > > > Similarly it's more useful to have '日本語' than to have > '\u1234\u5678\u9abc'. > > Again, that's not universally true.
It does depend on the use case. I base my comments on an expectation that repr of str will be more commonly used to view contents than to analyze strings character by character. Those doing the latter who care about the difference between various 'a' look-alike characters are doing so for very specific reasons, and can probably afford to "do it right," whatever that ends up meaning. > The more I think about this, the more I believe that repr() should > *not* be changed, and that instead we should give people who like to > see '日本語' instead of '\u1234\u5678\u9abc' other tools to help > themselves. I'll miss this, as I suspect the case of printing a list of unicode strings will be fairly common. Given Unicode identifiers, even print locals() could hit this. But perhaps tools for printing better summaries of the contents of lists and dicts, or shell quoting (repr as is makes a passable hack for quotes and spaces, but not unicode characters), etc., can alleviate the pain well enough. -- Michael Urman _______________________________________________ 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