5
5
#
6
6
# Translators:
7
7
# tomo, 2022
8
- # Takeshi Nakazato, 2022
9
8
# souma987, 2023
10
9
# TENMYO Masakazu, 2024
11
10
# 石井明久, 2024
12
11
# Takanori Suzuki <takanori@takanory.net>, 2024
12
+ # Takeshi Nakazato, 2024
13
13
#
14
14
#, fuzzy
15
15
msgid ""
16
16
msgstr ""
17
17
"Project-Id-Version : Python 3.13\n "
18
18
"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 "
20
20
"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 "
22
22
"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
23
23
"ja/)\n "
24
24
"MIME-Version : 1.0\n "
@@ -80,6 +80,12 @@ msgid ""
80
80
" def __len__(self): ... # Required abstract method\n"
81
81
" def count(self, value): ... # Optionally override a mixin method"
82
82
msgstr ""
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"
83
89
84
90
#: ../../library/collections.abc.rst:43
85
91
msgid ""
@@ -88,6 +94,10 @@ msgid ""
88
94
">>> isinstance(C(), Sequence)\n"
89
95
"True"
90
96
msgstr ""
97
+ ">>> issubclass(C, Sequence)\n"
98
+ "True\n"
99
+ ">>> isinstance(C(), Sequence)\n"
100
+ "True"
91
101
92
102
#: ../../library/collections.abc.rst:50
93
103
msgid ""
@@ -117,6 +127,15 @@ msgid ""
117
127
"\n"
118
128
"Sequence.register(D) # Register instead of inherit"
119
129
msgstr ""
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"
120
139
121
140
#: ../../library/collections.abc.rst:69
122
141
msgid ""
@@ -125,6 +144,10 @@ msgid ""
125
144
">>> isinstance(D(), Sequence)\n"
126
145
"True"
127
146
msgstr ""
147
+ ">>> issubclass(D, Sequence)\n"
148
+ "True\n"
149
+ ">>> isinstance(D(), Sequence)\n"
150
+ "True"
128
151
129
152
#: ../../library/collections.abc.rst:76
130
153
msgid ""
@@ -154,6 +177,9 @@ msgid ""
154
177
" def __iter__(self): ...\n"
155
178
" def __next__(self): ..."
156
179
msgstr ""
180
+ "class E:\n"
181
+ " def __iter__(self): ...\n"
182
+ " def __next__(self): ..."
157
183
158
184
#: ../../library/collections.abc.rst:92
159
185
msgid ""
@@ -162,6 +188,10 @@ msgid ""
162
188
">>> isinstance(E(), Iterable)\n"
163
189
"True"
164
190
msgstr ""
191
+ ">>> issubclass(E, Iterable)\n"
192
+ "True\n"
193
+ ">>> isinstance(E(), Iterable)\n"
194
+ "True"
165
195
166
196
#: ../../library/collections.abc.rst:99
167
197
msgid ""
@@ -566,6 +596,8 @@ msgid ""
566
596
"See :ref:`annotating-callables` for details on how to use :class:`!Callable` "
567
597
"in type annotations."
568
598
msgstr ""
599
+ ":class:`!Callable` を型アノテーションで使う方法の詳細は、 :ref:`annotating-"
600
+ "callables` を参照してください。"
569
601
570
602
#: ../../library/collections.abc.rst:224
571
603
msgid "ABC for classes that provide the :meth:`~container.__iter__` method."
@@ -621,6 +653,8 @@ msgid ""
621
653
"See :ref:`annotating-generators-and-coroutines` for details on using :class:"
622
654
"`!Generator` in type annotations."
623
655
msgstr ""
656
+ ":class:`!Generator` を型アノテーションで使う方法の詳細は、 :ref:`annotating-"
657
+ "generators-and-coroutines` を参照してください。"
624
658
625
659
#: ../../library/collections.abc.rst:268
626
660
msgid "ABCs for read-only and mutable :term:`sequences <sequence>`."
@@ -802,6 +836,9 @@ msgid ""
802
836
"if isinstance(myvar, collections.abc.Sized):\n"
803
837
" size = len(myvar)"
804
838
msgstr ""
839
+ "size = None\n"
840
+ "if isinstance(myvar, collections.abc.Sized):\n"
841
+ " size = len(myvar)"
805
842
806
843
#: ../../library/collections.abc.rst:388
807
844
msgid ""
@@ -843,6 +880,28 @@ msgid ""
843
880
"overlap = s1 & s2 # The __and__() method is supported "
844
881
"automatically"
845
882
msgstr ""
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"
846
905
847
906
#: ../../library/collections.abc.rst:417
848
907
msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:"
0 commit comments