Skip to content

Types

no_default = NoDefault() module-attribute

The instance of NoDefault.

marker = Marker() module-attribute

The instance of Marker.

NoDefault

Bases: Singleton

Represents the absence of default values.

Source code in iters/types.py
28
29
class NoDefault(Singleton):
    """Represents the absence of default values."""

Marker

Bases: Singleton

Represents markers used for various checks.

Source code in iters/types.py
57
58
class Marker(Singleton):
    """Represents markers used for various checks."""

is_no_default(item: Any) -> TypeGuard[NoDefault]

Checks if the item is NoDefault.

Returns:

Type Description
TypeGuard[NoDefault]

Whether the item is NoDefault.

Source code in iters/types.py
39
40
41
42
43
44
45
def is_no_default(item: Any) -> TypeGuard[NoDefault]:
    """Checks if the `item` is [`NoDefault`][iters.types.NoDefault].

    Returns:
        Whether the `item` is [`NoDefault`][iters.types.NoDefault].
    """
    return item is no_default

is_not_no_default(item: NoDefaultOr[T]) -> TypeGuard[T]

Checks if the item is not NoDefault.

Returns:

Type Description
TypeGuard[T]

Whether the item is not NoDefault.

Source code in iters/types.py
48
49
50
51
52
53
54
def is_not_no_default(item: NoDefaultOr[T]) -> TypeGuard[T]:
    """Checks if the `item` is not [`NoDefault`][iters.types.NoDefault].

    Returns:
        Whether the `item` is not [`NoDefault`][iters.types.NoDefault].
    """
    return item is not no_default

is_marker(item: Any) -> TypeGuard[Marker]

Checks if the item is Marker.

Returns:

Type Description
TypeGuard[Marker]

Whether the item is Marker.

Source code in iters/types.py
68
69
70
71
72
73
74
def is_marker(item: Any) -> TypeGuard[Marker]:
    """Checks if the `item` is [`Marker`][iters.types.Marker].

    Returns:
        Whether the `item` is [`Marker`][iters.types.Marker].
    """
    return item is marker

is_not_marker(item: MarkerOr[T]) -> TypeGuard[T]

Checks if the item is not Marker.

Returns:

Type Description
TypeGuard[T]

Whether the item is not Marker.

Source code in iters/types.py
77
78
79
80
81
82
83
def is_not_marker(item: MarkerOr[T]) -> TypeGuard[T]:
    """Checks if the `item` is not [`Marker`][iters.types.Marker].

    Returns:
        Whether the `item` is not [`Marker`][iters.types.Marker].
    """
    return item is not marker