dataclasses.astuple
Recursively converts data-class fields to positional tuples in field declaration order.
CKTIS / Python
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
Recursively converts data-class fields to positional tuples in field declaration order.
Generates methods such as an initializer and value-based equality from the annotated fields of a class.
Customizes how one annotated data-class field is initialized and included in generated operations.
Returns descriptors for the real data fields in declaration order.
Tests whether an object is a data class or an instance of one.
Constructs a data class dynamically from a class name and field specifications.
The post-initialization hook computes dependent fields after the generated initializer assigns inputs.
Constructs another instance of the same data class while overriding selected initialization fields.
Represents a calendar date without a time of day or time zone.
Combines calendar fields with time-of-day fields and an optional time zone.
Represents a time of day independently of a calendar date.
Represents an elapsed duration and normalizes its days, seconds and microseconds fields.
Creates a time zone with a fixed offset from UTC.
Provides the interface for defining UTC offsets and daylight-saving behavior for aware date-time objects.
decimal.Decimal represents decimal numbers and lets you control the precision and rounding of arithmetic.
decimal.Decimal.quantize uses the exponent of exp as the target and rounds the value if necessary. Use it to set a target number of decimal places and explicitly select a rounding rule. With clamp=1, a finite result can have a lower stored exponent.
decimal.ROUND_HALF_UP selects the nearest result and rounds exact ties away from zero, including negative values.
Removes all dictionary entries in place.
Creates a shallow dictionary with the same keys and values.
Creates a dictionary whose supplied keys initially refer to a common value.
Retrieves the value of a key or returns a supplied default.
Exposes a dynamic view of key and value pairs in insertion order.
Exposes a live, set-like view of dictionary keys.
Removes a key and returns its previous value.