[Python-Dev] Unicode identifiers in test files?

Gregory P. Smith greg at krypto.org
Fri May 3 23:27:00 EDT 2019

On Fri, May 3, 2019 at 10:46 PM Eric V. Smith <eric at trueblade.com> wrote:

> Is there a policy against using Unicode identifiers in test files?
> As part of adding !d to f-strings, there's a code path that's only
> executed if the text of the expression is non-ascii. The easiest way to
> exercise it, and the way I found a bug, is by using an identifier with
> Unicode chars. I know we have a policy against this in Lib/, but what
> about Lib/test/?
> I could work around this with exec-ing some strings, but that seems like
> added confusion that I'd avoid with a real Unicode identifier.

At this point I'd just do it, make sure the file has an explicit coding
utf-8 comment up top just so it is clear it is intentional but everything
should be happy with it.


> Eric
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/greg%40krypto.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20190503/fc6ace4b/attachment.html>

More information about the Python-Dev mailing list