88msgstr ""
99"Project-Id-Version : Python 3.12\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2023-11-30 00:03+0000\n "
11+ "POT-Creation-Date : 2024-06-20 00:03+0000\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1313"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
1414"
Language-Team :
LANGUAGE <[email protected] >\n "
@@ -972,78 +972,78 @@ msgstr ""
972972msgid "names of pseudo-flags are constructed from their members' names::"
973973msgstr ""
974974
975- #: ../../howto/enum.rst:1132
975+ #: ../../howto/enum.rst:1140
976976msgid "multi-bit flags, aka aliases, can be returned from operations::"
977977msgstr ""
978978
979- #: ../../howto/enum.rst:1143
979+ #: ../../howto/enum.rst:1151
980980msgid ""
981981"membership / containment checking: zero-valued flags are always considered "
982982"to be contained::"
983983msgstr ""
984984
985- #: ../../howto/enum.rst:1149
985+ #: ../../howto/enum.rst:1157
986986msgid ""
987987"otherwise, only if all bits of one flag are in the other flag will True be "
988988"returned::"
989989msgstr ""
990990
991- #: ../../howto/enum.rst:1158
991+ #: ../../howto/enum.rst:1166
992992msgid ""
993993"There is a new boundary mechanism that controls how out-of-range / invalid "
994994"bits are handled: ``STRICT``, ``CONFORM``, ``EJECT``, and ``KEEP``:"
995995msgstr ""
996996
997- #: ../../howto/enum.rst:1161
997+ #: ../../howto/enum.rst:1169
998998msgid "STRICT --> raises an exception when presented with invalid values"
999999msgstr ""
10001000
1001- #: ../../howto/enum.rst:1162
1001+ #: ../../howto/enum.rst:1170
10021002msgid "CONFORM --> discards any invalid bits"
10031003msgstr ""
10041004
1005- #: ../../howto/enum.rst:1163
1005+ #: ../../howto/enum.rst:1171
10061006msgid "EJECT --> lose Flag status and become a normal int with the given value"
10071007msgstr ""
10081008
1009- #: ../../howto/enum.rst:1164
1009+ #: ../../howto/enum.rst:1172
10101010msgid "KEEP --> keep the extra bits"
10111011msgstr ""
10121012
1013- #: ../../howto/enum.rst:1166
1013+ #: ../../howto/enum.rst:1174
10141014msgid "keeps Flag status and extra bits"
10151015msgstr ""
10161016
1017- #: ../../howto/enum.rst:1167
1017+ #: ../../howto/enum.rst:1175
10181018msgid "extra bits do not show up in iteration"
10191019msgstr ""
10201020
1021- #: ../../howto/enum.rst:1168
1021+ #: ../../howto/enum.rst:1176
10221022msgid "extra bits do show up in repr() and str()"
10231023msgstr ""
10241024
1025- #: ../../howto/enum.rst:1170
1025+ #: ../../howto/enum.rst:1178
10261026msgid ""
10271027"The default for Flag is ``STRICT``, the default for ``IntFlag`` is "
10281028"``EJECT``, and the default for ``_convert_`` is ``KEEP`` (see ``ssl."
10291029"Options`` for an example of when ``KEEP`` is needed)."
10301030msgstr ""
10311031
1032- #: ../../howto/enum.rst:1178
1032+ #: ../../howto/enum.rst:1186
10331033msgid "How are Enums and Flags different?"
10341034msgstr ""
10351035
1036- #: ../../howto/enum.rst:1180
1036+ #: ../../howto/enum.rst:1188
10371037msgid ""
10381038"Enums have a custom metaclass that affects many aspects of both derived :"
10391039"class:`Enum` classes and their instances (members)."
10401040msgstr ""
10411041
1042- #: ../../howto/enum.rst:1185
1042+ #: ../../howto/enum.rst:1193
10431043msgid "Enum Classes"
10441044msgstr ""
10451045
1046- #: ../../howto/enum.rst:1187
1046+ #: ../../howto/enum.rst:1195
10471047msgid ""
10481048"The :class:`EnumType` metaclass is responsible for providing the :meth:"
10491049"`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that "
@@ -1054,11 +1054,11 @@ msgid ""
10541054"`__getnewargs__`, :meth:`__str__` and :meth:`__repr__`)."
10551055msgstr ""
10561056
1057- #: ../../howto/enum.rst:1196
1057+ #: ../../howto/enum.rst:1204
10581058msgid "Flag Classes"
10591059msgstr ""
10601060
1061- #: ../../howto/enum.rst:1198
1061+ #: ../../howto/enum.rst:1206
10621062msgid ""
10631063"Flags have an expanded view of aliasing: to be canonical, the value of a "
10641064"flag needs to be a power-of-two value, and not a duplicate name. So, in "
@@ -1067,11 +1067,11 @@ msgid ""
10671067"considered an alias."
10681068msgstr ""
10691069
1070- #: ../../howto/enum.rst:1204
1070+ #: ../../howto/enum.rst:1212
10711071msgid "Enum Members (aka instances)"
10721072msgstr ""
10731073
1074- #: ../../howto/enum.rst:1206
1074+ #: ../../howto/enum.rst:1214
10751075msgid ""
10761076"The most interesting thing about enum members is that they are singletons. :"
10771077"class:`EnumType` creates them all while it is creating the enum class "
@@ -1080,193 +1080,193 @@ msgid ""
10801080"instances."
10811081msgstr ""
10821082
1083- #: ../../howto/enum.rst:1212
1083+ #: ../../howto/enum.rst:1220
10841084msgid "Flag Members"
10851085msgstr ""
10861086
1087- #: ../../howto/enum.rst:1214
1087+ #: ../../howto/enum.rst:1222
10881088msgid ""
10891089"Flag members can be iterated over just like the :class:`Flag` class, and "
10901090"only the canonical members will be returned. For example::"
10911091msgstr ""
10921092
1093- #: ../../howto/enum.rst:1220
1093+ #: ../../howto/enum.rst:1228
10941094msgid "(Note that ``BLACK``, ``PURPLE``, and ``WHITE`` do not show up.)"
10951095msgstr ""
10961096
1097- #: ../../howto/enum.rst:1222
1097+ #: ../../howto/enum.rst:1230
10981098msgid ""
10991099"Inverting a flag member returns the corresponding positive value, rather "
11001100"than a negative value --- for example::"
11011101msgstr ""
11021102
1103- #: ../../howto/enum.rst:1228
1103+ #: ../../howto/enum.rst:1236
11041104msgid ""
11051105"Flag members have a length corresponding to the number of power-of-two "
11061106"values they contain. For example::"
11071107msgstr ""
11081108
1109- #: ../../howto/enum.rst:1238
1109+ #: ../../howto/enum.rst:1246
11101110msgid "Enum Cookbook"
11111111msgstr ""
11121112
1113- #: ../../howto/enum.rst:1241
1113+ #: ../../howto/enum.rst:1249
11141114msgid ""
11151115"While :class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag`, and :"
11161116"class:`IntFlag` are expected to cover the majority of use-cases, they cannot "
11171117"cover them all. Here are recipes for some different types of enumerations "
11181118"that can be used directly, or as examples for creating one's own."
11191119msgstr ""
11201120
1121- #: ../../howto/enum.rst:1248
1121+ #: ../../howto/enum.rst:1256
11221122msgid "Omitting values"
11231123msgstr ""
11241124
1125- #: ../../howto/enum.rst:1250
1125+ #: ../../howto/enum.rst:1258
11261126msgid ""
11271127"In many use-cases, one doesn't care what the actual value of an enumeration "
11281128"is. There are several ways to define this type of simple enumeration:"
11291129msgstr ""
11301130
1131- #: ../../howto/enum.rst:1253
1131+ #: ../../howto/enum.rst:1261
11321132msgid "use instances of :class:`auto` for the value"
11331133msgstr ""
11341134
1135- #: ../../howto/enum.rst:1254
1135+ #: ../../howto/enum.rst:1262
11361136msgid "use instances of :class:`object` as the value"
11371137msgstr ""
11381138
1139- #: ../../howto/enum.rst:1255
1139+ #: ../../howto/enum.rst:1263
11401140msgid "use a descriptive string as the value"
11411141msgstr ""
11421142
1143- #: ../../howto/enum.rst:1256
1143+ #: ../../howto/enum.rst:1264
11441144msgid ""
11451145"use a tuple as the value and a custom :meth:`__new__` to replace the tuple "
11461146"with an :class:`int` value"
11471147msgstr ""
11481148
1149- #: ../../howto/enum.rst:1259
1149+ #: ../../howto/enum.rst:1267
11501150msgid ""
11511151"Using any of these methods signifies to the user that these values are not "
11521152"important, and also enables one to add, remove, or reorder members without "
11531153"having to renumber the remaining members."
11541154msgstr ""
11551155
1156- #: ../../howto/enum.rst:1265
1156+ #: ../../howto/enum.rst:1273
11571157msgid "Using :class:`auto`"
11581158msgstr ""
11591159
1160- #: ../../howto/enum.rst:1267
1160+ #: ../../howto/enum.rst:1275
11611161msgid "Using :class:`auto` would look like::"
11621162msgstr ""
11631163
1164- #: ../../howto/enum.rst:1279
1164+ #: ../../howto/enum.rst:1287
11651165msgid "Using :class:`object`"
11661166msgstr ""
11671167
1168- #: ../../howto/enum.rst:1281
1168+ #: ../../howto/enum.rst:1289
11691169msgid "Using :class:`object` would look like::"
11701170msgstr ""
11711171
1172- #: ../../howto/enum.rst:1291
1172+ #: ../../howto/enum.rst:1299
11731173msgid ""
11741174"This is also a good example of why you might want to write your own :meth:"
11751175"`__repr__`::"
11761176msgstr ""
11771177
1178- #: ../../howto/enum.rst:1307
1178+ #: ../../howto/enum.rst:1315
11791179msgid "Using a descriptive string"
11801180msgstr ""
11811181
1182- #: ../../howto/enum.rst:1309
1182+ #: ../../howto/enum.rst:1317
11831183msgid "Using a string as the value would look like::"
11841184msgstr ""
11851185
1186- #: ../../howto/enum.rst:1321
1186+ #: ../../howto/enum.rst:1329
11871187msgid "Using a custom :meth:`__new__`"
11881188msgstr ""
11891189
1190- #: ../../howto/enum.rst:1323
1190+ #: ../../howto/enum.rst:1331
11911191msgid "Using an auto-numbering :meth:`__new__` would look like::"
11921192msgstr ""
11931193
1194- #: ../../howto/enum.rst:1340
1194+ #: ../../howto/enum.rst:1348
11951195msgid ""
11961196"To make a more general purpose ``AutoNumber``, add ``*args`` to the "
11971197"signature::"
11981198msgstr ""
11991199
1200- #: ../../howto/enum.rst:1350
1200+ #: ../../howto/enum.rst:1358
12011201msgid ""
12021202"Then when you inherit from ``AutoNumber`` you can write your own "
12031203"``__init__`` to handle any extra arguments::"
12041204msgstr ""
12051205
1206- #: ../../howto/enum.rst:1369
1206+ #: ../../howto/enum.rst:1377
12071207msgid ""
12081208"The :meth:`__new__` method, if defined, is used during creation of the Enum "
12091209"members; it is then replaced by Enum's :meth:`__new__` which is used after "
12101210"class creation for lookup of existing members."
12111211msgstr ""
12121212
1213- #: ../../howto/enum.rst:1375
1213+ #: ../../howto/enum.rst:1383
12141214msgid ""
12151215"*Do not* call ``super().__new__()``, as the lookup-only ``__new__`` is the "
12161216"one that is found; instead, use the data type directly -- e.g.::"
12171217msgstr ""
12181218
1219- #: ../../howto/enum.rst:1382
1219+ #: ../../howto/enum.rst:1390
12201220msgid "OrderedEnum"
12211221msgstr ""
12221222
1223- #: ../../howto/enum.rst:1384
1223+ #: ../../howto/enum.rst:1392
12241224msgid ""
12251225"An ordered enumeration that is not based on :class:`IntEnum` and so "
12261226"maintains the normal :class:`Enum` invariants (such as not being comparable "
12271227"to other enumerations)::"
12281228msgstr ""
12291229
1230- #: ../../howto/enum.rst:1418
1230+ #: ../../howto/enum.rst:1426
12311231msgid "DuplicateFreeEnum"
12321232msgstr ""
12331233
1234- #: ../../howto/enum.rst:1420
1234+ #: ../../howto/enum.rst:1428
12351235msgid ""
12361236"Raises an error if a duplicate member value is found instead of creating an "
12371237"alias::"
12381238msgstr ""
12391239
1240- #: ../../howto/enum.rst:1445
1240+ #: ../../howto/enum.rst:1453
12411241msgid ""
12421242"This is a useful example for subclassing Enum to add or change other "
12431243"behaviors as well as disallowing aliases. If the only desired change is "
12441244"disallowing aliases, the :func:`unique` decorator can be used instead."
12451245msgstr ""
12461246
1247- #: ../../howto/enum.rst:1451
1247+ #: ../../howto/enum.rst:1459
12481248msgid "Planet"
12491249msgstr ""
12501250
1251- #: ../../howto/enum.rst:1453
1251+ #: ../../howto/enum.rst:1461
12521252msgid ""
12531253"If :meth:`__new__` or :meth:`__init__` is defined, the value of the enum "
12541254"member will be passed to those methods::"
12551255msgstr ""
12561256
1257- #: ../../howto/enum.rst:1482
1257+ #: ../../howto/enum.rst:1490
12581258msgid "TimePeriod"
12591259msgstr ""
12601260
1261- #: ../../howto/enum.rst:1484
1261+ #: ../../howto/enum.rst:1492
12621262msgid "An example to show the :attr:`_ignore_` attribute in use::"
12631263msgstr ""
12641264
1265- #: ../../howto/enum.rst:1503
1265+ #: ../../howto/enum.rst:1511
12661266msgid "Subclassing EnumType"
12671267msgstr ""
12681268
1269- #: ../../howto/enum.rst:1505
1269+ #: ../../howto/enum.rst:1513
12701270msgid ""
12711271"While most enum needs can be met by customizing :class:`Enum` subclasses, "
12721272"either with class decorators or custom functions, :class:`EnumType` can be "
0 commit comments