MCPcopy Index your code
hub / github.com/python/cpython / make_default_syntax_table

Function make_default_syntax_table

Lib/_pyrepl/reader.py:44–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42
43
44def make_default_syntax_table() -> dict[str, int]:
45 # XXX perhaps should use some unicodedata here?
46 st: dict[str, int] = {}
47 for c in map(chr, range(256)):
48 st[c] = SYNTAX_SYMBOL
49 for c in [a for a in map(chr, range(256)) if a.isalnum()]:
50 st[c] = SYNTAX_WORD
51 st["\n"] = st[" "] = SYNTAX_WHITESPACE
52 return st
53
54
55def make_default_commands() -> dict[CommandName, type[Command]]:

Callers

nothing calls this directly

Calls 1

isalnumMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…