@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.14\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2026-03-23 14:50 +0000\n "
14+ "POT-Creation-Date : 2026-03-25 14:54 +0000\n "
1515"PO-Revision-Date : 2025-09-16 00:01+0000\n "
1616"Last-Translator : python-doc bot, 2026\n "
1717"Language-Team : Swedish (https://app.transifex.com/python-doc/teams/5390/ "
@@ -454,6 +454,31 @@ msgid ""
454454"during class creation)."
455455msgstr ""
456456
457+ msgid ""
458+ "The :attr:`~Enum._order_` attribute can be provided to help keep Python 2 / "
459+ "Python 3 code in sync. It will be checked against the actual order of the "
460+ "enumeration and raise an error if the two do not match::"
461+ msgstr ""
462+
463+ msgid ""
464+ ">>> class Color(Enum):\n"
465+ "... _order_ = 'RED GREEN BLUE'\n"
466+ "... RED = 1\n"
467+ "... BLUE = 3\n"
468+ "... GREEN = 2\n"
469+ "...\n"
470+ "Traceback (most recent call last):\n"
471+ "...\n"
472+ "TypeError: member order does not match _order_:\n"
473+ " ['RED', 'BLUE', 'GREEN']\n"
474+ " ['RED', 'GREEN', 'BLUE']"
475+ msgstr ""
476+
477+ msgid ""
478+ "In Python 2 code the :attr:`~Enum._order_` attribute is necessary as "
479+ "definition order is lost before it can be recorded."
480+ msgstr ""
481+
457482msgid ""
458483"``_ignore_`` is only used during creation and is removed from the "
459484"enumeration once creation is complete."
@@ -513,7 +538,20 @@ msgstr ""
513538
514539msgid ""
515540"A *staticmethod* that is used to determine the next value returned by :class:"
516- "`auto`::"
541+ "`auto`."
542+ msgstr ""
543+
544+ msgid ""
545+ "For standard :class:`Enum` classes the next value chosen is the highest "
546+ "value seen incremented by one."
547+ msgstr ""
548+
549+ msgid ""
550+ "For :class:`Flag` classes the next value chosen will be the next highest "
551+ "power-of-two."
552+ msgstr ""
553+
554+ msgid "This method may be overridden, e.g.::"
517555msgstr ""
518556
519557msgid ""
@@ -529,6 +567,10 @@ msgid ""
529567"9"
530568msgstr ""
531569
570+ msgid ""
571+ "Prior versions would use the last seen value instead of the highest value."
572+ msgstr ""
573+
532574msgid ""
533575"By default, does nothing. If multiple values are given in the member "
534576"assignment, those values become separate arguments to ``__init__``; e.g."
@@ -677,6 +719,9 @@ msgid ""
677719"member."
678720msgstr ""
679721
722+ msgid "See :ref:`multi-value-enum` for an example."
723+ msgstr ""
724+
680725msgid ""
681726"*IntEnum* is the same as :class:`Enum`, but its members are also integers "
682727"and can be used anywhere that an integer can be used. If any integer "
@@ -1055,8 +1100,9 @@ msgstr ""
10551100
10561101msgid ""
10571102":meth:`~Enum.__new__`, if specified, must create and return the enum "
1058- "members; it is also a very good idea to set the member's :attr:`!_value_` "
1059- "appropriately. Once all the members are created it is no longer used."
1103+ "members; it is also a very good idea to set the member's :attr:`~Enum."
1104+ "_value_` appropriately. Once all the members are created it is no longer "
1105+ "used."
10601106msgstr ""
10611107
10621108msgid "Supported ``_sunder_`` names"
@@ -1089,16 +1135,6 @@ msgid ""
10891135"an enum member; may be overridden"
10901136msgstr ""
10911137
1092- msgid ""
1093- "For standard :class:`Enum` classes the next value chosen is the highest "
1094- "value seen incremented by one."
1095- msgstr ""
1096-
1097- msgid ""
1098- "For :class:`Flag` classes the next value chosen will be the next highest "
1099- "power-of-two."
1100- msgstr ""
1101-
11021138msgid ""
11031139":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing "
11041140"member."
0 commit comments