Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit265f81c

Browse files
author
github-actions
committed
Merge 3.11 into 3.10
1 parent4e8ac75 commit265f81c

File tree

1 file changed

+69
-13
lines changed

1 file changed

+69
-13
lines changed

‎howto/enum.po

Lines changed: 69 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ msgstr ""
2525

2626
#:../../howto/enum.rst:3
2727
msgid"Enum HOWTO"
28-
msgstr""
28+
msgstr"列挙型 HOWTO"
2929

3030
#:../../howto/enum.rst:0
3131
msgid"Author"
@@ -45,12 +45,17 @@ msgid ""
4545
"are similar to global variables, but they offer a more useful :func:"
4646
"`repr()`, grouping, type-safety, and a few other features."
4747
msgstr""
48+
":class:`Enum` は、ユニークな値に束縛されたシンボル名の集合です。グローバル変"
49+
"数に似ていますが、 :func:`repr()` がより便利だったり、グルーピングの機能、型"
50+
"安全などいくつかの機能があります。"
4851

4952
#:../../howto/enum.rst:18
5053
msgid""
5154
"They are most useful when you have a variable that can take one of a limited "
5255
"selection of values. For example, the days of the week::"
5356
msgstr""
57+
"これらは、限られた選択肢の値の一つを取る変数がある場合に便利です。例えば、曜"
58+
"日情報があります:"
5459

5560
#:../../howto/enum.rst:31
5661
msgid""
@@ -60,13 +65,16 @@ msgstr ""
6065

6166
#:../../howto/enum.rst:34
6267
msgid"Case of Enum Members"
63-
msgstr""
68+
msgstr"Enumメンバーは大文字/小文字?"
6469

6570
#:../../howto/enum.rst:36
6671
msgid""
6772
"Because Enums are used to represent constants we recommend using UPPER_CASE "
6873
"names for members, and will be using that style in our examples."
6974
msgstr""
75+
"Enumクラス群は定数を表現するために使われるため、メンバーの名前にはUPPER_CASE"
76+
"を使うことを推奨します。本ページのドキュメントのサンプルでもそのスタイルを採"
77+
"用します。"
7078

7179
#:../../howto/enum.rst:39
7280
msgid""
@@ -242,6 +250,8 @@ msgstr ""
242250
msgid""
243251
"The :meth:`_generate_next_value_` method must be defined before any members."
244252
msgstr""
253+
":meth:`_generate_next_value_` メソッドは他のメンバーよりも前に定義される必要"
254+
"があります。"
245255

246256
#:../../howto/enum.rst:297
247257
msgid"Iteration"
@@ -344,17 +354,23 @@ msgid ""
344354
"then any value(s) given to the enum member will be passed into those "
345355
"methods. See `Planet`_ for an example."
346356
msgstr""
357+
"注意: 列挙型で :meth:`__new__` および/または :meth:`__init__` を定義した場"
358+
"合、列挙型メンバーに与えられた値はすべてこれらのメソッドに渡されます。例 "
359+
"`Planet`_ を参照してください。"
347360

348361
#:../../howto/enum.rst:411
349362
msgid"Restricted Enum subclassing"
350-
msgstr""
363+
msgstr"Enumのサブクラス化の制限"
351364

352365
#:../../howto/enum.rst:413
353366
msgid""
354367
"A new :class:`Enum` class must have one base enum class, up to one concrete "
355368
"data type, and as many :class:`object`-based mixin classes as needed. The "
356369
"order of these base classes is::"
357370
msgstr""
371+
"新しい :class:`Enum` クラスは、ベースの enum クラスを1つ、具象データ型を1つ、"
372+
"複数の :class:`object` ベースのミックスインクラスが許容されます。これらのベー"
373+
"スクラスの順序は次の通りです::"
358374

359375
#:../../howto/enum.rst:420
360376
msgid""
@@ -411,6 +427,8 @@ msgid ""
411427
"It is possible to modify how enum members are pickled/unpickled by defining :"
412428
"meth:`__reduce_ex__` in the enumeration class."
413429
msgstr""
430+
"enum のメンバーをどう pickle 化/unpickle 化するかは、列挙型クラス内の :meth:"
431+
"`__reduce_ex__` で定義することで変更できます。"
414432

415433
#:../../howto/enum.rst:471
416434
msgid"Functional API"
@@ -502,7 +520,7 @@ msgstr "value"
502520

503521
#:../../howto/enum.rst:541
504522
msgid"What the new enum class will record as its name."
505-
msgstr""
523+
msgstr"新しい enum クラスに記録されるそれ自身の名前です。"
506524

507525
#:../../howto/enum.rst:0
508526
msgid"names"
@@ -532,23 +550,23 @@ msgstr "module"
532550

