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

Method __getattr__

Lib/test/test_descr.py:2135–2136  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

2133 # https://github.com/python/cpython/issues/91625
2134 class Numbers:
2135 def __getattr__(self, attr):
2136 return int(attr.lstrip("_"))
2137 attrs = ", ".join(f"Z._{n:03d}" for n in range(280))
2138 code = f"def number_attrs(Z):\n return [ {attrs} ]"
2139 ns = {}

Callers

nothing calls this directly

Calls 1

lstripMethod · 0.45

Tested by

no test coverage detected