MCPcopy Index your code
hub / github.com/RustPython/RustPython / make_default_syntax_table

Function make_default_syntax_table

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

Source from the content-addressed store, hash-verified

75
76
77def make_default_syntax_table() -> dict[str, int]:
78 # XXX perhaps should use some unicodedata here?
79 st: dict[str, int] = {}
80 for c in map(chr, range(256)):
81 st[c] = SYNTAX_SYMBOL
82 for c in [a for a in map(chr, range(256)) if a.isalnum()]:
83 st[c] = SYNTAX_WORD
84 st["\n"] = st[" "] = SYNTAX_WHITESPACE
85 return st
86
87
88def make_default_commands() -> dict[CommandName, type[Command]]:

Callers

nothing calls this directly

Calls 1

isalnumMethod · 0.45

Tested by

no test coverage detected