pythonwrench.enum module

class pythonwrench.enum.StrEnum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

StrEnum is the same as Enum, but its members are also strings and can be used in most of the same places that a string can be used.

Note: when used as keys of dicts, enums are considered different from strings keys.

This class has the same objective than https://docs.python.org/3/library/enum.html#enum.StrEnum, which was introduced in Python 3.11.

classmethod from_str(value: str, case_sensitive: bool = False) Self[source]
property value : str