# Python Documentation Turkish Translation # Copyright (C) 2001-2023, Python Software Foundation # This file is distributed under the same license as the Python package. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-04 18:33+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: \n" "Language-Team: TURKISH \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: library/enum.rst:2 msgid ":mod:`enum` --- Support for enumerations" msgstr "" #: library/enum.rst:14 msgid "**Source code:** :source:`Lib/enum.py`" msgstr "" #: library/enum.rst:18 msgid "" "This page contains the API reference information. For tutorial information " "and discussion of more advanced topics, see" msgstr "" #: library/enum.rst:21 msgid ":ref:`Basic Tutorial `" msgstr "" #: library/enum.rst:22 msgid ":ref:`Advanced Tutorial `" msgstr "" #: library/enum.rst:23 msgid ":ref:`Enum Cookbook `" msgstr "" #: library/enum.rst:27 msgid "An enumeration:" msgstr "" #: library/enum.rst:29 msgid "is a set of symbolic names (members) bound to unique values" msgstr "" #: library/enum.rst:30 msgid "" "can be iterated over to return its canonical (i.e. non-alias) members in " "definition order" msgstr "" #: library/enum.rst:32 msgid "uses *call* syntax to return members by value" msgstr "" #: library/enum.rst:33 msgid "uses *index* syntax to return members by name" msgstr "" #: library/enum.rst:35 msgid "" "Enumerations are created either by using :keyword:`class` syntax, or by " "using function-call syntax::" msgstr "" #: library/enum.rst:49 msgid "" "Even though we can use :keyword:`class` syntax to create Enums, Enums are " "not normal Python classes. See :ref:`How are Enums different? ` for more details." msgstr "" #: library/enum.rst:53 msgid "Nomenclature" msgstr "" #: library/enum.rst:55 msgid "The class :class:`!Color` is an *enumeration* (or *enum*)" msgstr "" #: library/enum.rst:56 msgid "" "The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are " "*enumeration members* (or *members*) and are functionally constants." msgstr "" #: library/enum.rst:58 msgid "" "The enum members have *names* and *values* (the name of :attr:`!Color.RED` " "is ``RED``, the value of :attr:`!Color.BLUE` is ``3``, etc.)" msgstr "" #: library/enum.rst:65 msgid "Module Contents" msgstr "" #: library/enum.rst:67 msgid ":class:`EnumType`" msgstr "" #: library/enum.rst:69 msgid "The ``type`` for Enum and its subclasses." msgstr "" #: library/enum.rst:71 msgid ":class:`Enum`" msgstr "" #: library/enum.rst:73 msgid "Base class for creating enumerated constants." msgstr "" #: library/enum.rst:75 msgid ":class:`IntEnum`" msgstr "" #: library/enum.rst:77 msgid "" "Base class for creating enumerated constants that are also subclasses of :" "class:`int`. (`Notes`_)" msgstr "" #: library/enum.rst:80 msgid ":class:`StrEnum`" msgstr "" #: library/enum.rst:82 msgid "" "Base class for creating enumerated constants that are also subclasses of :" "class:`str`. (`Notes`_)" msgstr "" #: library/enum.rst:85 msgid ":class:`Flag`" msgstr "" #: library/enum.rst:87 msgid "" "Base class for creating enumerated constants that can be combined using the " "bitwise operations without losing their :class:`Flag` membership." msgstr "" #: library/enum.rst:90 msgid ":class:`IntFlag`" msgstr "" #: library/enum.rst:92 msgid "" "Base class for creating enumerated constants that can be combined using the " "bitwise operators without losing their :class:`IntFlag` membership. :class:" "`IntFlag` members are also subclasses of :class:`int`. (`Notes`_)" msgstr "" #: library/enum.rst:96 msgid ":class:`ReprEnum`" msgstr "" #: library/enum.rst:98 msgid "" "Used by :class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag` to keep " "the :class:`str() ` of the mixed-in type." msgstr "" #: library/enum.rst:101 msgid ":class:`EnumCheck`" msgstr "" #: library/enum.rst:103 msgid "" "An enumeration with the values ``CONTINUOUS``, ``NAMED_FLAGS``, and " "``UNIQUE``, for use with :func:`verify` to ensure various constraints are " "met by a given enumeration." msgstr "" #: library/enum.rst:107 msgid ":class:`FlagBoundary`" msgstr "" #: library/enum.rst:109 msgid "" "An enumeration with the values ``STRICT``, ``CONFORM``, ``EJECT``, and " "``KEEP`` which allows for more fine-grained control over how invalid values " "are dealt with in an enumeration." msgstr "" #: library/enum.rst:113 msgid ":class:`auto`" msgstr "" #: library/enum.rst:115 msgid "" "Instances are replaced with an appropriate value for Enum members. :class:" "`StrEnum` defaults to the lower-cased version of the member name, while " "other Enums default to 1 and increase from there." msgstr "" #: library/enum.rst:119 msgid ":func:`~enum.property`" msgstr "" #: library/enum.rst:121 msgid "" "Allows :class:`Enum` members to have attributes without conflicting with " "member names. The ``value`` and ``name`` attributes are implemented this " "way." msgstr "" #: library/enum.rst:125 msgid ":func:`unique`" msgstr "" #: library/enum.rst:127 msgid "" "Enum class decorator that ensures only one name is bound to any one value." msgstr "" #: library/enum.rst:129 msgid ":func:`verify`" msgstr "" #: library/enum.rst:131 msgid "" "Enum class decorator that checks user-selectable constraints on an " "enumeration." msgstr "" #: library/enum.rst:134 msgid ":func:`member`" msgstr "" #: library/enum.rst:136 msgid "Make ``obj`` a member. Can be used as a decorator." msgstr "" #: library/enum.rst:138 msgid ":func:`nonmember`" msgstr "" #: library/enum.rst:140 msgid "Do not make ``obj`` a member. Can be used as a decorator." msgstr "" #: library/enum.rst:142 msgid ":func:`global_enum`" msgstr "" #: library/enum.rst:144 msgid "" "Modify the :class:`str() ` and :func:`repr` of an enum to show its " "members as belonging to the module instead of its class, and export the enum " "members to the global namespace." msgstr "" #: library/enum.rst:148 msgid ":func:`show_flag_values`" msgstr "" #: library/enum.rst:150 msgid "Return a list of all power-of-two integers contained in a flag." msgstr "" #: library/enum.rst:153 msgid "``Flag``, ``IntFlag``, ``auto``" msgstr "" #: library/enum.rst:154 msgid "" "``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, " "``member``, ``nonmember``, ``global_enum``, ``show_flag_values``" msgstr "" #: library/enum.rst:159 msgid "Data Types" msgstr "" #: library/enum.rst:164 msgid "" "*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible " "to subclass *EnumType* -- see :ref:`Subclassing EnumType ` for details." msgstr "" #: library/enum.rst:168 msgid "" "*EnumType* is responsible for setting the correct :meth:`!__repr__`, :meth:`!" "__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the final " "*enum*, as well as creating the enum members, properly handling duplicates, " "providing iteration over the enum class, etc." msgstr "" #: library/enum.rst:175 msgid "This method is called in two different ways:" msgstr "" #: library/enum.rst:177 msgid "to look up an existing member:" msgstr "" #: library/enum.rst:0 msgid "cls" msgstr "" #: library/enum.rst:185 msgid "The enum class being called." msgstr "" #: library/enum.rst:0 msgid "value" msgstr "" #: library/enum.rst:180 msgid "The value to lookup." msgstr "" #: library/enum.rst:182 msgid "" "to use the ``cls`` enum to create a new enum (only if the existing enum does " "not have any members):" msgstr "" #: library/enum.rst:186 msgid "The name of the new Enum to create." msgstr "" #: library/enum.rst:0 msgid "names" msgstr "" #: library/enum.rst:187 msgid "The names/values of the members for the new Enum." msgstr "" #: library/enum.rst:0 msgid "module" msgstr "" #: library/enum.rst:188 msgid "The name of the module the new Enum is created in." msgstr "" #: library/enum.rst:0 msgid "qualname" msgstr "" #: library/enum.rst:189 msgid "The actual location in the module where this Enum can be found." msgstr "" #: library/enum.rst:0 msgid "type" msgstr "" #: library/enum.rst:190 msgid "A mix-in type for the new Enum." msgstr "" #: library/enum.rst:0 msgid "start" msgstr "" #: library/enum.rst:191 msgid "The first integer value for the Enum (used by :class:`auto`)." msgstr "" #: library/enum.rst:0 msgid "boundary" msgstr "" #: library/enum.rst:192 msgid "" "How to handle out-of-range values from bit operations (:class:`Flag` only)." msgstr "" #: library/enum.rst:196 msgid "Returns ``True`` if member belongs to the ``cls``::" msgstr "" #: library/enum.rst:206 msgid "" "Before Python 3.12, a ``TypeError`` is raised if a non-Enum-member is used " "in a containment check." msgstr "" #: library/enum.rst:211 msgid "" "Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the " "names of the members in *cls*::" msgstr "" #: library/enum.rst:219 msgid "" "Returns the Enum member in *cls* matching *name*, or raises a :exc:" "`KeyError`::" msgstr "" #: library/enum.rst:226 msgid "Returns each member in *cls* in definition order::" msgstr "" #: library/enum.rst:233 msgid "Returns the number of member in *cls*::" msgstr "" #: library/enum.rst:240 msgid "Returns each member in *cls* in reverse definition order::" msgstr "" #: library/enum.rst:247 msgid "Before 3.11 ``enum`` used ``EnumMeta`` type, which is kept as an alias." msgstr "" #: library/enum.rst:252 msgid "*Enum* is the base class for all *enum* enumerations." msgstr "" #: library/enum.rst:256 msgid "The name used to define the ``Enum`` member::" msgstr "" #: library/enum.rst:263 msgid "The value given to the ``Enum`` member::" msgstr "" #: library/enum.rst:268 msgid "Enum member values" msgstr "" #: library/enum.rst:270 msgid "" "Member values can be anything: :class:`int`, :class:`str`, etc. If the " "exact value is unimportant you may use :class:`auto` instances and an " "appropriate value will be chosen for you. See :class:`auto` for the details." msgstr "" #: library/enum.rst:277 msgid "" "``_ignore_`` is only used during creation and is removed from the " "enumeration once creation is complete." msgstr "" #: library/enum.rst:280 msgid "" "``_ignore_`` is a list of names that will not become members, and whose " "names will also be removed from the completed enumeration. See :ref:" "`TimePeriod ` for an example." msgstr "" #: library/enum.rst:286 msgid "" "Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any " "public methods defined on *self.__class__*::" msgstr "" #: library/enum.rst:0 msgid "name" msgstr "" #: library/enum.rst:307 msgid "The name of the member being defined (e.g. 'RED')." msgstr "" #: library/enum.rst:308 msgid "The start value for the Enum; the default is 1." msgstr "" #: library/enum.rst:0 msgid "count" msgstr "" #: library/enum.rst:309 msgid "The number of members currently defined, not including this one." msgstr "" #: library/enum.rst:0 msgid "last_values" msgstr "" #: library/enum.rst:310 msgid "A list of the previous values." msgstr "" #: library/enum.rst:312 msgid "" "A *staticmethod* that is used to determine the next value returned by :class:" "`auto`::" msgstr "" #: library/enum.rst:328 msgid "" "A *classmethod* that is used to further configure subsequent subclasses. By " "default, does nothing." msgstr "" #: library/enum.rst:333 msgid "" "A *classmethod* for looking up values not found in *cls*. By default it " "does nothing, but can be overridden to implement custom search behavior::" msgstr "" #: library/enum.rst:355 msgid "" "Returns the string used for *repr()* calls. By default, returns the *Enum* " "name, member name, and value, but can be overridden::" msgstr "" #: library/enum.rst:371 msgid "" "Returns the string used for *str()* calls. By default, returns the *Enum* " "name and member name, but can be overridden::" msgstr "" #: library/enum.rst:386 msgid "" "Returns the string used for *format()* and *f-string* calls. By default, " "returns :meth:`__str__` return value, but can be overridden::" msgstr "" #: library/enum.rst:401 msgid "" "Using :class:`auto` with :class:`Enum` results in integers of increasing " "value, starting with ``1``." msgstr "" #: library/enum.rst:404 msgid "Added :ref:`enum-dataclass-support`" msgstr "" #: library/enum.rst:409 msgid "" "*IntEnum* is the same as *Enum*, but its members are also integers and can " "be used anywhere that an integer can be used. If any integer operation is " "performed with an *IntEnum* member, the resulting value loses its " "enumeration status." msgstr "" #: library/enum.rst:430 msgid "" "Using :class:`auto` with :class:`IntEnum` results in integers of increasing " "value, starting with ``1``." msgstr "" #: library/enum.rst:433 msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " "*replacement of existing constants* use-case. :meth:`~object.__format__` was " "already :meth:`!int.__format__` for that same reason." msgstr "" #: library/enum.rst:440 msgid "" "*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. The result of " "any string operation performed on or with a *StrEnum* member is not part of " "the enumeration." msgstr "" #: library/enum.rst:446 msgid "" "There are places in the stdlib that check for an exact :class:`str` instead " "of a :class:`str` subclass (i.e. ``type(unknown) == str`` instead of " "``isinstance(unknown, str)``), and in those locations you will need to use " "``str(StrEnum.member)``." msgstr "" #: library/enum.rst:453 msgid "" "Using :class:`auto` with :class:`StrEnum` results in the lower-cased member " "name as the value." msgstr "" #: library/enum.rst:458 msgid "" ":meth:`~object.__str__` is :meth:`!str.__str__` to better support the " "*replacement of existing constants* use-case. :meth:`~object.__format__` is " "likewise :meth:`!str.__format__` for that same reason." msgstr "" #: library/enum.rst:466 msgid "" "*Flag* members support the bitwise operators ``&`` (*AND*), ``|`` (*OR*), " "``^`` (*XOR*), and ``~`` (*INVERT*); the results of those operators are " "members of the enumeration." msgstr "" #: library/enum.rst:472 msgid "Returns *True* if value is in self::" msgstr "" #: library/enum.rst:493 msgid "Returns all contained non-alias members::" msgstr "" #: library/enum.rst:502 msgid "Aliases are no longer returned during iteration." msgstr "" #: library/enum.rst:506 msgid "Returns number of members in flag::" msgstr "" #: library/enum.rst:515 msgid "Returns *True* if any members in flag, *False* otherwise::" msgstr "" #: library/enum.rst:527 msgid "Returns current flag binary or'ed with other::" msgstr "" #: library/enum.rst:534 msgid "Returns current flag binary and'ed with other::" msgstr "" #: library/enum.rst:543 msgid "Returns current flag binary xor'ed with other::" msgstr "" #: library/enum.rst:552 msgid "Returns all the flags in *type(self)* that are not in self::" msgstr "" #: library/enum.rst:563 msgid "" "Function used to format any remaining unnamed numeric values. Default is " "the value's repr; common choices are :func:`hex` and :func:`oct`." msgstr "" #: library/enum.rst:568 msgid "" "Using :class:`auto` with :class:`Flag` results in integers that are powers " "of two, starting with ``1``." msgstr "" #: library/enum.rst:571 msgid "The *repr()* of zero-valued flags has changed. It is now::" msgstr "" #: library/enum.rst:579 msgid "" "*IntFlag* is the same as *Flag*, but its members are also integers and can " "be used anywhere that an integer can be used." msgstr "" #: library/enum.rst:593 msgid "" "If any integer operation is performed with an *IntFlag* member, the result " "is not an *IntFlag*::" msgstr "" #: library/enum.rst:599 msgid "If a *Flag* operation is performed with an *IntFlag* member and:" msgstr "" #: library/enum.rst:601 msgid "the result is a valid *IntFlag*: an *IntFlag* is returned" msgstr "" #: library/enum.rst:602 msgid "" "the result is not a valid *IntFlag*: the result depends on the " "*FlagBoundary* setting" msgstr "" #: library/enum.rst:604 msgid "The *repr()* of unnamed zero-valued flags has changed. It is now:" msgstr "" #: library/enum.rst:611 msgid "" "Using :class:`auto` with :class:`IntFlag` results in integers that are " "powers of two, starting with ``1``." msgstr "" #: library/enum.rst:616 msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " "*replacement of existing constants* use-case. :meth:`~object.__format__` " "was already :meth:`!int.__format__` for that same reason." msgstr "" #: library/enum.rst:620 msgid "" "Inversion of an :class:`!IntFlag` now returns a positive value that is the " "union of all flags not in the given flag, rather than a negative value. This " "matches the existing :class:`Flag` behavior." msgstr "" #: library/enum.rst:626 msgid "" ":class:`!ReprEnum` uses the :meth:`repr() ` of :class:`Enum`, " "but the :class:`str() ` of the mixed-in data type:" msgstr "" #: library/enum.rst:629 msgid ":meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`" msgstr "" #: library/enum.rst:630 msgid ":meth:`!str.__str__` for :class:`StrEnum`" msgstr "" #: library/enum.rst:632 msgid "" "Inherit from :class:`!ReprEnum` to keep the :class:`str() ` / :func:" "`format` of the mixed-in data type instead of using the :class:`Enum`-" "default :meth:`str() `." msgstr "" #: library/enum.rst:641 msgid "" "*EnumCheck* contains the options used by the :func:`verify` decorator to " "ensure various constraints; failed constraints result in a :exc:`ValueError`." msgstr "" #: library/enum.rst:646 msgid "Ensure that each value has only one name::" msgstr "" #: library/enum.rst:662 msgid "" "Ensure that there are no missing values between the lowest-valued member and " "the highest-valued member::" msgstr "" #: library/enum.rst:677 msgid "" "Ensure that any flag groups/masks contain only named flags -- useful when " "values are specified instead of being generated by :func:`auto`::" msgstr "" #: library/enum.rst:694 msgid "" "CONTINUOUS and NAMED_FLAGS are designed to work with integer-valued members." msgstr "" #: library/enum.rst:700 msgid "" "*FlagBoundary* controls how out-of-range values are handled in *Flag* and " "its subclasses." msgstr "" #: library/enum.rst:705 msgid "" "Out-of-range values cause a :exc:`ValueError` to be raised. This is the " "default for :class:`Flag`::" msgstr "" #: library/enum.rst:723 msgid "" "Out-of-range values have invalid values removed, leaving a valid *Flag* " "value::" msgstr "" #: library/enum.rst:737 msgid "" "Out-of-range values lose their *Flag* membership and revert to :class:`int`." msgstr "" #: library/enum.rst:750 msgid "" "Out-of-range values are kept, and the *Flag* membership is kept. This is the " "default for :class:`IntFlag`::" msgstr "" #: library/enum.rst:767 msgid "Supported ``__dunder__`` names" msgstr "" #: library/enum.rst:769 msgid "" ":attr:`~EnumType.__members__` is a read-only ordered mapping of " "``member_name``:``member`` items. It is only available on the class." msgstr "" #: library/enum.rst:772 msgid "" ":meth:`~object.__new__`, if specified, must create and return the enum " "members; it is also a very good idea to set the member's :attr:`!_value_` " "appropriately. Once all the members are created it is no longer used." msgstr "" #: library/enum.rst:778 msgid "Supported ``_sunder_`` names" msgstr "" #: library/enum.rst:780 msgid "``_name_`` -- name of the member" msgstr "" #: library/enum.rst:781 msgid "" "``_value_`` -- value of the member; can be set / modified in ``__new__``" msgstr "" #: library/enum.rst:783 msgid "" "``_missing_`` -- a lookup function used when a value is not found; may be " "overridden" msgstr "" #: library/enum.rst:785 msgid "" "``_ignore_`` -- a list of names, either as a :class:`list` or a :class:" "`str`, that will not be transformed into members, and will be removed from " "the final class" msgstr "" #: library/enum.rst:788 msgid "" "``_order_`` -- used in Python 2/3 code to ensure member order is consistent " "(class attribute, removed during class creation)" msgstr "" #: library/enum.rst:790 msgid "" "``_generate_next_value_`` -- used to get an appropriate value for an enum " "member; may be overridden" msgstr "" #: library/enum.rst:795 msgid "" "For standard :class:`Enum` classes the next value chosen is the last value " "seen incremented by one." msgstr "" #: library/enum.rst:798 msgid "" "For :class:`Flag` classes the next value chosen will be the next highest " "power-of-two, regardless of the last value seen." msgstr "" #: library/enum.rst:801 msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" msgstr "" #: library/enum.rst:802 msgid "``_ignore_``" msgstr "" #: library/enum.rst:807 msgid "Utilities and Decorators" msgstr "" #: library/enum.rst:811 msgid "" "*auto* can be used in place of a value. If used, the *Enum* machinery will " "call an *Enum*'s :meth:`~Enum._generate_next_value_` to get an appropriate " "value. For *Enum* and *IntEnum* that appropriate value will be the last " "value plus one; for *Flag* and *IntFlag* it will be the first power-of-two " "greater than the highest value; for *StrEnum* it will be the lower-cased " "version of the member's name. Care must be taken if mixing *auto()* with " "manually specified values." msgstr "" #: library/enum.rst:819 msgid "" "*auto* instances are only resolved when at the top level of an assignment:" msgstr "" #: library/enum.rst:821 msgid "``FIRST = auto()`` will work (auto() is replaced with ``1``);" msgstr "" #: library/enum.rst:822 msgid "" "``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` " "is" msgstr "" #: library/enum.rst:823 msgid "used to create the ``SECOND`` enum member;" msgstr "" #: library/enum.rst:824 msgid "" "``THREE = [auto(), -3]`` will *not* work (``, -3`` is used to " "create the ``THREE`` enum member)" msgstr "" #: library/enum.rst:829 msgid "" "In prior versions, ``auto()`` had to be the only thing on the assignment " "line to work properly." msgstr "" #: library/enum.rst:832 msgid "" "``_generate_next_value_`` can be overridden to customize the values used by " "*auto*." msgstr "" #: library/enum.rst:835 msgid "" "in 3.13 the default ``_generate_next_value_`` will always return the highest " "member value incremented by 1, and will fail if any member is an " "incompatible type." msgstr "" #: library/enum.rst:841 msgid "" "A decorator similar to the built-in *property*, but specifically for " "enumerations. It allows member attributes to have the same names as members " "themselves." msgstr "" #: library/enum.rst:845 msgid "" "the *property* and the member must be defined in separate classes; for " "example, the *value* and *name* attributes are defined in the *Enum* class, " "and *Enum* subclasses can define members with the names ``value`` and " "``name``." msgstr "" #: library/enum.rst:854 msgid "" "A :keyword:`class` decorator specifically for enumerations. It searches an " "enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; " "if any are found :exc:`ValueError` is raised with the details::" msgstr "" #: library/enum.rst:872 msgid "" "A :keyword:`class` decorator specifically for enumerations. Members from :" "class:`EnumCheck` are used to specify which constraints should be checked on " "the decorated enumeration." msgstr "" #: library/enum.rst:880 msgid "A decorator for use in enums: its target will become a member." msgstr "" #: library/enum.rst:886 msgid "A decorator for use in enums: its target will not become a member." msgstr "" #: library/enum.rst:892 msgid "" "A decorator to change the :class:`str() ` and :func:`repr` of an enum " "to show its members as belonging to the module instead of its class. Should " "only be used when the enum members are exported to the module global " "namespace (see :class:`re.RegexFlag` for an example)." msgstr "" #: library/enum.rst:902 msgid "Return a list of all power-of-two integers contained in a flag *value*." msgstr "" #: library/enum.rst:909 msgid "Notes" msgstr "" #: library/enum.rst:911 msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`" msgstr "" #: library/enum.rst:913 msgid "" "These three enum types are designed to be drop-in replacements for existing " "integer- and string-based values; as such, they have extra limitations:" msgstr "" #: library/enum.rst:916 msgid "``__str__`` uses the value and not the name of the enum member" msgstr "" #: library/enum.rst:918 msgid "" "``__format__``, because it uses ``__str__``, will also use the value of the " "enum member instead of its name" msgstr "" #: library/enum.rst:921 msgid "" "If you do not need/want those limitations, you can either create your own " "base class by mixing in the ``int`` or ``str`` type yourself::" msgstr "" #: library/enum.rst:928 msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::" msgstr ""