Skip to content

Unicode variable name surprisesΒ #205

Description

@doersino

Utter madness.

>>> r = 1
>>> r
1
>>> 𝕣 = 2
>>> 𝕣
2
>>> r
2

I'm not sure why this is happening – not all non-ASCII characters in identifiers are translated into their closest ASCII match, but some are. This is in Python 3, of course, since Python 2 doesn't support these kinds of identifiers.

(It's entirely possible that this WTF is already in the document, I ctrlF'd for a few related terms but didn't find anything.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions