Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Python

Knowledge base — Python

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 583

Python

dataclasses.astuple

Recursively converts data-class fields to positional tuples in field declaration order.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclasses.dataclass

Generates methods such as an initializer and value-based equality from the annotated fields of a class.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclasses.field

Customizes how one annotated data-class field is initialized and included in generated operations.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclasses.fields

Returns descriptors for the real data fields in declaration order.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclasses.is_dataclass

Tests whether an object is a data class or an instance of one.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclasses.make_dataclass

Constructs a data class dynamically from a class name and field specifications.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclass.__post_init__

The post-initialization hook computes dependent fields after the generated initializer assigns inputs.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dataclasses.replace

Constructs another instance of the same data class while overriding selected initialization fields.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

datetime.date

Represents a calendar date without a time of day or time zone.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

datetime.datetime

Combines calendar fields with time-of-day fields and an optional time zone.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

datetime.time

Represents a time of day independently of a calendar date.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

datetime.timedelta

Represents an elapsed duration and normalizes its days, seconds and microseconds fields.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

datetime.timezone

Creates a time zone with a fixed offset from UTC.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

datetime.tzinfo

Provides the interface for defining UTC offsets and daylight-saving behavior for aware date-time objects.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

decimal.Decimal — decimal numbers

decimal.Decimal represents decimal numbers and lets you control the precision and rounding of arithmetic.

Basic · Python 3.14; repository image, production runtime not attested
Python

Decimal.quantize — setting a decimal exponent

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.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

decimal.ROUND_HALF_UP — ties away from zero

decimal.ROUND_HALF_UP selects the nearest result and rounds exact ties away from zero, including negative values.

Basic · Python 3.14; repository image, production runtime not attested
Python

dict.clear

Removes all dictionary entries in place.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.copy

Creates a shallow dictionary with the same keys and values.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.fromkeys

Creates a dictionary whose supplied keys initially refer to a common value.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.get

Retrieves the value of a key or returns a supplied default.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.items

Exposes a dynamic view of key and value pairs in insertion order.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.keys

Exposes a live, set-like view of dictionary keys.

Intermediate · Python 3.14; repository image, production runtime not attested
Python

dict.pop

Removes a key and returns its previous value.

Intermediate · Python 3.14; repository image, production runtime not attested