| """ | |
| Python polyfills for sys | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from ..decorators import substitute_in_graph | |
| __all__ = [ | |
| "intern", | |
| "getrecursionlimit", | |
| ] | |
| def intern(string: str, /) -> str: | |
| return string | |
| def getrecursionlimit() -> int: | |
| return sys.getrecursionlimit() | |
| if hasattr(sys, "get_int_max_str_digits"): | |
| def get_int_max_str_digits() -> int: | |
| return sys.get_int_max_str_digits() | |
| __all__ += ["get_int_max_str_digits"] | |