533551
#:../../howto/enum.rst:560
534552
msgid"name of module where new enum class can be found."
535-
msgstr""
553+
msgstr"新しい enum クラスが属するモジュールの名前です。"
536554

537555
#:../../howto/enum.rst:0
538556
msgid"qualname"
539557
msgstr"qualname"
540558

541559
#:../../howto/enum.rst:562
542560
msgid"where in module new enum class can be found."
543-
msgstr""
561+
msgstr"新しい enum クラスが属するモジュールの場所です。"
544562

545563
#:../../howto/enum.rst:0
546564
msgid"type"
547565
msgstr"type"
548566

549567
#:../../howto/enum.rst:564
550568
msgid"type to mix in to new enum class."
551-
msgstr""
569+
msgstr"新しい enum クラスに複合されるデータ型です。"
552570

553571
#:../../howto/enum.rst:0
554572
msgid"start"
@@ -595,7 +613,7 @@ msgstr ":class:`IntEnum` の値は他の用途では整数のように振る舞
595613

596614
#:../../howto/enum.rst:623
597615
msgid"StrEnum"
598-
msgstr""
616+
msgstr"StrEnum"
599617

600618
#:../../howto/enum.rst:625
601619
msgid""
@@ -631,6 +649,8 @@ msgid ""
631649
"Any operation on an :class:`IntFlag` member besides the bit-wise operations "
632650
"will lose the :class:`IntFlag` membership."
633651
msgstr""
652+
":class:`IntFlag` メンバーに対してビット演算以外のどんな演算をしても、その結果"
653+
"は :class:`IntFlag` メンバーではなくなります。"
634654

635655
#:../../howto/enum.rst:657
636656
msgid""
@@ -789,6 +809,10 @@ msgid ""
789809
"`int` above. This restriction does not apply to mix-ins which only add "
790810
"methods and don't specify another type."
791811
msgstr""
812+
":class:`Enum` のメンバーはどんなデータ型でも構いませんが、追加のデータ型 (例"
813+
"えば、上の例の :class:`int`) と複合させてしまうと、すべてのメンバーの値はその"
814+
"データ型でなければならなくなります。この制限は、メソッドの追加するだけの、他"
815+
"のデータ型を指定しない複合には適用されません。"
792816

793817
#:../../howto/enum.rst:826
794818
msgid""
@@ -822,20 +846,25 @@ msgstr ""
822846

823847
#:../../howto/enum.rst:840
824848
msgid"When to use :meth:`__new__` vs. :meth:`__init__`"
825-
msgstr""
849+
msgstr":meth:`__init__` と :meth:`__init__` のどちらを使うべきか"
826850

827851
#:../../howto/enum.rst:842
828852
msgid""
829853
":meth:`__new__` must be used whenever you want to customize the actual value "
830854
"of the :class:`Enum` member. Any other modifications may go in either :meth:"
831855
"`__new__` or :meth:`__init__`, with :meth:`__init__` being preferred."
832856
msgstr""
857+
":meth:`__new__` は :class:`Enum` メンバーの実際の値をカスタマイズしたいときに"
858+
"利用します。他の変更を加える場合、 :meth:`__new__` と :meth:`__init__` のどち"
859+
"らを利用するかは、:meth:`__init__` の方が望ましいでしょう。"
833860

834861
#:../../howto/enum.rst:846
835862
msgid""
836863
"For example, if you want to pass several items to the constructor, but only "
837864
"want one of them to be the value::"
838865
msgstr""
866+
"例えば、複数の値をコンストラクタに渡すが、その中の1つだけを値として使いたい場"
867+
"合は次のようにします:"
839868

840869
#:../../howto/enum.rst:873
841870
msgid"Finer Points"
@@ -909,6 +938,9 @@ msgid ""
909938
"``_generate_next_value_`` -- used by the `Functional API`_ and by :class:"
910939
"`auto` to get an appropriate value for an enum member; may be overridden"
911940
msgstr""
941+
"``_generate_next_value_`` -- `Functional API`_ から利用され、 :class:`auto` "
942+
"が列挙型のメンバーの適切な値を取得するのに使われます。オーバーライドされま"
943+
"す。"
912944

913945
#:../../howto/enum.rst:905
914946
msgid""
@@ -936,16 +968,21 @@ msgid ""
936968
"can be provided. It will be checked against the actual order of the "
937969
"enumeration and raise an error if the two do not match::"
938970
msgstr""
971+
"Pythono 2 / Python 3のコードの同期を取りやすくするために :attr:`_order_` 属性"
972+
"を提供できます。実際の列挙値の順序と比較して一致してなければエラーを送出しま"
973+
"す::"
939974

