[Python-ideas] Support Unicode code point notation

Joshua Landau joshua at landau.ws
Sat Jul 27 22:39:13 CEST 2013


On 27 July 2013 17:46, Stephen J. Turnbull <stephen at xemacs.org> wrote:

> Steven D'Aprano writes:
>
>  > I propose that Python strings support this as the preferred escape
> notation for Unicode code points:
>  >
>  > '\U+03C0'
>  > => 'π'
>
> -1.  Because:
>
>  > The existing \U and \u variants must be kept for backwards
>  > compatibility, but should be (mildly) discouraged in new code.
>
> OTOH, supporting "\N{U+03C0}" seems harmless, if not particularly useful,
> to me.  However, I don't find it hard to imagine that some people
> would use it in preference to the \U and \u escpes, despite being
> somewhat verbose.


As a quick guess, I would. I don't like counting.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130727/f5ffe7b0/attachment.html>


More information about the Python-ideas mailing list