MCPcopy Index your code
hub / github.com/python/mypy / exported_name

Function exported_name

mypyc/namegen.py:93–101  ·  view source on GitHub ↗

Return a C name usable for an exported definition. This is like private_name(), but the output only depends on the 'fullname' argument, so the names are distinct across multiple builds.

(fullname: str)

Source from the content-addressed store, hash-verified

91
92
93def exported_name(fullname: str) -> str:
94 """Return a C name usable for an exported definition.
95
96 This is like private_name(), but the output only depends on the
97 'fullname' argument, so the names are distinct across multiple
98 builds.
99 """
100 # TODO: Support unicode
101 return fullname.replace("___", "___3_").replace(".", "___")
102
103
104def make_module_translation_map(names: list[str]) -> dict[str, str]:

Callers 14

gen_importMethod · 0.90
struct_nameMethod · 0.90
test_exported_nameMethod · 0.90
group_suffixMethod · 0.90
short_group_suffixMethod · 0.90
emit_module_def_slotsMethod · 0.90
emit_module_exec_funcMethod · 0.90
emit_init_only_funcMethod · 0.90
emit_module_init_funcMethod · 0.90

Calls 1

replaceMethod · 0.80

Tested by 1

test_exported_nameMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…