7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.11\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2023-01-21 00:16 +0000\n "
10
+ "POT-Creation-Date : 2023-02-18 00:17 +0000\n "
11
11
"PO-Revision-Date : 2018-05-23 16:01+0000\n "
12
12
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -746,109 +746,107 @@ msgid ""
746
746
msgstr ""
747
747
748
748
#: ../../library/enum.rst:695
749
- msgid ""
750
- "Out-of-range values cause a :exc:`ValueError` to be raised. This is the "
751
- "default for :class:`Flag`::"
749
+ msgid "Out-of-range values cause a :exc:`ValueError` to be raised::"
752
750
msgstr ""
753
751
754
- #: ../../library/enum.rst:712
752
+ #: ../../library/enum.rst:711
755
753
msgid ""
756
754
"Out-of-range values have invalid values removed, leaving a valid *Flag* "
757
- "value::"
755
+ "value. This is the default for :class:`Flag` ::"
758
756
msgstr ""
759
757
760
- #: ../../library/enum.rst:725
758
+ #: ../../library/enum.rst:724
761
759
msgid ""
762
760
"Out-of-range values lose their *Flag* membership and revert to :class:`int`. "
763
761
"This is the default for :class:`IntFlag`::"
764
762
msgstr ""
765
763
766
- #: ../../library/enum.rst:738
764
+ #: ../../library/enum.rst:737
767
765
msgid ""
768
- "Out-of-range values are kept, and the *Flag* membership is kept. This is "
769
- "used for some stdlib flags:"
766
+ "Out-of-range values are kept, and the *Flag* membership is kept. This is "
767
+ "used for some stdlib flags:: "
770
768
msgstr ""
771
769
772
- #: ../../library/enum.rst:754
770
+ #: ../../library/enum.rst:753
773
771
msgid "Supported ``__dunder__`` names"
774
772
msgstr ""
775
773
776
- #: ../../library/enum.rst:756
774
+ #: ../../library/enum.rst:755
777
775
msgid ""
778
776
":attr:`~EnumType.__members__` is a read-only ordered mapping of "
779
777
"``member_name``:``member`` items. It is only available on the class."
780
778
msgstr ""
781
779
782
- #: ../../library/enum.rst:759
780
+ #: ../../library/enum.rst:758
783
781
msgid ""
784
782
":meth:`~object.__new__`, if specified, must create and return the enum "
785
783
"members; it is also a very good idea to set the member's :attr:`!_value_` "
786
784
"appropriately. Once all the members are created it is no longer used."
787
785
msgstr ""
788
786
789
- #: ../../library/enum.rst:765
787
+ #: ../../library/enum.rst:764
790
788
msgid "Supported ``_sunder_`` names"
791
789
msgstr ""
792
790
793
- #: ../../library/enum.rst:767
791
+ #: ../../library/enum.rst:766
794
792
msgid "``_name_`` -- name of the member"
795
793
msgstr ""
796
794
797
- #: ../../library/enum.rst:768
795
+ #: ../../library/enum.rst:767
798
796
msgid ""
799
797
"``_value_`` -- value of the member; can be set / modified in ``__new__``"
800
798
msgstr ""
801
799
802
- #: ../../library/enum.rst:770
800
+ #: ../../library/enum.rst:769
803
801
msgid ""
804
802
"``_missing_`` -- a lookup function used when a value is not found; may be "
805
803
"overridden"
806
804
msgstr ""
807
805
808
- #: ../../library/enum.rst:772
806
+ #: ../../library/enum.rst:771
809
807
msgid ""
810
808
"``_ignore_`` -- a list of names, either as a :class:`list` or a :class:"
811
809
"`str`, that will not be transformed into members, and will be removed from "
812
810
"the final class"
813
811
msgstr ""
814
812
815
- #: ../../library/enum.rst:775
813
+ #: ../../library/enum.rst:774
816
814
msgid ""
817
815
"``_order_`` -- used in Python 2/3 code to ensure member order is consistent "
818
816
"(class attribute, removed during class creation)"
819
817
msgstr ""
820
818
821
- #: ../../library/enum.rst:777
819
+ #: ../../library/enum.rst:776
822
820
msgid ""
823
821
"``_generate_next_value_`` -- used to get an appropriate value for an enum "
824
822
"member; may be overridden"
825
823
msgstr ""
826
824
827
- #: ../../library/enum.rst:782
825
+ #: ../../library/enum.rst:781
828
826
msgid ""
829
827
"For standard :class:`Enum` classes the next value chosen is the last value "
830
828
"seen incremented by one."
831
829
msgstr ""
832
830
833
- #: ../../library/enum.rst:785
831
+ #: ../../library/enum.rst:784
834
832
msgid ""
835
833
"For :class:`Flag` classes the next value chosen will be the next highest "
836
834
"power-of-two, regardless of the last value seen."
837
835
msgstr ""
838
836
839
- #: ../../library/enum.rst:788
837
+ #: ../../library/enum.rst:787
840
838
msgid "``_missing_``, ``_order_``, ``_generate_next_value_``"
841
839
msgstr "``_missing_``\\ 、\\ ``_order_``\\ 、\\ ``_generate_next_value_``"
842
840
843
- #: ../../library/enum.rst:789
841
+ #: ../../library/enum.rst:788
844
842
msgid "``_ignore_``"
845
843
msgstr "``_ignore_``"
846
844
847
- #: ../../library/enum.rst:794
845
+ #: ../../library/enum.rst:793
848
846
msgid "Utilities and Decorators"
849
847
msgstr ""
850
848
851
- #: ../../library/enum.rst:798
849
+ #: ../../library/enum.rst:797
852
850
msgid ""
853
851
"*auto* can be used in place of a value. If used, the *Enum* machinery will "
854
852
"call an *Enum*'s :meth:`~Enum._generate_next_value_` to get an appropriate "
@@ -859,130 +857,130 @@ msgid ""
859
857
"manually specified values."
860
858
msgstr ""
861
859
862
- #: ../../library/enum.rst:806
860
+ #: ../../library/enum.rst:805
863
861
msgid ""
864
862
"*auto* instances are only resolved when at the top level of an assignment:"
865
863
msgstr ""
866
864
867
- #: ../../library/enum.rst:808
865
+ #: ../../library/enum.rst:807
868
866
msgid "``FIRST = auto()`` will work (auto() is replaced with ``1``);"
869
867
msgstr ""
870
868
871
- #: ../../library/enum.rst:809
869
+ #: ../../library/enum.rst:808
872
870
msgid ""
873
871
"``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` "
874
872
"is"
875
873
msgstr ""
876
874
877
- #: ../../library/enum.rst:810
875
+ #: ../../library/enum.rst:809
878
876
msgid "used to create the ``SECOND`` enum member;"
879
877
msgstr ""
880
878
881
- #: ../../library/enum.rst:811
879
+ #: ../../library/enum.rst:810
882
880
msgid ""
883
881
"``THREE = [auto(), -3]`` will *not* work (``<auto instance>, -3`` is used to "
884
882
"create the ``THREE`` enum member)"
885
883
msgstr ""
886
884
887
- #: ../../library/enum.rst:816
885
+ #: ../../library/enum.rst:815
888
886
msgid ""
889
887
"In prior versions, ``auto()`` had to be the only thing on the assignment "
890
888
"line to work properly."
891
889
msgstr ""
892
890
893
- #: ../../library/enum.rst:819
891
+ #: ../../library/enum.rst:818
894
892
msgid ""
895
893
"``_generate_next_value_`` can be overridden to customize the values used by "
896
894
"*auto*."
897
895
msgstr ""
898
896
899
- #: ../../library/enum.rst:822
897
+ #: ../../library/enum.rst:821
900
898
msgid ""
901
899
"in 3.13 the default ``_generate_next_value_`` will always return the highest "
902
900
"member value incremented by 1, and will fail if any member is an "
903
901
"incompatible type."
904
902
msgstr ""
905
903
906
- #: ../../library/enum.rst:828
904
+ #: ../../library/enum.rst:827
907
905
msgid ""
908
906
"A decorator similar to the built-in *property*, but specifically for "
909
907
"enumerations. It allows member attributes to have the same names as members "
910
908
"themselves."
911
909
msgstr ""
912
910
913
- #: ../../library/enum.rst:832
911
+ #: ../../library/enum.rst:831
914
912
msgid ""
915
913
"the *property* and the member must be defined in separate classes; for "
916
914
"example, the *value* and *name* attributes are defined in the *Enum* class, "
917
915
"and *Enum* subclasses can define members with the names ``value`` and "
918
916
"``name``."
919
917
msgstr ""
920
918
921
- #: ../../library/enum.rst:841
919
+ #: ../../library/enum.rst:840
922
920
msgid ""
923
921
"A :keyword:`class` decorator specifically for enumerations. It searches an "
924
922
"enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; "
925
923
"if any are found :exc:`ValueError` is raised with the details::"
926
924
msgstr ""
927
925
928
- #: ../../library/enum.rst:859
926
+ #: ../../library/enum.rst:858
929
927
msgid ""
930
928
"A :keyword:`class` decorator specifically for enumerations. Members from :"
931
929
"class:`EnumCheck` are used to specify which constraints should be checked on "
932
930
"the decorated enumeration."
933
931
msgstr ""
934
932
935
- #: ../../library/enum.rst:867
933
+ #: ../../library/enum.rst:866
936
934
msgid "A decorator for use in enums: its target will become a member."
937
935
msgstr ""
938
936
939
- #: ../../library/enum.rst:873
937
+ #: ../../library/enum.rst:872
940
938
msgid "A decorator for use in enums: its target will not become a member."
941
939
msgstr ""
942
940
943
- #: ../../library/enum.rst:879
941
+ #: ../../library/enum.rst:878
944
942
msgid ""
945
943
"A decorator to change the :class:`str() <str>` and :func:`repr` of an enum "
946
944
"to show its members as belonging to the module instead of its class. Should "
947
945
"only be used when the enum members are exported to the module global "
948
946
"namespace (see :class:`re.RegexFlag` for an example)."
949
947
msgstr ""
950
948
951
- #: ../../library/enum.rst:889
949
+ #: ../../library/enum.rst:888
952
950
msgid "Return a list of all power-of-two integers contained in a flag *value*."
953
951
msgstr ""
954
952
955
- #: ../../library/enum.rst:896
953
+ #: ../../library/enum.rst:895
956
954
msgid "Notes"
957
955
msgstr ""
958
956
959
- #: ../../library/enum.rst:898
957
+ #: ../../library/enum.rst:897
960
958
msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`"
961
959
msgstr ""
962
960
963
- #: ../../library/enum.rst:900
961
+ #: ../../library/enum.rst:899
964
962
msgid ""
965
963
"These three enum types are designed to be drop-in replacements for existing "
966
964
"integer- and string-based values; as such, they have extra limitations:"
967
965
msgstr ""
968
966
969
- #: ../../library/enum.rst:903
967
+ #: ../../library/enum.rst:902
970
968
msgid "``__str__`` uses the value and not the name of the enum member"
971
969
msgstr ""
972
970
973
- #: ../../library/enum.rst:905
971
+ #: ../../library/enum.rst:904
974
972
msgid ""
975
973
"``__format__``, because it uses ``__str__``, will also use the value of the "
976
974
"enum member instead of its name"
977
975
msgstr ""
978
976
979
- #: ../../library/enum.rst:908
977
+ #: ../../library/enum.rst:907
980
978
msgid ""
981
979
"If you do not need/want those limitations, you can either create your own "
982
980
"base class by mixing in the ``int`` or ``str`` type yourself::"
983
981
msgstr ""
984
982
985
- #: ../../library/enum.rst:915
983
+ #: ../../library/enum.rst:914
986
984
msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::"
987
985
msgstr ""
988
986
0 commit comments