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

Commite4faade

Browse files
author
github-actions
committed
Merge 3.11 into 3.10
1 parent254918e commite4faade

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed

‎faq/programming.po

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2557,13 +2557,15 @@ msgstr ""
25572557

25582558
#:../../faq/programming.rst:1817
25592559
msgid"When can I rely on identity tests with the *is* operator?"
2560-
msgstr""
2560+
msgstr"いつ *is* 演算子での同一性テストが頼れますか?"
25612561

25622562
#:../../faq/programming.rst:1819
25632563
msgid""
25642564
"The ``is`` operator tests for object identity. The test ``a is b`` is "
25652565
"equivalent to ``id(a) == id(b)``."
25662566
msgstr""
2567+
"``is`` 演算子はオブジェクトの同一性をテストします。 テスト ``a is b`` は "
2568+
"``id(a) == id(b)`` と同等です。"
25672569

25682570
#:../../faq/programming.rst:1822
25692571
msgid""
@@ -2572,33 +2574,48 @@ msgid ""
25722574
"usually faster than equality tests. And unlike equality tests, identity "
25732575
"tests are guaranteed to return a boolean ``True`` or ``False``."
25742576
msgstr""
2577+
"同一性テストの最も重要な特性は、オブジェクトは常にそれ自身と同一であり、 ``a "
2578+
"is a`` は常に ``True`` を返すということです。 同一性テストは通常、等価性テス"
2579+
"トよりも高速です。 また、等価性テストとは異なり、同一性テストは真偽値 "
2580+
"``True`` または``False`` を返すことが保証されています。"
25752581

25762582
#:../../faq/programming.rst:1827
25772583
msgid""
25782584
"However, identity tests can *only* be substituted for equality tests when "
25792585
"object identity is assured. Generally, there are three circumstances where "
25802586
"identity is guaranteed:"
25812587
msgstr""
2588+
"ただし、同一性テストを等価性テストの代用とできるのは、オブジェクトの同一性が"
2589+
"保証されている場合 *のみ* です。 一般的に、同一性が保証される状況は3つありま"
2590+
"す:"
25822591

25832592
#:../../faq/programming.rst:1831
25842593
msgid""
25852594
"1) Assignments create new names but do not change object identity. After "
25862595
"the assignment ``new = old``, it is guaranteed that ``new is old``."
25872596
msgstr""
2597+
"1) 代入は新しい名前を作りますが、オブジェクトIDは変えません。 ``new = old`` "
2598+
"代入の後、 ``new is old`` が保証されます。"
25882599

25892600
#:../../faq/programming.rst:1834
25902601
msgid""
25912602
"2) Putting an object in a container that stores object references does not "
25922603
"change object identity. After the list assignment ``s[0] = x``, it is "
25932604
"guaranteed that ``s[0] is x``."
25942605
msgstr""
2606+
"2) オブジェクト参照を格納するコンテナにオブジェクトを入れても、オブジェクトID"
2607+
"は変わりません。 ``s[0] = x`` リスト代入の後、 ``s[0] is x`` が保証されま"
2608+
"す。"
25952609

25962610
#:../../faq/programming.rst:1838
25972611
msgid""
25982612
"3) If an object is a singleton, it means that only one instance of that "
25992613
"object can exist. After the assignments ``a = None`` and ``b = None``, it "
26002614
"is guaranteed that ``a is b`` because ``None`` is a singleton."
26012615
msgstr""
2616+
"3) オブジェクトがシングルトンなら、それはそのオブジェクトのインスタンスは1つ"
2617+
"だけ存在できることを意味します。 ``a = None`` と ``b = None`` 代入の後、 "
2618+
"``a is b`` が保証されます。``None`` がシングルトンのためです。"
26022619

26032620
#:../../faq/programming.rst:1842
26042621
msgid""
@@ -2607,16 +2624,22 @@ msgid ""
26072624
"check constants such as :class:`int` and :class:`str` which aren't "
26082625
"guaranteed to be singletons::"
26092626
msgstr""
2627+
"多くの他の状況では、同一性テストは賢明でなく、透過性テストをお勧めします。 "
2628+
"特に、シングルトンであることが保証されていない :class:`int` や :class:`str` "
2629+
"などの定数をチェックするために同一性テストを使わないでください。"
26102630

