chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
31d7fe01-02a5-4dec-b975-1c6d862fd01a
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,300
supabase-export-v2
c2dcd06faa8e0e3e
.. note:: For standard :class:`Enum` classes the next value chosen is the highest value seen incremented by one. For :class:`Flag` classes the next value chosen will be the next highest power-of-two.
trusted_official_docs
CPython Docs
.. note:: For standard :class:`Enum` classes the next value chosen is the highest value seen incremented by one. For :class:`Flag` classes the next value chosen will be the next highest power-of-two.
.. note:: For standard :class:`Enum` classes the next value chosen is the highest value seen incremented by one. For :class:`Flag` classes the next value chosen will be the next highest power-of-two.
python, official-docs, cpython, P0
Local_Trusted_Corpus
32841c7f-29c2-4f71-acf1-e8c4c13a0abd
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,426
supabase-export-v2
eadebe61a94b6035
Out-of-range values have invalid values removed, leaving a valid :class:`Flag` value:: >>> from enum import Flag, CONFORM, auto >>> class ConformFlag(Flag, boundary=CONFORM): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> ConformFlag(2**2 + 2**4) <ConformFlag.BLUE: 4>
trusted_official_docs
CPython Docs
Out-of-range values have invalid values removed, leaving a valid :class:`Flag` value:: >>> from enum import Flag, CONFORM, auto >>> class ConformFlag(Flag, boundary=CONFORM): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> ConformFlag(2**2 + 2**4) <ConformFlag.BLUE: 4>
Out-of-range values have invalid values removed, leaving a valid :class:`Flag` value:: >>> from enum import Flag, CONFORM, auto >>> class ConformFlag(Flag, boundary=CONFORM): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> ConformFlag(2**2 + 2**4) <ConformFlag.BLUE: 4>
python, official-docs, cpython, P0
Local_Trusted_Corpus
33733d6f-1a48-46bf-8854-09b8437b49d7
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,328
supabase-export-v2
71f493c67280d987
Returns the string used for *format()* and *f-string* calls. By default, returns :meth:`__str__` return value, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __format__(self, spec): ... return f'{sel...
trusted_official_docs
CPython Docs
Returns the string used for *format()* and *f-string* calls. By default, returns :meth:`__str__` return value, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __format__(self, spec): ... return f'{sel...
Returns the string used for *format()* and *f-string* calls. By default, returns :meth:`__str__` return value, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __format__(self, spec): ... return f'{sel...
python, official-docs, cpython, P0
Local_Trusted_Corpus
33f11769-c9fd-40e3-a26a-0c8576d95265
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,312
supabase-export-v2
6a5332c16a50da43
A *classmethod* for looking up values not found in *cls*. By default it does nothing, but can be overridden to implement custom search behavior:: >>> from enum import auto, StrEnum >>> class Build(StrEnum): ... DEBUG = auto() ... OPTIMIZED = auto() ... @classmethod ... def _missing_(cls, value): ... value = value...
trusted_official_docs
CPython Docs
A *classmethod* for looking up values not found in *cls*. By default it does nothing, but can be overridden to implement custom search behavior:: >>> from enum import auto, StrEnum >>> class Build(StrEnum): ... DEBUG = auto() ... OPTIMIZED = auto() ... @classmethod ... def _missing_(cls, value): ... value = value...
A *classmethod* for looking up values not found in *cls*. By default it does nothing, but can be overridden to implement custom search behavior:: >>> from enum import auto, StrEnum >>> class Build(StrEnum): ... DEBUG = auto() ... OPTIMIZED = auto() ... @classmethod ... def _missing_(cls, value): ... value = value...
python, official-docs, cpython, P0
Local_Trusted_Corpus
36f406af-d966-4f8c-8d59-25a6224121be
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,484
supabase-export-v2
29cf47bc2e2abbb1
- ``__format__``, because it uses ``__str__``, will also use the value of the enum member instead of its name 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::
trusted_official_docs
CPython Docs
- ``__format__``, because it uses ``__str__``, will also use the value of the enum member instead of its name 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::
- ``__format__``, because it uses ``__str__``, will also use the value of the enum member instead of its name 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::
python, official-docs, cpython, P0
Local_Trusted_Corpus
379b37c1-0c51-4553-b3c1-8afa2050e126
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,306
supabase-export-v2
bc58ab259d289a9f
By default, does nothing. If multiple values are given in the member assignment, those values become separate arguments to ``__init__``; e.g. >>> from enum import Enum >>> class Weekday(Enum): ... MONDAY = 1, 'Mon'
trusted_official_docs
CPython Docs
By default, does nothing. If multiple values are given in the member assignment, those values become separate arguments to ``__init__``; e.g. >>> from enum import Enum >>> class Weekday(Enum): ... MONDAY = 1, 'Mon'
By default, does nothing. If multiple values are given in the member assignment, those values become separate arguments to ``__init__``; e.g. >>> from enum import Enum >>> class Weekday(Enum): ... MONDAY = 1, 'Mon'
python, official-docs, cpython, P0
Local_Trusted_Corpus
3fdfbc16-2b75-412c-89dd-4a424f0c7fd1
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,291
supabase-export-v2
d4407cc76601d3cd
``_ignore_`` is only used during creation and is removed from the enumeration once creation is complete. ``_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 <enum-time-period>` for an example.
trusted_official_docs
CPython Docs
``_ignore_`` is only used during creation and is removed from the enumeration once creation is complete. ``_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 <enum-time-period>` for an example.
``_ignore_`` is only used during creation and is removed from the enumeration once creation is complete. ``_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 <enum-time-period>` for an example.
python, official-docs, cpython, P0
Local_Trusted_Corpus
480189fb-480d-4679-a182-e5e95eae2a8b
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,316
supabase-export-v2
ce025b33a9af8874
either in the enum class definition or in a mixin class (such as ``int``), all values given in the member assignment will be passed; e.g. >>> from enum import Enum >>> class MyIntEnum(int, Enum): ... TWENTYSIX = '1a', 16
trusted_official_docs
CPython Docs
either in the enum class definition or in a mixin class (such as ``int``), all values given in the member assignment will be passed; e.g. >>> from enum import Enum >>> class MyIntEnum(int, Enum): ... TWENTYSIX = '1a', 16
either in the enum class definition or in a mixin class (such as ``int``), all values given in the member assignment will be passed; e.g. >>> from enum import Enum >>> class MyIntEnum(int, Enum): ... TWENTYSIX = '1a', 16
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a3cdea6-ad9f-4c37-830a-0f874c3320b7
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,357
supabase-export-v2
e575a613f293334e
.. class:: Flag ``Flag`` is the same as :class:`Enum`, but its members support the bitwise operators ``&`` (*AND*), ``|`` (*OR*), ``^`` (*XOR*), and ``~`` (*INVERT*); the results of those operations are (aliases of) members of the enumeration.
trusted_official_docs
CPython Docs
.. class:: Flag ``Flag`` is the same as :class:`Enum`, but its members support the bitwise operators ``&`` (*AND*), ``|`` (*OR*), ``^`` (*XOR*), and ``~`` (*INVERT*); the results of those operations are (aliases of) members of the enumeration.
.. class:: Flag ``Flag`` is the same as :class:`Enum`, but its members support the bitwise operators ``&`` (*AND*), ``|`` (*OR*), ``^`` (*XOR*), and ``~`` (*INVERT*); the results of those operations are (aliases of) members of the enumeration.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4ac6cf99-69bd-460e-9b81-629168995015
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,302
supabase-export-v2
5c123c5604269f77
This method may be overridden, e.g.:: >>> from enum import auto, Enum >>> class PowersOfThree(Enum): ... @staticmethod ... def _generate_next_value_(name, start, count, last_values): ... return 3 ** (count + 1) ... FIRST = auto() ... SECOND = auto() ... >>> PowersOfThree.SECOND.value 9
trusted_official_docs
CPython Docs
This method may be overridden, e.g.:: >>> from enum import auto, Enum >>> class PowersOfThree(Enum): ... @staticmethod ... def _generate_next_value_(name, start, count, last_values): ... return 3 ** (count + 1) ... FIRST = auto() ... SECOND = auto() ... >>> PowersOfThree.SECOND.value 9
This method may be overridden, e.g.:: >>> from enum import auto, Enum >>> class PowersOfThree(Enum): ... @staticmethod ... def _generate_next_value_(name, start, count, last_values): ... return 3 ** (count + 1) ... FIRST = auto() ... SECOND = auto() ... >>> PowersOfThree.SECOND.value 9
python, official-docs, cpython, P0
Local_Trusted_Corpus
4d8683be-e03a-4625-ae23-0d8a513bfbe9
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,434
supabase-export-v2
d1e6bcc389597b8a
.. class:: EnumDict *EnumDict* is a subclass of :class:`dict` that is used as the namespace for defining enum classes (see :ref:`prepare`). It is exposed to allow subclasses of :class:`EnumType` with advanced behavior like having multiple values per member. It should be called with the name of the enum class being cr...
trusted_official_docs
CPython Docs
.. class:: EnumDict *EnumDict* is a subclass of :class:`dict` that is used as the namespace for defining enum classes (see :ref:`prepare`). It is exposed to allow subclasses of :class:`EnumType` with advanced behavior like having multiple values per member. It should be called with the name of the enum class being cr...
.. class:: EnumDict *EnumDict* is a subclass of :class:`dict` that is used as the namespace for defining enum classes (see :ref:`prepare`). It is exposed to allow subclasses of :class:`EnumType` with advanced behavior like having multiple values per member. It should be called with the name of the enum class being cr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5154f248-bf34-4131-812b-8c422b437e30
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,348
supabase-export-v2
2b21848a2187019d
.. class:: StrEnum *StrEnum* is the same as :class:`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.
trusted_official_docs
CPython Docs
.. class:: StrEnum *StrEnum* is the same as :class:`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.
.. class:: StrEnum *StrEnum* is the same as :class:`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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5316a8ce-7da6-4f82-bfa1-1e47806eafbc
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,279
supabase-export-v2
051af4235bb9b68f
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. While mutable/unhashable values, such as :class:`dict`, :class:`list` or a mutable :class:`~dataclasses.dataclass`, can be used, they will have a quadratic performa...
trusted_official_docs
CPython Docs
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. While mutable/unhashable values, such as :class:`dict`, :class:`list` or a mutable :class:`~dataclasses.dataclass`, can be used, they will have a quadratic performa...
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. While mutable/unhashable values, such as :class:`dict`, :class:`list` or a mutable :class:`~dataclasses.dataclass`, can be used, they will have a quadratic performa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
577b4d1c-1766-4c2b-9896-baee264857cb
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,442
supabase-export-v2
a9aba5e8fa1c49fe
Supported ``_sunder_`` names """""""""""""""""""""""""""" - :attr:`~Enum._name_` -- name of the member - :attr:`~Enum._value_` -- value of the member; can be set in ``__new__`` - :meth:`~Enum._missing_` -- a lookup function used when a value is not found; may be overridden - :attr:`~Enum._ignore_` -- a list of names, ...
trusted_official_docs
CPython Docs
Supported ``_sunder_`` names """""""""""""""""""""""""""" - :attr:`~Enum._name_` -- name of the member - :attr:`~Enum._value_` -- value of the member; can be set in ``__new__`` - :meth:`~Enum._missing_` -- a lookup function used when a value is not found; may be overridden - :attr:`~Enum._ignore_` -- a list of names, ...
Supported ``_sunder_`` names """""""""""""""""""""""""""" - :attr:`~Enum._name_` -- name of the member - :attr:`~Enum._value_` -- value of the member; can be set in ``__new__`` - :meth:`~Enum._missing_` -- a lookup function used when a value is not found; may be overridden - :attr:`~Enum._ignore_` -- a list of names, ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
584fca8e-dc05-4c2c-b3bc-fd696bc5d832
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,346
supabase-export-v2
adef4dbe316de71f
Using :class:`auto` with :class:`IntEnum` results in integers of increasing value, starting with ``1``. .. versionchanged:: 3.11 :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 tha...
trusted_official_docs
CPython Docs
Using :class:`auto` with :class:`IntEnum` results in integers of increasing value, starting with ``1``. .. versionchanged:: 3.11 :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 tha...
Using :class:`auto` with :class:`IntEnum` results in integers of increasing value, starting with ``1``. .. versionchanged:: 3.11 :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 tha...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5b381be2-d15f-4d6d-a9ed-be1e041a50d6
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,463
supabase-export-v2
4ee144328bd6048b
: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:: >>> from enum import Enum, unique >>> @unique ... class Mistake(Enum): ... ONE = 1 ... TWO = 2 ... TH...
trusted_official_docs
CPython Docs
: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:: >>> from enum import Enum, unique >>> @unique ... class Mistake(Enum): ... ONE = 1 ... TWO = 2 ... TH...
: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:: >>> from enum import Enum, unique >>> @unique ... class Mistake(Enum): ... ONE = 1 ... TWO = 2 ... TH...
python, official-docs, cpython, P0
Local_Trusted_Corpus
630ff498-85f0-4e92-b576-c93773a2d507
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,446
supabase-export-v2
7889763789942471
- While ``_sunder_`` names are generally reserved for the further development of the :class:`Enum` class and can not be used, some are explicitly allowed: - ``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_
trusted_official_docs
CPython Docs
- While ``_sunder_`` names are generally reserved for the further development of the :class:`Enum` class and can not be used, some are explicitly allowed: - ``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_
- While ``_sunder_`` names are generally reserved for the further development of the :class:`Enum` class and can not be used, some are explicitly allowed: - ``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_
python, official-docs, cpython, P0
Local_Trusted_Corpus
66b6c1fb-f661-4c68-8766-4fa0111780ef
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,392
supabase-export-v2
0c901339b01592a5
... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> Color.RED & 2 <Color: 0> >>> Color.RED | 2 <Color.RED|GREEN: 3> If any integer operation is performed with an *IntFlag* member, the result is not an *IntFlag*::
trusted_official_docs
CPython Docs
... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> Color.RED & 2 <Color: 0> >>> Color.RED | 2 <Color.RED|GREEN: 3> If any integer operation is performed with an *IntFlag* member, the result is not an *IntFlag*::
... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> Color.RED & 2 <Color: 0> >>> Color.RED | 2 <Color.RED|GREEN: 3> If any integer operation is performed with an *IntFlag* member, the result is not an *IntFlag*::
python, official-docs, cpython, P0
Local_Trusted_Corpus
6df06559-0923-432f-92a3-a9df438e971b
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,452
supabase-export-v2
3442d5a59274a9c8
value seen; for :class:`StrEnum` it will be the lower-cased version of the member's name. Care must be taken if mixing *auto()* with manually specified values. *auto* instances are only resolved when at the top level of an assignment, either by itself or as part of a tuple:
trusted_official_docs
CPython Docs
value seen; for :class:`StrEnum` it will be the lower-cased version of the member's name. Care must be taken if mixing *auto()* with manually specified values. *auto* instances are only resolved when at the top level of an assignment, either by itself or as part of a tuple:
value seen; for :class:`StrEnum` it will be the lower-cased version of the member's name. Care must be taken if mixing *auto()* with manually specified values. *auto* instances are only resolved when at the top level of an assignment, either by itself or as part of a tuple:
python, official-docs, cpython, P0
Local_Trusted_Corpus
6f293f0f-2c1c-4126-a612-787ba011cab3
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,351
supabase-export-v2
b5f43e817d7155b2
.. note:: 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(MyStrEnum.MY_MEMBER)``.
trusted_official_docs
CPython Docs
.. note:: 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(MyStrEnum.MY_MEMBER)``.
.. note:: 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(MyStrEnum.MY_MEMBER)``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
714b77c3-936a-4de6-995a-417521c226fc
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,440
supabase-export-v2
92ff136d03b9eb54
:attr:`~EnumType.__members__` is a read-only ordered mapping of ``member_name``:``member`` items. It is only available on the class. :meth:`~Enum.__new__`, if specified, must create and return the enum members; it is also a very good idea to set the member's :attr:`~Enum._value_` appropriately. Once all the members are...
trusted_official_docs
CPython Docs
:attr:`~EnumType.__members__` is a read-only ordered mapping of ``member_name``:``member`` items. It is only available on the class. :meth:`~Enum.__new__`, if specified, must create and return the enum members; it is also a very good idea to set the member's :attr:`~Enum._value_` appropriately. Once all the members are...
:attr:`~EnumType.__members__` is a read-only ordered mapping of ``member_name``:``member`` items. It is only available on the class. :meth:`~Enum.__new__`, if specified, must create and return the enum members; it is also a very good idea to set the member's :attr:`~Enum._value_` appropriately. Once all the members are...
python, official-docs, cpython, P0
Local_Trusted_Corpus
77d2a2fb-bb74-4d9c-86b6-4fa4f7052bb3
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,396
supabase-export-v2
6928c66161a495bf
the result is a valid *IntFlag*: an *IntFlag* is returned * the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting The :func:`repr` of unnamed zero-valued flags has changed. It is now::
trusted_official_docs
CPython Docs
the result is a valid *IntFlag*: an *IntFlag* is returned * the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting The :func:`repr` of unnamed zero-valued flags has changed. It is now::
the result is a valid *IntFlag*: an *IntFlag* is returned * the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting The :func:`repr` of unnamed zero-valued flags has changed. It is now::
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c56db1e-2502-426a-a479-7562a217c664
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,435
supabase-export-v2
395a4a14af09c127
member. It should be called with the name of the enum class being created, otherwise private names and internal classes will not be handled correctly. Note that only the :class:`~collections.abc.MutableMapping` interface (:meth:`~object.__setitem__` and :meth:`~dict.update`) is overridden. It may be possible to bypass...
trusted_official_docs
CPython Docs
member. It should be called with the name of the enum class being created, otherwise private names and internal classes will not be handled correctly. Note that only the :class:`~collections.abc.MutableMapping` interface (:meth:`~object.__setitem__` and :meth:`~dict.update`) is overridden. It may be possible to bypass...
member. It should be called with the name of the enum class being created, otherwise private names and internal classes will not be handled correctly. Note that only the :class:`~collections.abc.MutableMapping` interface (:meth:`~object.__setitem__` and :meth:`~dict.update`) is overridden. It may be possible to bypass...
python, official-docs, cpython, P0
Local_Trusted_Corpus
838626ff-826a-46f2-afdb-51c16b624068
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,325
supabase-export-v2
2d72ca26f8020d70
Returns the string used for *str()* calls. By default, returns the *Enum* name and member name, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __str__(self): ... return f'{self.name}' ... >>> OtherS...
trusted_official_docs
CPython Docs
Returns the string used for *str()* calls. By default, returns the *Enum* name and member name, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __str__(self): ... return f'{self.name}' ... >>> OtherS...
Returns the string used for *str()* calls. By default, returns the *Enum* name and member name, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __str__(self): ... return f'{self.name}' ... >>> OtherS...
python, official-docs, cpython, P0
Local_Trusted_Corpus
880a884f-c873-4eae-b488-3e957310bfa3
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,413
supabase-export-v2
29a8cb788242feb9
Ensure that there are no missing values between the lowest-valued member and the highest-valued member:: >>> from enum import Enum, verify, CONTINUOUS >>> @verify(CONTINUOUS) ... class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 5 Traceback (most recent call last): ... ValueError: invalid enum 'Color': mis...
trusted_official_docs
CPython Docs
Ensure that there are no missing values between the lowest-valued member and the highest-valued member:: >>> from enum import Enum, verify, CONTINUOUS >>> @verify(CONTINUOUS) ... class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 5 Traceback (most recent call last): ... ValueError: invalid enum 'Color': mis...
Ensure that there are no missing values between the lowest-valued member and the highest-valued member:: >>> from enum import Enum, verify, CONTINUOUS >>> @verify(CONTINUOUS) ... class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 5 Traceback (most recent call last): ... ValueError: invalid enum 'Color': mis...
python, official-docs, cpython, P0
Local_Trusted_Corpus
89108c9e-6a3c-4b79-934c-74726cdbb2af
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,429
supabase-export-v2
408ec21bcb5699d9
Out-of-range values lose their :class:`Flag` membership and revert to :class:`int`. >>> from enum import Flag, EJECT, auto >>> class EjectFlag(Flag, boundary=EJECT): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> EjectFlag(2**2 + 2**4) 20
trusted_official_docs
CPython Docs
Out-of-range values lose their :class:`Flag` membership and revert to :class:`int`. >>> from enum import Flag, EJECT, auto >>> class EjectFlag(Flag, boundary=EJECT): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> EjectFlag(2**2 + 2**4) 20
Out-of-range values lose their :class:`Flag` membership and revert to :class:`int`. >>> from enum import Flag, EJECT, auto >>> class EjectFlag(Flag, boundary=EJECT): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> EjectFlag(2**2 + 2**4) 20
python, official-docs, cpython, P0
Local_Trusted_Corpus
8e70a40d-ccd4-4c72-8c77-144add554e18
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,234
supabase-export-v2
a33b905962cdfc8a
Like built-in :func:`bin`, except negative values are represented in two's complement, and the leading bit always indicates sign (``0`` implies positive, ``1`` implies negative). .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.11 ``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``pr...
trusted_official_docs
CPython Docs
Like built-in :func:`bin`, except negative values are represented in two's complement, and the leading bit always indicates sign (``0`` implies positive, ``1`` implies negative). .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.11 ``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``pr...
Like built-in :func:`bin`, except negative values are represented in two's complement, and the leading bit always indicates sign (``0`` implies positive, ``1`` implies negative). .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.11 ``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``pr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
92b014b9-0ec6-4cc4-a662-2093ade01990
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,298
supabase-export-v2
ac44c8b64da46716
for the Enum; the default is 1. :count: The number of members currently defined, not including this one. :last_values: A list of the previous values. A *staticmethod* that is used to determine the next value returned by :class:`auto`.
trusted_official_docs
CPython Docs
for the Enum; the default is 1. :count: The number of members currently defined, not including this one. :last_values: A list of the previous values. A *staticmethod* that is used to determine the next value returned by :class:`auto`.
for the Enum; the default is 1. :count: The number of members currently defined, not including this one. :last_values: A list of the previous values. A *staticmethod* that is used to determine the next value returned by :class:`auto`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9c86232f-fc6c-4577-b3b2-756c3abd313a
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,443
supabase-export-v2
35ab85e85d89dae3
members, and will be removed from the final class - :attr:`~Enum._order_` -- no longer used, kept for backward compatibility (class attribute, removed during class creation) - :meth:`~Enum._generate_next_value_` -- used to get an appropriate value for an enum member; may be overridden
trusted_official_docs
CPython Docs
members, and will be removed from the final class - :attr:`~Enum._order_` -- no longer used, kept for backward compatibility (class attribute, removed during class creation) - :meth:`~Enum._generate_next_value_` -- used to get an appropriate value for an enum member; may be overridden
members, and will be removed from the final class - :attr:`~Enum._order_` -- no longer used, kept for backward compatibility (class attribute, removed during class creation) - :meth:`~Enum._generate_next_value_` -- used to get an appropriate value for an enum member; may be overridden
python, official-docs, cpython, P0
Local_Trusted_Corpus
9c9f84be-c97e-4039-9ddb-e90d173f3c90
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,391
supabase-export-v2
93091d8b154bbbb2
``IntFlag`` is the same as :class:`Flag`, but its members are also integers and can be used anywhere that an integer can be used. >>> from enum import IntFlag, auto >>> class Color(IntFlag): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> Color.RED & 2 <Color: 0> >>> Color.RED | 2 <Color.RED|GREEN...
trusted_official_docs
CPython Docs
``IntFlag`` is the same as :class:`Flag`, but its members are also integers and can be used anywhere that an integer can be used. >>> from enum import IntFlag, auto >>> class Color(IntFlag): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> Color.RED & 2 <Color: 0> >>> Color.RED | 2 <Color.RED|GREEN...
``IntFlag`` is the same as :class:`Flag`, but its members are also integers and can be used anywhere that an integer can be used. >>> from enum import IntFlag, auto >>> class Color(IntFlag): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> Color.RED & 2 <Color: 0> >>> Color.RED | 2 <Color.RED|GREEN...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9f94607f-7f30-46b5-9b3a-08d51d641cb6
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,401
supabase-export-v2
155625650f6d0eb7
: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. Inversion of an :class:`!IntFlag` now returns a positive value that is the union of all flags not in the given fla...
trusted_official_docs
CPython Docs
: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. Inversion of an :class:`!IntFlag` now returns a positive value that is the union of all flags not in the given fla...
: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. Inversion of an :class:`!IntFlag` now returns a positive value that is the union of all flags not in the given fla...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a427076b-c203-4f5f-b12c-a2a560733f42
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,445
supabase-export-v2
cba76414ac6a8dde
adds a new name as an alias to an existing member. - :meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an existing member. - While ``_sunder_`` names are generally reserved for the further development of the :class:`Enum` class and can not be used, some are explicitly allowed:
trusted_official_docs
CPython Docs
adds a new name as an alias to an existing member. - :meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an existing member. - While ``_sunder_`` names are generally reserved for the further development of the :class:`Enum` class and can not be used, some are explicitly allowed:
adds a new name as an alias to an existing member. - :meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an existing member. - While ``_sunder_`` names are generally reserved for the further development of the :class:`Enum` class and can not be used, some are explicitly allowed:
python, official-docs, cpython, P0
Local_Trusted_Corpus
a94644bb-7dd3-4ae8-abbf-b5f4f2af0640
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,432
supabase-export-v2
f94d41af7c12c1ea
Out-of-range values are kept, and the :class:`Flag` membership is kept. This is the default for :class:`IntFlag`:: >>> from enum import Flag, KEEP, auto >>> class KeepFlag(Flag, boundary=KEEP): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> KeepFlag(2**2 + 2**4) <KeepFlag.BLUE|16: 20>
trusted_official_docs
CPython Docs
Out-of-range values are kept, and the :class:`Flag` membership is kept. This is the default for :class:`IntFlag`:: >>> from enum import Flag, KEEP, auto >>> class KeepFlag(Flag, boundary=KEEP): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> KeepFlag(2**2 + 2**4) <KeepFlag.BLUE|16: 20>
Out-of-range values are kept, and the :class:`Flag` membership is kept. This is the default for :class:`IntFlag`:: >>> from enum import Flag, KEEP, auto >>> class KeepFlag(Flag, boundary=KEEP): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> KeepFlag(2**2 + 2**4) <KeepFlag.BLUE|16: 20>
python, official-docs, cpython, P0
Local_Trusted_Corpus
aba30b70-68f6-4213-93e9-92123451d379
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,395
supabase-export-v2
9743df918b2d6e55
If a :class:`Flag` operation is performed with an *IntFlag* member and: * the result is a valid *IntFlag*: an *IntFlag* is returned * the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting
trusted_official_docs
CPython Docs
If a :class:`Flag` operation is performed with an *IntFlag* member and: * the result is a valid *IntFlag*: an *IntFlag* is returned * the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting
If a :class:`Flag` operation is performed with an *IntFlag* member and: * the result is a valid *IntFlag*: an *IntFlag* is returned * the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting
python, official-docs, cpython, P0
Local_Trusted_Corpus
af57d24a-bead-4c3f-b672-d19d523abe01
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,278
supabase-export-v2
dc0b3b9d53b1c967
.. note:: Enum member values 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.
trusted_official_docs
CPython Docs
.. note:: Enum member values 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.
.. note:: Enum member values 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b32c6a17-d47f-45a1-80e7-73e7eca8f69f
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,451
supabase-export-v2
b12d706509af1e57
.. class:: auto *auto* can be used in place of a value. If used, the *Enum* machinery will call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an appropriate value. For :class:`Enum` and :class:`IntEnum` that appropriate value will be the highest value seen plus one; for :class:`Flag` and :class:`IntFl...
trusted_official_docs
CPython Docs
.. class:: auto *auto* can be used in place of a value. If used, the *Enum* machinery will call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an appropriate value. For :class:`Enum` and :class:`IntEnum` that appropriate value will be the highest value seen plus one; for :class:`Flag` and :class:`IntFl...
.. class:: auto *auto* can be used in place of a value. If used, the *Enum* machinery will call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an appropriate value. For :class:`Enum` and :class:`IntEnum` that appropriate value will be the highest value seen plus one; for :class:`Flag` and :class:`IntFl...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b6a421d0-e2ea-4537-a9d7-d88cd03f2353
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,245
supabase-export-v2
db6c50b2503b97f5
* to use the ``cls`` enum to create a new enum (only if the existing enum does not have any members): :cls: The enum class being called. :value: The name of the new Enum to create. :names: The names/values of the members for the new Enum. :module: The name of the module the new Enum is created in. :qualname: The actual...
trusted_official_docs
CPython Docs
* to use the ``cls`` enum to create a new enum (only if the existing enum does not have any members): :cls: The enum class being called. :value: The name of the new Enum to create. :names: The names/values of the members for the new Enum. :module: The name of the module the new Enum is created in. :qualname: The actual...
* to use the ``cls`` enum to create a new enum (only if the existing enum does not have any members): :cls: The enum class being called. :value: The name of the new Enum to create. :names: The names/values of the members for the new Enum. :module: The name of the module the new Enum is created in. :qualname: The actual...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bd7b6433-909f-4e34-adbf-d796a2171cf1
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,416
supabase-export-v2
4a9d6796fee9b1e0
Ensure that any flag groups/masks contain only named flags -- useful when values are specified instead of being generated by :func:`auto`:: >>> from enum import Flag, verify, NAMED_FLAGS >>> @verify(NAMED_FLAGS) ... class Color(Flag): ... RED = 1 ... GREEN = 2 ... BLUE = 4 ... WHITE = 15 ... NEON = 31 Traceback...
trusted_official_docs
CPython Docs
Ensure that any flag groups/masks contain only named flags -- useful when values are specified instead of being generated by :func:`auto`:: >>> from enum import Flag, verify, NAMED_FLAGS >>> @verify(NAMED_FLAGS) ... class Color(Flag): ... RED = 1 ... GREEN = 2 ... BLUE = 4 ... WHITE = 15 ... NEON = 31 Traceback...
Ensure that any flag groups/masks contain only named flags -- useful when values are specified instead of being generated by :func:`auto`:: >>> from enum import Flag, verify, NAMED_FLAGS >>> @verify(NAMED_FLAGS) ... class Color(Flag): ... RED = 1 ... GREEN = 2 ... BLUE = 4 ... WHITE = 15 ... NEON = 31 Traceback...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c10258cd-1040-4246-835e-cc0ed65d2037
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,296
supabase-export-v2
4ef4fe23eaa4b32f
6 ... SUNDAY = 7 ... @classmethod ... def today(cls): ... print(f'today is {cls(dt.date.today().isoweekday()).name}') ... >>> dir(Weekday.SATURDAY) ['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', 'today', 'value'] .. method:: Enum._generate_next_value_(name, start, count, last_values)
trusted_official_docs
CPython Docs
6 ... SUNDAY = 7 ... @classmethod ... def today(cls): ... print(f'today is {cls(dt.date.today().isoweekday()).name}') ... >>> dir(Weekday.SATURDAY) ['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', 'today', 'value'] .. method:: Enum._generate_next_value_(name, start, count, last_values)
6 ... SUNDAY = 7 ... @classmethod ... def today(cls): ... print(f'today is {cls(dt.date.today().isoweekday()).name}') ... >>> dir(Weekday.SATURDAY) ['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', 'today', 'value'] .. method:: Enum._generate_next_value_(name, start, count, last_values)
python, official-docs, cpython, P0
Local_Trusted_Corpus
c3f64fcc-23da-4099-9e12-e8b0727915ad
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,217
supabase-export-v2
8a57d15a71142cdf
:class:`auto` 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.
trusted_official_docs
CPython Docs
:class:`auto` 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.
:class:`auto` 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c4c1895f-2edf-415e-b269-c91bce695870
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,343
supabase-export-v2
2449790ee210e67f
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. >>> from enum import IntEnum >>> class Number(IntEnum): ... ONE = 1 ... TWO = 2 ... THREE = 3 ... >>> Number.THREE <Number.THREE: 3> >>> Number.ONE + Number...
trusted_official_docs
CPython Docs
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. >>> from enum import IntEnum >>> class Number(IntEnum): ... ONE = 1 ... TWO = 2 ... THREE = 3 ... >>> Number.THREE <Number.THREE: 3> >>> Number.ONE + Number...
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. >>> from enum import IntEnum >>> class Number(IntEnum): ... ONE = 1 ... TWO = 2 ... THREE = 3 ... >>> Number.THREE <Number.THREE: 3> >>> Number.ONE + Number...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c83a8dfe-562d-4621-bade-ecc7beae1dd4
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,478
supabase-export-v2
6bfa12dd8540bcbf
Like built-in :func:`bin`, except negative values are represented in two's complement, and the leading bit always indicates sign (``0`` implies positive, ``1`` implies negative). >>> import enum >>> enum.bin(10) '0b0 1010' >>> enum.bin(~10) # ~10 is -11 '0b1 0101'
trusted_official_docs
CPython Docs
Like built-in :func:`bin`, except negative values are represented in two's complement, and the leading bit always indicates sign (``0`` implies positive, ``1`` implies negative). >>> import enum >>> enum.bin(10) '0b0 1010' >>> enum.bin(~10) # ~10 is -11 '0b1 0101'
Like built-in :func:`bin`, except negative values are represented in two's complement, and the leading bit always indicates sign (``0`` implies positive, ``1`` implies negative). >>> import enum >>> enum.bin(10) '0b0 1010' >>> enum.bin(~10) # ~10 is -11 '0b1 0101'
python, official-docs, cpython, P0
Local_Trusted_Corpus
ceaf5467-c8bc-4e48-a325-cb1166cf1903
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,410
supabase-export-v2
8b7895e55f1a5186
Ensure that each value has only one name:: >>> from enum import Enum, verify, UNIQUE >>> @verify(UNIQUE) ... class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 3 ... CRIMSON = 1 Traceback (most recent call last): ... ValueError: aliases found in <enum 'Color'>: CRIMSON -> RED
trusted_official_docs
CPython Docs
Ensure that each value has only one name:: >>> from enum import Enum, verify, UNIQUE >>> @verify(UNIQUE) ... class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 3 ... CRIMSON = 1 Traceback (most recent call last): ... ValueError: aliases found in <enum 'Color'>: CRIMSON -> RED
Ensure that each value has only one name:: >>> from enum import Enum, verify, UNIQUE >>> @verify(UNIQUE) ... class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 3 ... CRIMSON = 1 Traceback (most recent call last): ... ValueError: aliases found in <enum 'Color'>: CRIMSON -> RED
python, official-docs, cpython, P0
Local_Trusted_Corpus
cebcf13b-4ae9-4497-8f8d-240c0a59b121
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,322
supabase-export-v2
7a963d3fd2c822e6
Returns the string used for *repr()* calls. By default, returns the *Enum* name, member name, and value, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __repr__(self): ... cls_name = self.__class__._...
trusted_official_docs
CPython Docs
Returns the string used for *repr()* calls. By default, returns the *Enum* name, member name, and value, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __repr__(self): ... cls_name = self.__class__._...
Returns the string used for *repr()* calls. By default, returns the *Enum* name, member name, and value, but can be overridden:: >>> from enum import auto, Enum >>> class OtherStyle(Enum): ... ALTERNATE = auto() ... OTHER = auto() ... SOMETHING_ELSE = auto() ... def __repr__(self): ... cls_name = self.__class__._...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d0f60952-d951-46ef-91ca-c8dabe2c0531
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,244
supabase-export-v2
cdaaa3ab69ae7a46
:cls: The enum class being called. :value: The value to lookup. * to use the ``cls`` enum to create a new enum (only if the existing enum does not have any members):
trusted_official_docs
CPython Docs
:cls: The enum class being called. :value: The value to lookup. * to use the ``cls`` enum to create a new enum (only if the existing enum does not have any members):
:cls: The enum class being called. :value: The value to lookup. * to use the ``cls`` enum to create a new enum (only if the existing enum does not have any members):
python, official-docs, cpython, P0
Local_Trusted_Corpus
d184af70-bf30-40ec-8d1f-5f8532b22f9b
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,229
supabase-export-v2
32e6fa77b462d9f6
:func:`global_enum` Modify the :class:`str() <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.
trusted_official_docs
CPython Docs
:func:`global_enum` Modify the :class:`str() <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.
:func:`global_enum` Modify the :class:`str() <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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d6aa5288-e2c5-4806-80a3-ee3b13d976e6
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,285
supabase-export-v2
aab943b0499f9821
3 code in sync. It will be checked against the actual order of the enumeration and raise an error if the two do not match:: >>> class Color(Enum): ... _order_ = 'RED GREEN BLUE' ... RED = 1 ... BLUE = 3 ... GREEN = 2 ... Traceback (most recent call last): ... TypeError: member order does not match _order_: ['RED...
trusted_official_docs
CPython Docs
3 code in sync. It will be checked against the actual order of the enumeration and raise an error if the two do not match:: >>> class Color(Enum): ... _order_ = 'RED GREEN BLUE' ... RED = 1 ... BLUE = 3 ... GREEN = 2 ... Traceback (most recent call last): ... TypeError: member order does not match _order_: ['RED...
3 code in sync. It will be checked against the actual order of the enumeration and raise an error if the two do not match:: >>> class Color(Enum): ... _order_ = 'RED GREEN BLUE' ... RED = 1 ... BLUE = 3 ... GREEN = 2 ... Traceback (most recent call last): ... TypeError: member order does not match _order_: ['RED...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dbff0065-4ae3-4342-9ee0-db15d5d5218c
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,303
supabase-export-v2
e2c41fbcdd5a600d
... def _generate_next_value_(name, start, count, last_values): ... return 3 ** (count + 1) ... FIRST = auto() ... SECOND = auto() ... >>> PowersOfThree.SECOND.value 9 .. versionadded:: 3.6 .. versionchanged:: 3.13 Prior versions would use the last seen value instead of the highest value.
trusted_official_docs
CPython Docs
... def _generate_next_value_(name, start, count, last_values): ... return 3 ** (count + 1) ... FIRST = auto() ... SECOND = auto() ... >>> PowersOfThree.SECOND.value 9 .. versionadded:: 3.6 .. versionchanged:: 3.13 Prior versions would use the last seen value instead of the highest value.
... def _generate_next_value_(name, start, count, last_values): ... return 3 ** (count + 1) ... FIRST = auto() ... SECOND = auto() ... >>> PowersOfThree.SECOND.value 9 .. versionadded:: 3.6 .. versionchanged:: 3.13 Prior versions would use the last seen value instead of the highest value.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ea843292-f211-44ea-a9eb-43716f74931c
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,299
supabase-export-v2
b77eaef29141eba7
A *staticmethod* that is used to determine the next value returned by :class:`auto`. .. note:: For standard :class:`Enum` classes the next value chosen is the highest value seen incremented by one.
trusted_official_docs
CPython Docs
A *staticmethod* that is used to determine the next value returned by :class:`auto`. .. note:: For standard :class:`Enum` classes the next value chosen is the highest value seen incremented by one.
A *staticmethod* that is used to determine the next value returned by :class:`auto`. .. note:: For standard :class:`Enum` classes the next value chosen is the highest value seen incremented by one.
python, official-docs, cpython, P0
Local_Trusted_Corpus
eb21f48b-30e3-4479-aae5-92e413a6dc4d
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,189
supabase-export-v2
72c3b9fcd25a188b
canonical (i.e. non-alias) members in definition order * uses *call* syntax to return members by value * uses *index* syntax to return members by name Enumerations are created either by using :keyword:`class` syntax, or by using function-call syntax::
trusted_official_docs
CPython Docs
canonical (i.e. non-alias) members in definition order * uses *call* syntax to return members by value * uses *index* syntax to return members by name Enumerations are created either by using :keyword:`class` syntax, or by using function-call syntax::
canonical (i.e. non-alias) members in definition order * uses *call* syntax to return members by value * uses *index* syntax to return members by name Enumerations are created either by using :keyword:`class` syntax, or by using function-call syntax::
python, official-docs, cpython, P0
Local_Trusted_Corpus
f360e15e-eb22-419f-abae-77b75d855203
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,315
supabase-export-v2
f7cbd11ab243e672
.. method:: Enum.__new__(cls, *args, **kwds) By default, doesn't exist. If specified, either in the enum class definition or in a mixin class (such as ``int``), all values given in the member assignment will be passed; e.g.
trusted_official_docs
CPython Docs
.. method:: Enum.__new__(cls, *args, **kwds) By default, doesn't exist. If specified, either in the enum class definition or in a mixin class (such as ``int``), all values given in the member assignment will be passed; e.g.
.. method:: Enum.__new__(cls, *args, **kwds) By default, doesn't exist. If specified, either in the enum class definition or in a mixin class (such as ``int``), all values given in the member assignment will be passed; e.g.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f82573de-5bc8-42fe-80c1-384afd953200
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,360
supabase-export-v2
170a1732d6423da5
Returns *True* if value is in self:: >>> from enum import Flag, auto >>> class Color(Flag): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> purple = Color.RED | Color.BLUE >>> white = Color.RED | Color.GREEN | Color.BLUE >>> Color.GREEN in purple False >>> Color.GREEN in white True >>> purple i...
trusted_official_docs
CPython Docs
Returns *True* if value is in self:: >>> from enum import Flag, auto >>> class Color(Flag): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> purple = Color.RED | Color.BLUE >>> white = Color.RED | Color.GREEN | Color.BLUE >>> Color.GREEN in purple False >>> Color.GREEN in white True >>> purple i...
Returns *True* if value is in self:: >>> from enum import Flag, auto >>> class Color(Flag): ... RED = auto() ... GREEN = auto() ... BLUE = auto() ... >>> purple = Color.RED | Color.BLUE >>> white = Color.RED | Color.GREEN | Color.BLUE >>> Color.GREEN in purple False >>> Color.GREEN in white True >>> purple i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fb2a527c-a10a-43b9-802d-993e279498e0
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,195
supabase-export-v2
0b3dca54bb4ddb19
.. note:: Nomenclature - The class :class:`!Color` is an *enumeration* (or *enum*) - The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are *enumeration members* (or *members*) and are functionally constants. - The enum members have *names* and *values* (the name of :attr:`!Color.RED` is ``RED``, the val...
trusted_official_docs
CPython Docs
.. note:: Nomenclature - The class :class:`!Color` is an *enumeration* (or *enum*) - The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are *enumeration members* (or *members*) and are functionally constants. - The enum members have *names* and *values* (the name of :attr:`!Color.RED` is ``RED``, the val...
.. note:: Nomenclature - The class :class:`!Color` is an *enumeration* (or *enum*) - The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are *enumeration members* (or *members*) and are functionally constants. - The enum members have *names* and *values* (the name of :attr:`!Color.RED` is ``RED``, the val...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fb342db3-91a9-48d2-b081-d0ee6ba6c1ee
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,192
supabase-export-v2
a8155ae82ec916b0
>>> # class syntax >>> class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 3 >>> # functional syntax >>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])
trusted_official_docs
CPython Docs
>>> # class syntax >>> class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 3 >>> # functional syntax >>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])
>>> # class syntax >>> class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 3 >>> # functional syntax >>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])
python, official-docs, cpython, P0
Local_Trusted_Corpus
fc5dd3c0-5830-4f42-9b64-10b38399b526
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,188
supabase-export-v2
d9282858f66ba009
An enumeration: * is a set of symbolic names (members) bound to unique values * can be iterated over to return its canonical (i.e. non-alias) members in definition order * uses *call* syntax to return members by value * uses *index* syntax to return members by name
trusted_official_docs
CPython Docs
An enumeration: * is a set of symbolic names (members) bound to unique values * can be iterated over to return its canonical (i.e. non-alias) members in definition order * uses *call* syntax to return members by value * uses *index* syntax to return members by name
An enumeration: * is a set of symbolic names (members) bound to unique values * can be iterated over to return its canonical (i.e. non-alias) members in definition order * uses *call* syntax to return members by value * uses *index* syntax to return members by name
python, official-docs, cpython, P0
Local_Trusted_Corpus
fcb5654f-b73b-4ec4-96f4-1dbb27c66bdf
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,193
supabase-export-v2
bd344608daf4eac1
>>> # functional syntax >>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)]) Even though we can use :keyword:`class` syntax to create Enums, Enums are not normal Python classes. See :ref:`How are Enums different? <enum-class-differences>` for more details.
trusted_official_docs
CPython Docs
>>> # functional syntax >>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)]) Even though we can use :keyword:`class` syntax to create Enums, Enums are not normal Python classes. See :ref:`How are Enums different? <enum-class-differences>` for more details.
>>> # functional syntax >>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)]) Even though we can use :keyword:`class` syntax to create Enums, Enums are not normal Python classes. See :ref:`How are Enums different? <enum-class-differences>` for more details.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fcdf9941-482a-4f1c-9bd9-30ada3aa5a9b
CPython Docs
file://datasets/cpython/Doc/library/enum.rst
unknown
a38f5727-9108-4b49-a985-c6ddcaba72f4
50,482
supabase-export-v2
9eb8ffdb6b1e1392
These three enum types are designed to be drop-in replacements for existing integer- and string-based values; as such, they have extra limitations: - ``__str__`` uses the value and not the name of the enum member
trusted_official_docs
CPython Docs
These three enum types are designed to be drop-in replacements for existing integer- and string-based values; as such, they have extra limitations: - ``__str__`` uses the value and not the name of the enum member
These three enum types are designed to be drop-in replacements for existing integer- and string-based values; as such, they have extra limitations: - ``__str__`` uses the value and not the name of the enum member
python, official-docs, cpython, P0
Local_Trusted_Corpus
4680c870-65dc-46f4-a430-40e8876db3a2
CPython Docs
file://datasets/cpython/Doc/library/pyclbr.rst
unknown
9e95d4fb-60d6-4dd6-8a56-3b8e3488336a
50,495
supabase-export-v2
a52e77566e113f2a
module within a package. If given, *path* is a sequence of directory paths prepended to ``sys.path``, which is used to locate the module source code. This function is the original interface and is only kept for back compatibility. It returns a filtered version of the following.
trusted_official_docs
CPython Docs
module within a package. If given, *path* is a sequence of directory paths prepended to ``sys.path``, which is used to locate the module source code. This function is the original interface and is only kept for back compatibility. It returns a filtered version of the following.
module within a package. If given, *path* is a sequence of directory paths prepended to ``sys.path``, which is used to locate the module source code. This function is the original interface and is only kept for back compatibility. It returns a filtered version of the following.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4adcfbab-1b41-40d0-8917-957e56d1f6f9
CPython Docs
file://datasets/cpython/Doc/library/pyclbr.rst
unknown
9e95d4fb-60d6-4dd6-8a56-3b8e3488336a
50,494
supabase-export-v2
caacad778183ca28
.. function:: readmodule(module, path=None) Return a dictionary mapping module-level class names to class descriptors. If possible, descriptors for imported base classes are included. Parameter *module* is a string with the name of the module to read; it may be the name of a module within a package. If given, *path...
trusted_official_docs
CPython Docs
.. function:: readmodule(module, path=None) Return a dictionary mapping module-level class names to class descriptors. If possible, descriptors for imported base classes are included. Parameter *module* is a string with the name of the module to read; it may be the name of a module within a package. If given, *path...
.. function:: readmodule(module, path=None) Return a dictionary mapping module-level class names to class descriptors. If possible, descriptors for imported base classes are included. Parameter *module* is a string with the name of the module to read; it may be the name of a module within a package. If given, *path...
python, official-docs, cpython, P0
Local_Trusted_Corpus
82223f3a-82e6-4225-a9de-88a46cb4f81e
CPython Docs
file://datasets/cpython/Doc/library/pyclbr.rst
unknown
9e95d4fb-60d6-4dd6-8a56-3b8e3488336a
50,492
supabase-export-v2
24308b2f16899341
-------------- The :mod:`!pyclbr` module provides limited information about the functions, classes, and methods defined in a Python-coded module. The information is sufficient to implement a module browser. The information is extracted from the Python source code rather than by importing the module, so this module is s...
trusted_official_docs
CPython Docs
-------------- The :mod:`!pyclbr` module provides limited information about the functions, classes, and methods defined in a Python-coded module. The information is sufficient to implement a module browser. The information is extracted from the Python source code rather than by importing the module, so this module is s...
-------------- The :mod:`!pyclbr` module provides limited information about the functions, classes, and methods defined in a Python-coded module. The information is sufficient to implement a module browser. The information is extracted from the Python source code rather than by importing the module, so this module is s...
python, official-docs, cpython, P0
Local_Trusted_Corpus
82c861d1-267b-451e-83aa-887fd1e8bbce
CPython Docs
file://datasets/cpython/Doc/library/pyclbr.rst
unknown
9e95d4fb-60d6-4dd6-8a56-3b8e3488336a
50,499
supabase-export-v2
cbaf884576d151df
.. versionadded:: 3.7 Descriptors for nested definitions. They are accessed through the new children attribute. Each has a new parent attribute. The descriptors returned by these functions are instances of Function and Class classes. Users are not expected to create instances of these classes.
trusted_official_docs
CPython Docs
.. versionadded:: 3.7 Descriptors for nested definitions. They are accessed through the new children attribute. Each has a new parent attribute. The descriptors returned by these functions are instances of Function and Class classes. Users are not expected to create instances of these classes.
.. versionadded:: 3.7 Descriptors for nested definitions. They are accessed through the new children attribute. Each has a new parent attribute. The descriptors returned by these functions are instances of Function and Class classes. Users are not expected to create instances of these classes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9a4507a2-0a1e-46e7-a792-3b835c49cbcb
CPython Docs
file://datasets/cpython/Doc/library/pyclbr.rst
unknown
9e95d4fb-60d6-4dd6-8a56-3b8e3488336a
50,497
supabase-export-v2
12f98b24ea872e04
.. function:: readmodule_ex(module, path=None) Return a dictionary-based tree containing a function or class descriptors for each function and class defined in the module with a ``def`` or ``class`` statement. The returned dictionary maps module-level function and class names to their descriptors. Nested objects ar...
trusted_official_docs
CPython Docs
.. function:: readmodule_ex(module, path=None) Return a dictionary-based tree containing a function or class descriptors for each function and class defined in the module with a ``def`` or ``class`` statement. The returned dictionary maps module-level function and class names to their descriptors. Nested objects ar...
.. function:: readmodule_ex(module, path=None) Return a dictionary-based tree containing a function or class descriptors for each function and class defined in the module with a ``def`` or ``class`` statement. The returned dictionary maps module-level function and class names to their descriptors. Nested objects ar...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a12c38e1-af5b-4df2-8ed2-3fc4559e405a
CPython Docs
file://datasets/cpython/Doc/library/pyclbr.rst
unknown
9e95d4fb-60d6-4dd6-8a56-3b8e3488336a
50,498
supabase-export-v2
6cb12f9a1f0588a3
If the module being read is a package, the returned dictionary has a key ``'__path__'`` whose value is a list containing the package search path. .. versionadded:: 3.7 Descriptors for nested definitions. They are accessed through the new children attribute. Each has a new parent attribute.
trusted_official_docs
CPython Docs
If the module being read is a package, the returned dictionary has a key ``'__path__'`` whose value is a list containing the package search path. .. versionadded:: 3.7 Descriptors for nested definitions. They are accessed through the new children attribute. Each has a new parent attribute.
If the module being read is a package, the returned dictionary has a key ``'__path__'`` whose value is a list containing the package search path. .. versionadded:: 3.7 Descriptors for nested definitions. They are accessed through the new children attribute. Each has a new parent attribute.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c28ecf34-3aef-43c0-8cd7-bff02ca43a86
CPython Docs
file://datasets/cpython/Doc/library/pyclbr.rst
unknown
9e95d4fb-60d6-4dd6-8a56-3b8e3488336a
50,530
supabase-export-v2
53a1de117a190699
.. attribute:: super A list of :class:`!Class` objects which describe the immediate base classes of the class being described. Classes which are named as superclasses but which are not discoverable by :func:`readmodule_ex` are listed as a string with the class name instead of as :class:`!Class` objects.
trusted_official_docs
CPython Docs
.. attribute:: super A list of :class:`!Class` objects which describe the immediate base classes of the class being described. Classes which are named as superclasses but which are not discoverable by :func:`readmodule_ex` are listed as a string with the class name instead of as :class:`!Class` objects.
.. attribute:: super A list of :class:`!Class` objects which describe the immediate base classes of the class being described. Classes which are named as superclasses but which are not discoverable by :func:`readmodule_ex` are listed as a string with the class name instead of as :class:`!Class` objects.
python, official-docs, cpython, P0
Local_Trusted_Corpus
010b0761-6444-42c7-8611-dbb9a35c89f6
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,843
supabase-export-v2
323d3e5a2554aa8b
+-------------------+-----------------------------+ | O flag | "unseen" label | +-------------------+-----------------------------+ | D flag | "deleted" label | +-------------------+-----------------------------+ | A flag | "answered" label | +-------------------+-----------------------------+ When a :class:`!mboxMessa...
trusted_official_docs
CPython Docs
+-------------------+-----------------------------+ | O flag | "unseen" label | +-------------------+-----------------------------+ | D flag | "deleted" label | +-------------------+-----------------------------+ | A flag | "answered" label | +-------------------+-----------------------------+ When a :class:`!mboxMessa...
+-------------------+-----------------------------+ | O flag | "unseen" label | +-------------------+-----------------------------+ | D flag | "deleted" label | +-------------------+-----------------------------+ | A flag | "answered" label | +-------------------+-----------------------------+ When a :class:`!mboxMessa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
017fa356-779b-480e-95c2-25883a7f0075
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,585
supabase-export-v2
3dbf874891fc59aa
.. method:: get_string(key) Return a string representation of the message corresponding to *key*, or raise a :exc:`KeyError` exception if no such message exists. The message is processed through :class:`email.message.Message` to convert it to a 7bit clean representation.
trusted_official_docs
CPython Docs
.. method:: get_string(key) Return a string representation of the message corresponding to *key*, or raise a :exc:`KeyError` exception if no such message exists. The message is processed through :class:`email.message.Message` to convert it to a 7bit clean representation.
.. method:: get_string(key) Return a string representation of the message corresponding to *key*, or raise a :exc:`KeyError` exception if no such message exists. The message is processed through :class:`email.message.Message` to convert it to a 7bit clean representation.
python, official-docs, cpython, P0
Local_Trusted_Corpus
01d04718-7112-4a44-8c1f-ddbeca7fa65f
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,823
supabase-export-v2
e667190b8c84cf53
Marked for subsequent deletion | +------+----------+--------------------------------+ | F | Flagged | Marked as important | +------+----------+--------------------------------+ | A | Answered | Replied to | +------+----------+--------------------------------+ The "R" and "O" flags are stored in the :mailheader:`Status`...
trusted_official_docs
CPython Docs
Marked for subsequent deletion | +------+----------+--------------------------------+ | F | Flagged | Marked as important | +------+----------+--------------------------------+ | A | Answered | Replied to | +------+----------+--------------------------------+ The "R" and "O" flags are stored in the :mailheader:`Status`...
Marked for subsequent deletion | +------+----------+--------------------------------+ | F | Flagged | Marked as important | +------+----------+--------------------------------+ | A | Answered | Replied to | +------+----------+--------------------------------+ The "R" and "O" flags are stored in the :mailheader:`Status`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
022d921f-0f1b-4296-b0ed-b7b3eb9637ba
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,742
supabase-export-v2
692cab8bfc926be8
.. class:: Babyl(path, factory=None, create=True) A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter *factory* is a callable object that accepts a file-like message representation (which behaves as if opened in binary mode) and returns a custom representation. If *factory* is ``None``, :class:`Ba...
trusted_official_docs
CPython Docs
.. class:: Babyl(path, factory=None, create=True) A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter *factory* is a callable object that accepts a file-like message representation (which behaves as if opened in binary mode) and returns a custom representation. If *factory* is ``None``, :class:`Ba...
.. class:: Babyl(path, factory=None, create=True) A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter *factory* is a callable object that accepts a file-like message representation (which behaves as if opened in binary mode) and returns a custom representation. If *factory* is ``None``, :class:`Ba...
python, official-docs, cpython, P0
Local_Trusted_Corpus
04767c1f-379e-4993-83b6-af57a9a94a10
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,938
supabase-export-v2
3de0542fd0c02afd
import mailbox for message in mailbox.mbox('~/mbox'): subject = message['subject'] # Could possibly be None. if subject and 'python' in subject.lower(): print(subject) To copy all mail from a Babyl mailbox to an MH mailbox, converting all of the format-specific information that can be converted::
trusted_official_docs
CPython Docs
import mailbox for message in mailbox.mbox('~/mbox'): subject = message['subject'] # Could possibly be None. if subject and 'python' in subject.lower(): print(subject) To copy all mail from a Babyl mailbox to an MH mailbox, converting all of the format-specific information that can be converted::
import mailbox for message in mailbox.mbox('~/mbox'): subject = message['subject'] # Could possibly be None. if subject and 'python' in subject.lower(): print(subject) To copy all mail from a Babyl mailbox to an MH mailbox, converting all of the format-specific information that can be converted::
python, official-docs, cpython, P0
Local_Trusted_Corpus
07c70425-c471-4d09-a56d-f2992abaf82b
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,892
supabase-export-v2
205406616435ddc5
| "unseen" label | no R flag | +------------------+----------------------------------------------+ | "deleted" label | D flag | +------------------+----------------------------------------------+ | "answered" label | A flag | +------------------+----------------------------------------------+ When a :class:`!BabylMessa...
trusted_official_docs
CPython Docs
| "unseen" label | no R flag | +------------------+----------------------------------------------+ | "deleted" label | D flag | +------------------+----------------------------------------------+ | "answered" label | A flag | +------------------+----------------------------------------------+ When a :class:`!BabylMessa...
| "unseen" label | no R flag | +------------------+----------------------------------------------+ | "deleted" label | D flag | +------------------+----------------------------------------------+ | "answered" label | A flag | +------------------+----------------------------------------------+ When a :class:`!BabylMessa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
091feb36-77a7-4e5d-8776-52718ec7987b
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,946
supabase-export-v2
05fe7b5904044834
for name in list_names: list_id = message['list-id'] if list_id and name in list_id: # Get mailbox to use box = boxes[name] # Write copy to disk before removing original. # If there's a crash, you might duplicate a message, but # that's better than losing a message completely. box.lock() box.add(message) box.flush()...
trusted_official_docs
CPython Docs
for name in list_names: list_id = message['list-id'] if list_id and name in list_id: # Get mailbox to use box = boxes[name] # Write copy to disk before removing original. # If there's a crash, you might duplicate a message, but # that's better than losing a message completely. box.lock() box.add(message) box.flush()...
for name in list_names: list_id = message['list-id'] if list_id and name in list_id: # Get mailbox to use box = boxes[name] # Write copy to disk before removing original. # If there's a crash, you might duplicate a message, but # that's better than losing a message completely. box.lock() box.add(message) box.flush()...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0d2ccc80-14a2-42de-8ea3-532402beda14
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,888
supabase-export-v2
99a40e6d8e84600b
:mailheader:`Date`, :mailheader:`From`, :mailheader:`Reply-To`, :mailheader:`To`, :mailheader:`CC`, and :mailheader:`Subject` that are present in the original headers but not the visible headers are added to the visible headers. When a :class:`!BabylMessage` instance is created based upon a :class:`MaildirMessage` inst...
trusted_official_docs
CPython Docs
:mailheader:`Date`, :mailheader:`From`, :mailheader:`Reply-To`, :mailheader:`To`, :mailheader:`CC`, and :mailheader:`Subject` that are present in the original headers but not the visible headers are added to the visible headers. When a :class:`!BabylMessage` instance is created based upon a :class:`MaildirMessage` inst...
:mailheader:`Date`, :mailheader:`From`, :mailheader:`Reply-To`, :mailheader:`To`, :mailheader:`CC`, and :mailheader:`Subject` that are present in the original headers but not the visible headers are added to the visible headers. When a :class:`!BabylMessage` instance is created based upon a :class:`MaildirMessage` inst...
python, official-docs, cpython, P0
Local_Trusted_Corpus
136569f2-1c21-4364-b1af-ab029379347d
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,838
supabase-export-v2
af18708a8fc8ceb6
created based upon a :class:`MaildirMessage` instance, a "From " line is generated based upon the :class:`MaildirMessage` instance's delivery date, and the following conversions take place: +-----------------+-------------------------------+ | Resulting state | :class:`MaildirMessage` state | +=================+=======...
trusted_official_docs
CPython Docs
created based upon a :class:`MaildirMessage` instance, a "From " line is generated based upon the :class:`MaildirMessage` instance's delivery date, and the following conversions take place: +-----------------+-------------------------------+ | Resulting state | :class:`MaildirMessage` state | +=================+=======...
created based upon a :class:`MaildirMessage` instance, a "From " line is generated based upon the :class:`MaildirMessage` instance's delivery date, and the following conversions take place: +-----------------+-------------------------------+ | Resulting state | :class:`MaildirMessage` state | +=================+=======...
python, official-docs, cpython, P0
Local_Trusted_Corpus
15f2cf3d-3f99-460a-8486-d1ad2912cc23
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,557
supabase-export-v2
627a97fbae213547
(e.g., if it's an :class:`mboxMessage` instance and this is an :class:`mbox` instance), its format-specific information is used. Otherwise, reasonable defaults for format-specific information are used. .. versionchanged:: 3.2 Support for binary input was added.
trusted_official_docs
CPython Docs
(e.g., if it's an :class:`mboxMessage` instance and this is an :class:`mbox` instance), its format-specific information is used. Otherwise, reasonable defaults for format-specific information are used. .. versionchanged:: 3.2 Support for binary input was added.
(e.g., if it's an :class:`mboxMessage` instance and this is an :class:`mbox` instance), its format-specific information is used. Otherwise, reasonable defaults for format-specific information are used. .. versionchanged:: 3.2 Support for binary input was added.
python, official-docs, cpython, P0
Local_Trusted_Corpus
16cd2507-3a15-4fa3-b038-49044247cf16
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,799
supabase-export-v2
9e08b450e160cfad
.. method:: add_flag(flag) Set the flag(s) specified by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character. The current "info" is overwritten whether or not it contains experimental information rather than flags.
trusted_official_docs
CPython Docs
.. method:: add_flag(flag) Set the flag(s) specified by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character. The current "info" is overwritten whether or not it contains experimental information rather than flags.
.. method:: add_flag(flag) Set the flag(s) specified by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character. The current "info" is overwritten whether or not it contains experimental information rather than flags.
python, official-docs, cpython, P0
Local_Trusted_Corpus
177e62fd-444b-48cd-89d9-46f5a6587d29
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,619
supabase-export-v2
c9481f82ddf77643
It is for historical reasons that *dirname* is named as such rather than *path*. Maildir is a directory-based mailbox format invented for the qmail mail transfer agent and now widely supported by other programs. Messages in a Maildir mailbox are stored in separate files within a common directory structure. This desi...
trusted_official_docs
CPython Docs
It is for historical reasons that *dirname* is named as such rather than *path*. Maildir is a directory-based mailbox format invented for the qmail mail transfer agent and now widely supported by other programs. Messages in a Maildir mailbox are stored in separate files within a common directory structure. This desi...
It is for historical reasons that *dirname* is named as such rather than *path*. Maildir is a directory-based mailbox format invented for the qmail mail transfer agent and now widely supported by other programs. Messages in a Maildir mailbox are stored in separate files within a common directory structure. This desi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
19e9d85d-dfaf-4b38-9c16-fb97e79e2e47
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,791
supabase-export-v2
6db12ad6a26bd635
.. note:: A message is typically moved from :file:`new` to :file:`cur` after its mailbox has been accessed, whether or not the message has been read. A message ``msg`` has been read if ``"S" in msg.get_flags()`` is ``True``.
trusted_official_docs
CPython Docs
.. note:: A message is typically moved from :file:`new` to :file:`cur` after its mailbox has been accessed, whether or not the message has been read. A message ``msg`` has been read if ``"S" in msg.get_flags()`` is ``True``.
.. note:: A message is typically moved from :file:`new` to :file:`cur` after its mailbox has been accessed, whether or not the message has been read. A message ``msg`` has been read if ``"S" in msg.get_flags()`` is ``True``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1db18332-554e-4a30-9ddd-0320ee327744
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,637
supabase-export-v2
5538f7264f742cb0
.. method:: clean() Delete temporary files from the mailbox that have not been accessed in the last 36 hours. The Maildir specification says that mail-reading programs should do this occasionally.
trusted_official_docs
CPython Docs
.. method:: clean() Delete temporary files from the mailbox that have not been accessed in the last 36 hours. The Maildir specification says that mail-reading programs should do this occasionally.
.. method:: clean() Delete temporary files from the mailbox that have not been accessed in the last 36 hours. The Maildir specification says that mail-reading programs should do this occasionally.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f985dfb-996e-4ecf-8ba9-ab655000021b
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,795
supabase-export-v2
83d17cc3673ae739
.. method:: get_flags() Return a string specifying the flags that are currently set. If the message complies with the standard Maildir format, the result is the concatenation in alphabetical order of zero or one occurrence of each of ``'D'``, ``'F'``, ``'P'``, ``'R'``, ``'S'``, and ``'T'``. The empty string is retu...
trusted_official_docs
CPython Docs
.. method:: get_flags() Return a string specifying the flags that are currently set. If the message complies with the standard Maildir format, the result is the concatenation in alphabetical order of zero or one occurrence of each of ``'D'``, ``'F'``, ``'P'``, ``'R'``, ``'S'``, and ``'T'``. The empty string is retu...
.. method:: get_flags() Return a string specifying the flags that are currently set. If the message complies with the standard Maildir format, the result is the concatenation in alphabetical order of zero or one occurrence of each of ``'D'``, ``'F'``, ``'P'``, ``'R'``, ``'S'``, and ``'T'``. The empty string is retu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
27c11ac0-9ee9-4437-8e0e-09c6e6c40cb3
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,649
supabase-export-v2
7c3dc17e32440378
.. method:: add_flag(key, flag) On the message corresponding to *key*, set the flags specified by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character.
trusted_official_docs
CPython Docs
.. method:: add_flag(key, flag) On the message corresponding to *key*, set the flags specified by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character.
.. method:: add_flag(key, flag) On the message corresponding to *key*, set the flags specified by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2a62413c-e115-4fb7-9a7e-56d41950c89c
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,900
supabase-export-v2
c883fa6c200a9ecb
Conventional flags for MMDF messages are identical to those of mbox message and are as follows: +------+----------+--------------------------------+ | Flag | Meaning | Explanation | +======+==========+================================+ | R | Read | Read | +------+----------+--------------------------------+ | O | O...
trusted_official_docs
CPython Docs
Conventional flags for MMDF messages are identical to those of mbox message and are as follows: +------+----------+--------------------------------+ | Flag | Meaning | Explanation | +======+==========+================================+ | R | Read | Read | +------+----------+--------------------------------+ | O | O...
Conventional flags for MMDF messages are identical to those of mbox message and are as follows: +------+----------+--------------------------------+ | Flag | Meaning | Explanation | +======+==========+================================+ | R | Read | Read | +------+----------+--------------------------------+ | O | O...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2bb42fdc-99ee-4e41-9206-b35d425d6ad0
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,587
supabase-export-v2
f652837fd1ffd12d
.. method:: get_file(key) Return a :term:`file-like <file-like object>` representation of the message corresponding to *key*, or raise a :exc:`KeyError` exception if no such message exists. The file-like object behaves as if open in binary mode. This file should be closed once it is no longer needed.
trusted_official_docs
CPython Docs
.. method:: get_file(key) Return a :term:`file-like <file-like object>` representation of the message corresponding to *key*, or raise a :exc:`KeyError` exception if no such message exists. The file-like object behaves as if open in binary mode. This file should be closed once it is no longer needed.
.. method:: get_file(key) Return a :term:`file-like <file-like object>` representation of the message corresponding to *key*, or raise a :exc:`KeyError` exception if no such message exists. The file-like object behaves as if open in binary mode. This file should be closed once it is no longer needed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2d1ddd20-5c04-41b6-8eab-6d4d9446565d
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,654
supabase-export-v2
2fb326e390bdda1f
by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character. Considerations for using this method versus the message object's :meth:`~MaildirMessage.remove_flag` method are similar to those for :meth:`set_flags`; see the discussion there.
trusted_official_docs
CPython Docs
by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character. Considerations for using this method versus the message object's :meth:`~MaildirMessage.remove_flag` method are similar to those for :meth:`set_flags`; see the discussion there.
by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character. Considerations for using this method versus the message object's :meth:`~MaildirMessage.remove_flag` method are similar to those for :meth:`set_flags`; see the discussion there.
python, official-docs, cpython, P0
Local_Trusted_Corpus
305969d6-4385-44b5-9015-0e60bbac7e2c
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,598
supabase-export-v2
6eaa5942c1dcc6b3
.. method:: pop(key, default=None) Return a representation of the message corresponding to *key* and delete the message. If no such message exists, return *default*. The message is represented as an instance of the appropriate format-specific :class:`Message` subclass unless a custom message factory was specified w...
trusted_official_docs
CPython Docs
.. method:: pop(key, default=None) Return a representation of the message corresponding to *key* and delete the message. If no such message exists, return *default*. The message is represented as an instance of the appropriate format-specific :class:`Message` subclass unless a custom message factory was specified w...
.. method:: pop(key, default=None) Return a representation of the message corresponding to *key* and delete the message. If no such message exists, return *default*. The message is represented as an instance of the appropriate format-specific :class:`Message` subclass unless a custom message factory was specified w...
python, official-docs, cpython, P0
Local_Trusted_Corpus
306a47fa-03fc-430c-9f0a-6c7fe2ad4748
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,841
supabase-export-v2
684d7f249c4dcdb4
+-------------------+--------------------------+ | O flag | "unseen" sequence | +-------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------+--------------------------+ | A flag | "replied" sequence | +-------------------+--------------------------+ When an :class:`!mboxMessage`...
trusted_official_docs
CPython Docs
+-------------------+--------------------------+ | O flag | "unseen" sequence | +-------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------+--------------------------+ | A flag | "replied" sequence | +-------------------+--------------------------+ When an :class:`!mboxMessage`...
+-------------------+--------------------------+ | O flag | "unseen" sequence | +-------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------+--------------------------+ | A flag | "replied" sequence | +-------------------+--------------------------+ When an :class:`!mboxMessage`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
33583511-3f3c-4751-bd80-5bfa8a461798
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,945
supabase-export-v2
07a2090bf9b55206
for key in inbox.iterkeys(): try: message = inbox[key] except email.errors.MessageParseError: continue # The message is malformed. Just leave it. for name in list_names: list_id = message['list-id'] if list_id and name in list_id: # Get mailbox to use box = boxes[name]
trusted_official_docs
CPython Docs
for key in inbox.iterkeys(): try: message = inbox[key] except email.errors.MessageParseError: continue # The message is malformed. Just leave it. for name in list_names: list_id = message['list-id'] if list_id and name in list_id: # Get mailbox to use box = boxes[name]
for key in inbox.iterkeys(): try: message = inbox[key] except email.errors.MessageParseError: continue # The message is malformed. Just leave it. for name in list_names: list_id = message['list-id'] if list_id and name in list_id: # Get mailbox to use box = boxes[name]
python, official-docs, cpython, P0
Local_Trusted_Corpus
33f0d8b4-1d91-41dd-955d-880953a7ef5a
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,849
supabase-export-v2
6aae5b4663e8c8c0
A message with MH-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor. MH messages do not support marks or flags in the traditional sense, but they do support sequences, which are logical groupings of arbitrary messages. Some mail reading programs (although not the st...
trusted_official_docs
CPython Docs
A message with MH-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor. MH messages do not support marks or flags in the traditional sense, but they do support sequences, which are logical groupings of arbitrary messages. Some mail reading programs (although not the st...
A message with MH-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor. MH messages do not support marks or flags in the traditional sense, but they do support sequences, which are logical groupings of arbitrary messages. Some mail reading programs (although not the st...
python, official-docs, cpython, P0
Local_Trusted_Corpus
392be178-a67f-4bfd-bcc9-b1d9c4dc0f78
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,729
supabase-export-v2
bd87b62eb19796a9
.. method:: lock() unlock() Three locking mechanisms are used---dot locking and, if available, the :c:func:`!flock` and :c:func:`!lockf` system calls. For MH mailboxes, locking the mailbox means locking the :file:`.mh_sequences` file and, only for the duration of any operations that affect them, locking individual m...
trusted_official_docs
CPython Docs
.. method:: lock() unlock() Three locking mechanisms are used---dot locking and, if available, the :c:func:`!flock` and :c:func:`!lockf` system calls. For MH mailboxes, locking the mailbox means locking the :file:`.mh_sequences` file and, only for the duration of any operations that affect them, locking individual m...
.. method:: lock() unlock() Three locking mechanisms are used---dot locking and, if available, the :c:func:`!flock` and :c:func:`!lockf` system calls. For MH mailboxes, locking the mailbox means locking the :file:`.mh_sequences` file and, only for the duration of any operations that affect them, locking individual m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
39ed4bce-da3b-4302-90a1-90cd9644ec8f
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,606
supabase-export-v2
564355393f61e22a
.. method:: flush() Write any pending changes to the filesystem. For some :class:`Mailbox` subclasses, changes are always written immediately and :meth:`!flush` does nothing, but you should still make a habit of calling this method.
trusted_official_docs
CPython Docs
.. method:: flush() Write any pending changes to the filesystem. For some :class:`Mailbox` subclasses, changes are always written immediately and :meth:`!flush` does nothing, but you should still make a habit of calling this method.
.. method:: flush() Write any pending changes to the filesystem. For some :class:`Mailbox` subclasses, changes are always written immediately and :meth:`!flush` does nothing, but you should still make a habit of calling this method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3a21ade9-acc5-48d2-91fa-4a9073d958e2
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,545
supabase-export-v2
a2ef98cd39babcf6
defines an interface and is not intended to be instantiated. Instead, format-specific subclasses should inherit from :class:`!Mailbox` and your code should instantiate a particular subclass. The :class:`!Mailbox` interface is dictionary-like, with small keys corresponding to messages. Keys are issued by the :class:`!M...
trusted_official_docs
CPython Docs
defines an interface and is not intended to be instantiated. Instead, format-specific subclasses should inherit from :class:`!Mailbox` and your code should instantiate a particular subclass. The :class:`!Mailbox` interface is dictionary-like, with small keys corresponding to messages. Keys are issued by the :class:`!M...
defines an interface and is not intended to be instantiated. Instead, format-specific subclasses should inherit from :class:`!Mailbox` and your code should instantiate a particular subclass. The :class:`!Mailbox` interface is dictionary-like, with small keys corresponding to messages. Keys are issued by the :class:`!M...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3c44ec7d-bdff-4e53-a0be-794aaf3da9cb
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,646
supabase-export-v2
48a38ff1fa144164
but faster, because it does not open the message file. If you do have a :class:`MaildirMessage` object, use its :meth:`~MaildirMessage.set_flags` method instead, because changes made with this mailbox method will not be visible to the message object's method, :meth:`~MaildirMessage.get_flags`.
trusted_official_docs
CPython Docs
but faster, because it does not open the message file. If you do have a :class:`MaildirMessage` object, use its :meth:`~MaildirMessage.set_flags` method instead, because changes made with this mailbox method will not be visible to the message object's method, :meth:`~MaildirMessage.get_flags`.
but faster, because it does not open the message file. If you do have a :class:`MaildirMessage` object, use its :meth:`~MaildirMessage.set_flags` method instead, because changes made with this mailbox method will not be visible to the message object's method, :meth:`~MaildirMessage.get_flags`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3d017522-77d4-43a2-a831-23c18c36ecf1
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,787
supabase-export-v2
a0d820b9c9892afc
Replied | Replied to | +------+---------+--------------------------------+ | S | Seen | Read | +------+---------+--------------------------------+ | T | Trashed | Marked for subsequent deletion | +------+---------+--------------------------------+ :class:`!MaildirMessage` instances offer the following methods:
trusted_official_docs
CPython Docs
Replied | Replied to | +------+---------+--------------------------------+ | S | Seen | Read | +------+---------+--------------------------------+ | T | Trashed | Marked for subsequent deletion | +------+---------+--------------------------------+ :class:`!MaildirMessage` instances offer the following methods:
Replied | Replied to | +------+---------+--------------------------------+ | S | Seen | Read | +------+---------+--------------------------------+ | T | Trashed | Marked for subsequent deletion | +------+---------+--------------------------------+ :class:`!MaildirMessage` instances offer the following methods:
python, official-docs, cpython, P0
Local_Trusted_Corpus
3f3e2a00-065e-44e0-8978-820bab421131
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,608
supabase-export-v2
c235459b340b96df
.. method:: lock() Acquire an exclusive advisory lock on the mailbox so that other processes know not to modify it. An :exc:`ExternalClashError` is raised if the lock is not available. The particular locking mechanisms used depend upon the mailbox format. You should *always* lock the mailbox before making any modif...
trusted_official_docs
CPython Docs
.. method:: lock() Acquire an exclusive advisory lock on the mailbox so that other processes know not to modify it. An :exc:`ExternalClashError` is raised if the lock is not available. The particular locking mechanisms used depend upon the mailbox format. You should *always* lock the mailbox before making any modif...
.. method:: lock() Acquire an exclusive advisory lock on the mailbox so that other processes know not to modify it. An :exc:`ExternalClashError` is raised if the lock is not available. The particular locking mechanisms used depend upon the mailbox format. You should *always* lock the mailbox before making any modif...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4034b284-3d95-4c40-8339-43742b5b8551
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,640
supabase-export-v2
a980d92b75f73688
faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get. If you do have a :class:`MaildirMessage` object, use its :meth:`~MaildirMessage.get_flags` method instead, because changes made by the message's :meth:`~MaildirMessage.se...
trusted_official_docs
CPython Docs
faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get. If you do have a :class:`MaildirMessage` object, use its :meth:`~MaildirMessage.get_flags` method instead, because changes made by the message's :meth:`~MaildirMessage.se...
faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get. If you do have a :class:`MaildirMessage` object, use its :meth:`~MaildirMessage.get_flags` method instead, because changes made by the message's :meth:`~MaildirMessage.se...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4048b744-aa8f-41c0-a2c3-cd5c351d2834
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,699
supabase-export-v2
2cd2b74f3b92af95
`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <https://www.jwz.org/doc/content-length.html>`_ An argument for using the original mbox format rather than a variation. `"mbox" is a family of several mutually incompatible mailbox formats <https://www.loc.gov/preservation/digital/formats/fdd/fdd0...
trusted_official_docs
CPython Docs
`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <https://www.jwz.org/doc/content-length.html>`_ An argument for using the original mbox format rather than a variation. `"mbox" is a family of several mutually incompatible mailbox formats <https://www.loc.gov/preservation/digital/formats/fdd/fdd0...
`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <https://www.jwz.org/doc/content-length.html>`_ An argument for using the original mbox format rather than a variation. `"mbox" is a family of several mutually incompatible mailbox formats <https://www.loc.gov/preservation/digital/formats/fdd/fdd0...
python, official-docs, cpython, P0
Local_Trusted_Corpus
43a2fb39-4fd1-4edb-af2a-461d25f5b8f4
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,556
supabase-export-v2
fc746082c6d38c48
Add *message* to the mailbox and return the key that has been assigned to it. Parameter *message* may be a :class:`Message` instance, an :class:`email.message.Message` instance, a string, a byte string, or a file-like object (which should be open in binary mode). If *message* is an instance of the appropriate forma...
trusted_official_docs
CPython Docs
Add *message* to the mailbox and return the key that has been assigned to it. Parameter *message* may be a :class:`Message` instance, an :class:`email.message.Message` instance, a string, a byte string, or a file-like object (which should be open in binary mode). If *message* is an instance of the appropriate forma...
Add *message* to the mailbox and return the key that has been assigned to it. Parameter *message* may be a :class:`Message` instance, an :class:`email.message.Message` instance, a string, a byte string, or a file-like object (which should be open in binary mode). If *message* is an instance of the appropriate forma...
python, official-docs, cpython, P0
Local_Trusted_Corpus
43c23b26-df72-4ddc-a1d4-957be876443b
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,821
supabase-export-v2
fff3853b8df5268d
indicate the state of the message, such as whether it has been read or marked as important, are typically stored in :mailheader:`Status` and :mailheader:`X-Status` headers. Conventional flags for mbox messages are as follows:
trusted_official_docs
CPython Docs
indicate the state of the message, such as whether it has been read or marked as important, are typically stored in :mailheader:`Status` and :mailheader:`X-Status` headers. Conventional flags for mbox messages are as follows:
indicate the state of the message, such as whether it has been read or marked as important, are typically stored in :mailheader:`Status` and :mailheader:`X-Status` headers. Conventional flags for mbox messages are as follows:
python, official-docs, cpython, P0
Local_Trusted_Corpus
43e72046-17de-4a0a-b3e5-793fd650bbb9
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,706
supabase-export-v2
19a3ffc961391272
it does not modify and is not affected by the :file:`context` or :file:`.mh_profile` files that are used by :program:`mh` to store its state and configuration. :class:`!MH` instances have all of the methods of :class:`Mailbox` in addition to the following:
trusted_official_docs
CPython Docs
it does not modify and is not affected by the :file:`context` or :file:`.mh_profile` files that are used by :program:`mh` to store its state and configuration. :class:`!MH` instances have all of the methods of :class:`Mailbox` in addition to the following:
it does not modify and is not affected by the :file:`context` or :file:`.mh_profile` files that are used by :program:`mh` to store its state and configuration. :class:`!MH` instances have all of the methods of :class:`Mailbox` in addition to the following:
python, official-docs, cpython, P0
Local_Trusted_Corpus
4411b1b5-d928-48fc-8906-894c4b0d9769
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,885
supabase-export-v2
f85f6b63f2d88505
.. method:: set_visible(visible) Set the message's visible headers to be the same as the headers in *message*. Parameter *visible* should be a :class:`Message` instance, an :class:`email.message.Message` instance, a string, or a file-like object (which should be open in text mode).
trusted_official_docs
CPython Docs
.. method:: set_visible(visible) Set the message's visible headers to be the same as the headers in *message*. Parameter *visible* should be a :class:`Message` instance, an :class:`email.message.Message` instance, a string, or a file-like object (which should be open in text mode).
.. method:: set_visible(visible) Set the message's visible headers to be the same as the headers in *message*. Parameter *visible* should be a :class:`Message` instance, an :class:`email.message.Message` instance, a string, or a file-like object (which should be open in text mode).
python, official-docs, cpython, P0
Local_Trusted_Corpus
442e62f8-83a5-4660-914a-59fa6831c8fe
CPython Docs
file://datasets/cpython/Doc/library/mailbox.rst
unknown
0846099f-ac60-4881-88e4-45e8ce607a85
50,656
supabase-export-v2
ef72fdbaa17b9189
.. method:: get_info(key) Return a string containing the info for the message corresponding to *key*. This is the same as ``get_message(key).get_info()`` but much faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get.
trusted_official_docs
CPython Docs
.. method:: get_info(key) Return a string containing the info for the message corresponding to *key*. This is the same as ``get_message(key).get_info()`` but much faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get.
.. method:: get_info(key) Return a string containing the info for the message corresponding to *key*. This is the same as ``get_message(key).get_info()`` but much faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get.
python, official-docs, cpython, P0
Local_Trusted_Corpus