Python stdlib module — dataclasses. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.asdict()Neutralasdict(obj, dict_factory)
Return the fields of a dataclass instance as a new dictionary mapping
.astuple()Neutralastuple(obj, tuple_factory)
Return the fields of a dataclass instance as a new tuple of field values.
.dataclass()Neutraldataclass(cls, init, repr, eq, order, unsafe_hash, frozen, match_args, kw_only, slots, weakref_slot)
Add dunder methods based on the fields defined in the class.
.field()Neutralfield(default, default_factory, init, repr, hash, compare, metadata, kw_only)
Return an object to identify dataclass fields.
.fields()Neutralfields(class_or_instance)
Return a tuple describing the fields of this dataclass.
.is_dataclass()Neutralis_dataclass(obj)
Returns True if obj is a dataclass or an instance of a
.make_dataclass()Neutralmake_dataclass(cls_name, fields, bases, namespace, init, repr, eq, order, unsafe_hash, frozen, match_args, kw_only, slots, weakref_slot)
Return a new dynamically created dataclass.
.replace()Neutralreplace(obj, changes)
Return a new object replacing specified fields with new values.
| FQN | Field | |
|---|---|---|
| dataclasses | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
import dataclasses