asdict(obj, *, dict_factory=<class 'dict'>) |
Return the fields of a dataclass instance as a new dictionary mapping [extrait de asdict.__doc__] |
astuple(obj, *, tuple_factory=<class 'tuple'>) |
Return the fields of a dataclass instance as a new tuple of field values. [extrait de astuple.__doc__] |
dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False) |
Add dunder methods based on the fields defined in the class. [extrait de dataclass.__doc__] |
field(*, default=<dataclasses._MISSING_TYPE object at 0x7f720d856dd0>, default_factory=<dataclasses._MISSING_TYPE object at 0x7f720d856dd0>, init=True, repr=True, hash=None, compare=True, metadata=None, kw_only=<dataclasses._MISSING_TYPE object at 0x7f720d856dd0>) |
Return an object to identify dataclass fields. [extrait de field.__doc__] |
fields(class_or_instance) |
Return a tuple describing the fields of this dataclass. [extrait de fields.__doc__] |
is_dataclass(obj) |
Returns True if obj is a dataclass or an instance of a [extrait de is_dataclass.__doc__] |
make_dataclass(cls_name, fields, *, bases=(), namespace=None, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False) |
Return a new dynamically created dataclass. [extrait de make_dataclass.__doc__] |
replace(obj, /, **changes) |
Return a new object replacing specified fields with new values. [extrait de replace.__doc__] |
Améliorations / Corrections
Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Emplacement :
Description des améliorations :