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

Function _is_dataclass_instance

Lib/dataclasses.py:1463–1465  ·  view source on GitHub ↗

Returns True if obj is an instance of a dataclass.

(obj)

Source from the content-addressed store, hash-verified

1461
1462
1463def _is_dataclass_instance(obj):
1464 """Returns True if obj is an instance of a dataclass."""
1465 return hasattr(type(obj), _FIELDS)
1466
1467
1468def is_dataclass(obj):

Callers 4

asdictFunction · 0.85
astupleFunction · 0.85
_astuple_innerFunction · 0.85
replaceFunction · 0.85

Calls 1

hasattrFunction · 0.85

Tested by

no test coverage detected