MCPcopy Index your code
hub / github.com/ipython/ipython / test_ident

Function test_ident

tools/gen_latex_symbols.py:61–65  ·  view source on GitHub ↗

Is the unicode string valid in a Python 3 identifier.

(i)

Source from the content-addressed store, hash-verified

59
60
61def test_ident(i):
62 """Is the unicode string valid in a Python 3 identifier."""
63 # Some characters are not valid at the start of a name, but we still want to
64 # include them. So prefix with 'a', which is valid at the start.
65 return ("a" + i).isidentifier()
66
67
68assert test_ident("α")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…