55#
66# Translators:
77# tomo, 2022
8- # Takeshi Nakazato, 2022
98# souma987, 2023
109# TENMYO Masakazu, 2024
1110# 石井明久, 2024
1211# Takanori Suzuki <takanori@takanory.net>, 2024
12+ # Takeshi Nakazato, 2024
1313#
1414#, fuzzy
1515msgid ""
1616msgstr ""
1717"Project-Id-Version : Python 3.13\n "
1818"Report-Msgid-Bugs-To : \n "
19- "POT-Creation-Date : 2024-09-13 14:16 +0000\n "
19+ "POT-Creation-Date : 2024-09-20 14:17 +0000\n "
2020"PO-Revision-Date : 2021-06-28 00:56+0000\n "
21- "Last-Translator : Takanori Suzuki <takanori@takanory.net> , 2024\n "
21+ "Last-Translator : Takeshi Nakazato , 2024\n "
2222"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
2323"ja/)\n "
2424"MIME-Version : 1.0\n "
@@ -80,6 +80,12 @@ msgid ""
8080" def __len__(self): ... # Required abstract method\n"
8181" def count(self, value): ... # Optionally override a mixin method"
8282msgstr ""
83+ "class C(Sequence): # Direct inheritance\n"
84+ " def __init__(self): ... # Extra method not required by the "
85+ "ABC\n"
86+ " def __getitem__(self, index): ... # Required abstract method\n"
87+ " def __len__(self): ... # Required abstract method\n"
88+ " def count(self, value): ... # Optionally override a mixin method"
8389
8490#: ../../library/collections.abc.rst:43
8591msgid ""
@@ -88,6 +94,10 @@ msgid ""
8894">>> isinstance(C(), Sequence)\n"
8995"True"
9096msgstr ""
97+ ">>> issubclass(C, Sequence)\n"
98+ "True\n"
99+ ">>> isinstance(C(), Sequence)\n"
100+ "True"
91101
92102#: ../../library/collections.abc.rst:50
93103msgid ""
@@ -117,6 +127,15 @@ msgid ""
117127"\n"
118128"Sequence.register(D) # Register instead of inherit"
119129msgstr ""
130+ "class D: # No inheritance\n"
131+ " def __init__(self): ... # Extra method not required by the "
132+ "ABC\n"
133+ " def __getitem__(self, index): ... # Abstract method\n"
134+ " def __len__(self): ... # Abstract method\n"
135+ " def count(self, value): ... # Mixin method\n"
136+ " def index(self, value): ... # Mixin method\n"
137+ "\n"
138+ "Sequence.register(D) # Register instead of inherit"
120139
121140#: ../../library/collections.abc.rst:69
122141msgid ""
@@ -125,6 +144,10 @@ msgid ""
125144">>> isinstance(D(), Sequence)\n"
126145"True"
127146msgstr ""
147+ ">>> issubclass(D, Sequence)\n"
148+ "True\n"
149+ ">>> isinstance(D(), Sequence)\n"
150+ "True"
128151
129152#: ../../library/collections.abc.rst:76
130153msgid ""
@@ -154,6 +177,9 @@ msgid ""
154177" def __iter__(self): ...\n"
155178" def __next__(self): ..."
156179msgstr ""
180+ "class E:\n"
181+ " def __iter__(self): ...\n"
182+ " def __next__(self): ..."
157183
158184#: ../../library/collections.abc.rst:92
159185msgid ""
@@ -162,6 +188,10 @@ msgid ""
162188">>> isinstance(E(), Iterable)\n"
163189"True"
164190msgstr ""
191+ ">>> issubclass(E, Iterable)\n"
192+ "True\n"
193+ ">>> isinstance(E(), Iterable)\n"
194+ "True"
165195
166196#: ../../library/collections.abc.rst:99
167197msgid ""
@@ -566,6 +596,8 @@ msgid ""
566596"See :ref:`annotating-callables` for details on how to use :class:`!Callable` "
567597"in type annotations."
568598msgstr ""
599+ ":class:`!Callable` を型アノテーションで使う方法の詳細は、 :ref:`annotating-"
600+ "callables` を参照してください。"
569601
570602#: ../../library/collections.abc.rst:224
571603msgid "ABC for classes that provide the :meth:`~container.__iter__` method."
@@ -621,6 +653,8 @@ msgid ""
621653"See :ref:`annotating-generators-and-coroutines` for details on using :class:"
622654"`!Generator` in type annotations."
623655msgstr ""
656+ ":class:`!Generator` を型アノテーションで使う方法の詳細は、 :ref:`annotating-"
657+ "generators-and-coroutines` を参照してください。"
624658
625659#: ../../library/collections.abc.rst:268
626660msgid "ABCs for read-only and mutable :term:`sequences <sequence>`."
@@ -802,6 +836,9 @@ msgid ""
802836"if isinstance(myvar, collections.abc.Sized):\n"
803837" size = len(myvar)"
804838msgstr ""
839+ "size = None\n"
840+ "if isinstance(myvar, collections.abc.Sized):\n"
841+ " size = len(myvar)"
805842
806843#: ../../library/collections.abc.rst:388
807844msgid ""
@@ -843,6 +880,28 @@ msgid ""
843880"overlap = s1 & s2 # The __and__() method is supported "
844881"automatically"
845882msgstr ""
883+ "class ListBasedSet(collections.abc.Set):\n"
884+ " ''' Alternate set implementation favoring space over speed\n"
885+ " and not requiring the set elements to be hashable. '''\n"
886+ " def __init__(self, iterable):\n"
887+ " self.elements = lst = []\n"
888+ " for value in iterable:\n"
889+ " if value not in lst:\n"
890+ " lst.append(value)\n"
891+ "\n"
892+ " def __iter__(self):\n"
893+ " return iter(self.elements)\n"
894+ "\n"
895+ " def __contains__(self, value):\n"
896+ " return value in self.elements\n"
897+ "\n"
898+ " def __len__(self):\n"
899+ " return len(self.elements)\n"
900+ "\n"
901+ "s1 = ListBasedSet('abcdef')\n"
902+ "s2 = ListBasedSet('defghi')\n"
903+ "overlap = s1 & s2 # The __and__() method is supported "
904+ "automatically"
846905
847906#: ../../library/collections.abc.rst:417
848907msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:"
0 commit comments