940975
#:../../howto/enum.rst:932
941976
msgid""
942977
"In Python 2 code the :attr:`_order_` attribute is necessary as definition "
943978
"order is lost before it can be recorded."
944979
msgstr""
980+
"Python 2のコードでは :attr:`_order_` 属性は定義順が記録される前消えてしまうた"
981+
"め、重要です。"
945982

946983
#:../../howto/enum.rst:937
947984
msgid"_Private__names"
948-
msgstr""
985+
msgstr"_Private__names"
949986

950987
#:../../howto/enum.rst:939
951988
msgid""
@@ -989,6 +1026,11 @@ msgid ""
9891026
"enum's boolean evaluation depend on the member's value add the following to "
9901027
"your class::"
9911028
msgstr""
1029+
"(:class:`int`, :class:`str` などのような) 非 :class:`Enum` 型と複合させた "
1030+
"enum クラスは、その複合された型の規則に従って評価されます;\n"
1031+
"そうでない場合は、全てのメンバーは :data:`True` と評価されます。\n"
1032+
"メンバーの値に依存する独自の enum の真偽値評価を行うには、クラスに次のコード"
1033+
"を追加してください::"
9921034

9931035
#:../../howto/enum.rst:993
9941036
msgid"Plain :class:`Enum` classes always evaluate as :data:`True`."
@@ -1128,6 +1170,8 @@ msgid ""
11281170
"Enums have a custom metaclass that affects many aspects of both derived :"
11291171
"class:`Enum` classes and their instances (members)."
11301172
msgstr""
1173+
"Enum は :class:`Enum` 派生クラスやそれらのインスタンス (メンバー) 双方の多く"
1174+
"の側面に影響を及ぼすカスタムメタクラスを持っています。"
11311175

11321176
#:../../howto/enum.rst:1123
11331177
msgid"Enum Classes"
@@ -1156,6 +1200,10 @@ msgid ""
11561200
"new ones are ever instantiated by returning only the existing member "
11571201
"instances."
11581202
msgstr""
1203+
"enum メンバーについて最も興味深いのは、それらがシングルトンであるということで"
1204+
"す。:class:`EnumType` は enum クラス自身を作成し、メンバーを作成し、新しいイ"
1205+
"ンスタンスが作成されていないかどうかを確認するために既存のメンバーインスタン"
1206+
"スだけを返すカスタム :meth:`__new__` を追加します。"
11591207

11601208
#:../../howto/enum.rst:1146
11611209
msgid""
@@ -1164,6 +1212,10 @@ msgid ""
11641212
"cover them all. Here are recipes for some different types of enumerations "
11651213
"that can be used directly, or as examples for creating one's own."
11661214
msgstr""
1215+
":class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag`, :class:"
1216+
"`IntFlag` は用途の大部分をカバーすると予想されますが、そのすべてをカバーでき"
1217+
"ているわけではありません。ここでは、そのまま、あるいは独自の列挙型を作る例と"
1218+
"して使える、様々なタイプの列挙型を紹介します。"
11671219

11681220
#:../../howto/enum.rst:1153
11691221
msgid"Omitting values"
@@ -1244,12 +1296,16 @@ msgid ""
12441296
"To make a more general purpose ``AutoNumber``, add ``*args`` to the "
12451297
"signature::"
12461298
msgstr""
1299+
"``AutoNumber`` をより広い用途で使うには、シグニチャに ``*args`` を追加しま"
1300+
"す::"
12471301

12481302
#:../../howto/enum.rst:1245
12491303
msgid""
12501304
"Then when you inherit from ``AutoNumber`` you can write your own "
12511305
"``__init__`` to handle any extra arguments::"
12521306
msgstr""
1307+
"``AutoNumber`` を継承すると、追加の引数を取り扱える独自の ``__init__`` が書け"
1308+
"ます。"
12531309

12541310
#:../../howto/enum.rst:1264
12551311
msgid""
@@ -1309,11 +1365,11 @@ msgstr ""
13091365

13101366
#:../../howto/enum.rst:1370
13111367
msgid"TimePeriod"
1312-
msgstr""
1368+
msgstr"TimePeriod"
13131369

13141370
#:../../howto/enum.rst:1372
13151371
msgid"An example to show the :attr:`_ignore_` attribute in use::"
1316-
msgstr""
1372+
msgstr":attr:`_ignore_` 属性の使用方法のサンプルです::"
13171373

13181374
#:../../howto/enum.rst:1389
13191375
msgid"Conforming input to Flag"
@@ -1328,7 +1384,7 @@ msgstr ""
13281384

13291385
#:../../howto/enum.rst:1411
13301386
msgid"Subclassing EnumType"
1331-
msgstr""
1387+
msgstr"EnumType をサブクラス化する"
13321388

13331389
#:../../howto/enum.rst:1413
13341390
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp