MCPcopy
hub / github.com/pydantic/pydantic / get

Method get

pydantic/v1/utils.py:439–440  ·  view source on GitHub ↗
(self, key: Any, default: Any = None)

Source from the content-addressed store, hash-verified

437 raise KeyError(key) from e
438
439 def get(self, key: Any, default: Any = None) -> Any:
440 return getattr(self._obj, key, default)
441
442 def extra_keys(self) -> Set[Any]:
443 """

Callers 15

itemsMethod · 0.95
with_configFunction · 0.45
__init__Method · 0.45
from_attributes_callbackFunction · 0.45
set_frozenMethod · 0.45
__init__Method · 0.45
merge_field_infosMethod · 0.45
__getattr__Function · 0.45

Calls

no outgoing calls

Tested by 12

test_schema_functionsFunction · 0.36
test_error_on_reprFunction · 0.36
test_loc_with_dotsFunction · 0.36
test_bool_errorFunction · 0.36
test_missing_errorFunction · 0.36
test_error_displayFunction · 0.36
test_missing_errorFunction · 0.36
__init__Method · 0.36
__init__Method · 0.36
test_too_longFunction · 0.36