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

Method __getattr__

Lib/typing.py:1276–1284  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

1274 return tuple(res)
1275
1276 def __getattr__(self, attr):
1277 if attr in {'__name__', '__qualname__'}:
1278 return self._name or self.__origin__.__name__
1279
1280 # We are careful for copy and pickle.
1281 # Also for simplicity we don't relay any dunder names
1282 if '__origin__' in self.__dict__ and not _is_dunder(attr):
1283 return getattr(self.__origin__, attr)
1284 raise AttributeError(attr)
1285
1286 def __setattr__(self, attr, val):
1287 if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}:

Callers

nothing calls this directly

Calls 2

getattrFunction · 0.85
_is_dunderFunction · 0.70

Tested by

no test coverage detected