MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __getattr__

Method __getattr__

examples/custom_attributes/custom_management.py:56–63  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

54 setattr(self, k, kwargs[k])
55
56 def __getattr__(self, key):
57 if is_instrumented(self, key):
58 return get_attribute(self, key)
59 else:
60 try:
61 return self._goofy_dict[key]
62 except KeyError:
63 raise AttributeError(key)
64
65 def __setattr__(self, key, value):
66 if is_instrumented(self, key):

Callers

nothing calls this directly

Calls 2

is_instrumentedFunction · 0.90
get_attributeFunction · 0.90

Tested by

no test coverage detected