26112631
#:../../faq/programming.rst:1859
26122632
msgid"Likewise, new instances of mutable containers are never identical::"
26132633
msgstr""
2634+
"同様に、ミュータブルなコンテナの新しいインスタンスは同一ではありません::"
26142635

26152636
#:../../faq/programming.rst:1866
26162637
msgid""
26172638
"In the standard library code, you will see several common patterns for "
26182639
"correctly using identity tests:"
26192640
msgstr""
2641+
"標準ライブラリのコードには、同一性テストを正しく使うための一般的なパターンが"
2642+
"あります:"
26202643

26212644
#:../../faq/programming.rst:1869
26222645
msgid""
@@ -2625,6 +2648,9 @@ msgid ""
26252648
"confusion with other objects that may have boolean values that evaluate to "
26262649
"false."
26272650
msgstr""
2651+
"1) :pep:`8` で推奨されるように、同一性テストは ``None`` のチェックの良い方法"
2652+
"です。 コードの中で平易な英語のように読めますし、 false と評価される真偽値を"
2653+
"持ちうる他のオブジェクトとの混同を避けます。"
26282654

26292655
#:../../faq/programming.rst:1873
26302656
msgid""
@@ -2633,13 +2659,20 @@ msgid ""
26332659
"guaranteed to be distinct from other objects. For example, here is how to "
26342660
"implement a method that behaves like :meth:`dict.pop`::"
26352661
msgstr""
2662+
"2) ``None`` が有効な入力値である場合、省略された引数を検出にはコツがいりま"
2663+
"す。 そのような状況では、他のオブジェクトと区別されることが保証されたシング"
2664+
"ルトンの番兵オブジェクトを作れます。 例えば、これは :meth:`dict.pop` のよう"
2665+
"に振る舞うメソッドを実装する方法です:"
26362666

26372667
#:../../faq/programming.rst:1889
26382668
msgid""
26392669
"3) Container implementations sometimes need to augment equality tests with "
26402670
"identity tests. This prevents the code from being confused by objects such "
26412671
"as ``float('NaN')`` that are not equal to themselves."
26422672
msgstr""
2673+
"3) コンテナの実装では、等価性テストを同一性テストで補強しないといけない場合が"
2674+
"あります。 これは、 ``float('NaN')`` のような自分自身と等価でないオブジェク"
2675+
"トによってコードが混乱するのを防ぐためです。"
26432676

26442677
#:../../faq/programming.rst:1893
26452678
msgid""

‎howto/descriptor.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ msgid ""
143143
"descriptor instance, recognized by its ``__get__`` method. Calling that "
144144
"method returns ``10``."
145145
msgstr""
146-
"``a.x``属性ルックアップではドット演算子がクラス辞書野中から ``'x': 5`` を見"
146+
"``a.x``属性ルックアップではドット演算子がクラス辞書の中から ``'x': 5`` を見"
147147
"つけます。 ``a.y`` ルックアップではドット演算子は ``__get__`` メソッドを持つ"
148148
"デスクリプタインスタンスを取得します。そのメソッドを呼び出すと、 ``10`` を返"
149149
"します。"

‎library/asyncio-eventloop.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,7 @@ msgid ""
22082208
"text. :func:`bytes.decode` can be used to convert the bytes returned from "
22092209
"the stream to text."
22102210
msgstr""
2211-
"``asyncio`` のサブプロセス APIはストリームからテキストへのデコードをサポ0と"
2211+
"``asyncio`` のサブプロセス APIはストリームからテキストへのデコードをサポート"
22122212
"していません。ストリームからテキストに変換するには :func:`bytes.decode` 関数"
22132213
"を使ってください。"
22142214

‎library/collections.abc.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ msgid ""
123123
"These abstract classes now support ``[]``. See :ref:`types-genericalias` "
124124
"and :pep:`585`."
125125
msgstr""
126-
"これらの抽象クラスは ``[]`` をサポートするようになりました。ジェネリックエイ"
127-
"リアス型 (:ref:`types-genericalias`) おyび :pep:`585` を参照してください。"
126+
"これらの抽象クラスは ``[]`` をサポートするようになりました。 :ref:`types-"
127+
"genericalias` および :pep:`585` を参照してください。"
128128

129129
#:../../library/collections.abc.rst:114
130130
msgid"Collections Abstract Base Classes"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp