@@ -27,7 +27,7 @@ msgid ""
27
27
msgstr ""
28
28
"Project-Id-Version : Python 3.13\n "
29
29
"Report-Msgid-Bugs-To : \n "
30
- "POT-Creation-Date : 2024-09-06 14:16+0000\n "
30
+ "POT-Creation-Date : 2024-09-13 14:16+0000\n "
31
31
"PO-Revision-Date : 2021-06-28 01:06+0000\n "
32
32
"Last-Translator : TENMYO Masakazu, 2024\n "
33
33
"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
@@ -2153,6 +2153,10 @@ msgid ""
2153
2153
" for block in iter(partial(f.read, 64), b''):\n"
2154
2154
" process_block(block)"
2155
2155
msgstr ""
2156
+ "from functools import partial\n"
2157
+ "with open('mydata.db', 'rb') as f:\n"
2158
+ " for block in iter(partial(f.read, 64), b''):\n"
2159
+ " process_block(block)"
2156
2160
2157
2161
#: ../../library/functions.rst:1116
2158
2162
msgid ""
@@ -2202,12 +2206,15 @@ msgid ""
2202
2206
"At class scope, it returns the namespace that will be passed to the "
2203
2207
"metaclass constructor."
2204
2208
msgstr ""
2209
+ "クラス スコープでは、メタクラス コンストラクタに渡された名前空間を返します。"
2205
2210
2206
2211
#: ../../library/functions.rst:1148
2207
2212
msgid ""
2208
2213
"When using ``exec()`` or ``eval()`` with separate local and global "
2209
2214
"arguments, it returns the local namespace passed in to the function call."
2210
2215
msgstr ""
2216
+ "``exec()`` や ``eval()`` が引数 local と global が分けて使われてる場合では、"
2217
+ "関数の呼び出しで渡されたローカル名前空間を返します。"
2211
2218
2212
2219
#: ../../library/functions.rst:1151
2213
2220
msgid ""
@@ -2218,6 +2225,11 @@ msgid ""
2218
2225
"deleting local variables will immediately affect the contents of the "
2219
2226
"returned mapping object."
2220
2227
msgstr ""
2228
+ "上記どの場合でも、特定の実行フレーム内での各 ``locals()`` は *同じ* マッピン"
2229
+ "グ オブジェクトを返します。 ``locals()`` から返されたマッピング オブジェクト"
2230
+ "を通じて行われた変更は、代入、再代入、または削除されたローカル変数として可視"
2231
+ "化されます。そしてローカル変数の代入、再代入、または削除は、返されたマッピン"
2232
+ "グ オブジェクトの内容へ直ちに反映されます。"
2221
2233
2222
2234
#: ../../library/functions.rst:1158
2223
2235
msgid ""
@@ -2230,6 +2242,12 @@ msgid ""
2230
2242
"variables and nonlocal cell references does *not* affect the contents of "
2231
2243
"previously returned dictionaries."
2232
2244
msgstr ""
2245
+ "term:`optimized scope` (関数、ジェネレーター、コルーチンを含む)では、 "
2246
+ "``locals()`` を呼び出すと、代わりに関数のローカル変数と非ローカル セル参照の"
2247
+ "現在のバインディングを含んだ新しい辞書を返します。この場合、返された辞書を"
2248
+ "使って行われた変更は、対応するローカル変数や非ローカル セル参照には *書き戻さ"
2249
+ "れません* 。また、ローカル変数や非ローカル セル参照へ代入、再代入、削除を行っ"
2250
+ "ても、以前に返された辞書の内容には *影響しません* 。"
2233
2251
2234
2252
#: ../../library/functions.rst:1167
2235
2253
msgid ""
@@ -2239,18 +2257,26 @@ msgid ""
2239
2257
"other scopes, it behaves as if the comprehension were running as a nested "
2240
2258
"function."
2241
2259
msgstr ""
2260
+ "``locals()`` 呼び出しが関数、ジェネレータ、コルーチン内の内包表記内にあれば、"
2261
+ "これはそれを含むスコープから呼び出すことと同等です。ただし内包表記の初期化さ"
2262
+ "れた反復変数が含まれます。他のスコープでは、内包表記がネストされた関数として"
2263
+ "実行されているかのように振舞います。"
2242
2264
2243
2265
#: ../../library/functions.rst:1173
2244
2266
msgid ""
2245
2267
"Calling ``locals()`` as part of a generator expression is equivalent to "
2246
2268
"calling it in a nested generator function."
2247
2269
msgstr ""
2270
+ "``locals()`` 呼び出しがジェネレータ式の一部であれば、ネストされたジェネレータ"
2271
+ "関数内の呼び出しと同等です。"
2248
2272
2249
2273
#: ../../library/functions.rst:1176
2250
2274
msgid ""
2251
2275
"The behaviour of ``locals()`` in a comprehension has been updated as "
2252
2276
"described in :pep:`709`."
2253
2277
msgstr ""
2278
+ "内包表記における ``locals()`` の振る舞い は、 :pep:`709` で説明されているよう"
2279
+ "に更新されました。"
2254
2280
2255
2281
#: ../../library/functions.rst:1180
2256
2282
msgid ""
@@ -2260,6 +2286,10 @@ msgid ""
2260
2286
"being defined, the behaviour in other scopes remains unchanged from previous "
2261
2287
"versions."
2262
2288
msgstr ""
2289
+ ":pep:`667` の一部として、この関数から返されるマッピングオブジェクトを変更する"
2290
+ "セマンティクスが定義されました。 :term:`optimized scopes <optimized scope>` "
2291
+ "の振る舞いは上記のようになりました。定義されただけで、その他のスコープの振る"
2292
+ "舞いは以前のバージョンのままです。"
2263
2293
2264
2294
#: ../../library/functions.rst:1190
2265
2295
msgid ""
@@ -2454,6 +2484,16 @@ msgid ""
2454
2484
"reading and writing raw bytes use binary mode and leave *encoding* "
2455
2485
"unspecified.) The available modes are:"
2456
2486
msgstr ""
2487
+ "*mode* オプション文字列はファイルが開かれる際のモードを指定します。デフォルト"
2488
+ "は ``'r'`` で、読み込み用にテキストモードで開くという意味です。その他によく使"
2489
+ "われるモードとして、書き込み用の ``'w'`` (ファイルが既に存在する場合は上書き"
2490
+ "します) 、排他的な生成をあらわす ``'x'`` 、そして追記用の ``'a'`` ( *いくつか"
2491
+ "の* Unix システムでは、 *すべての* 書き込みは現在のシーク位置にかかわらずファ"
2492
+ "イルの末尾に追記する、という意味です) です。テキストモードで *encoding* が指"
2493
+ "定されない場合に使われるエンコーディングは、プラットフォーム依存です: 現在の"
2494
+ "ロケールエンコーディングを取得するために :func:`locale.getencoding` が呼ばれ"
2495
+ "ます。 (生のバイトデータを読み書きする際にはバイナリモードを使い、 "
2496
+ "*encoding* は指定しません。) 指定できるモードは以下の通りです:"
2457
2497
2458
2498
#: ../../library/functions.rst:1342
2459
2499
msgid "Character"
@@ -2789,6 +2829,15 @@ msgid ""
2789
2829
"...\n"
2790
2830
">>> os.close(dir_fd) # don't leak a file descriptor"
2791
2831
msgstr ""
2832
+ ">>> import os\n"
2833
+ ">>> dir_fd = os.open('somedir', os.O_RDONLY)\n"
2834
+ ">>> def opener(path, flags):\n"
2835
+ "... return os.open(path, flags, dir_fd=dir_fd)\n"
2836
+ "...\n"
2837
+ ">>> with open('spamspam.txt', 'w', opener=opener) as f:\n"
2838
+ "... print('This will be written to somedir/spamspam.txt', file=f)\n"
2839
+ "...\n"
2840
+ ">>> os.close(dir_fd) # ファイル記述子の解放漏れがないように"
2792
2841
2793
2842
#: ../../library/functions.rst:1480
2794
2843
msgid ""
@@ -2976,6 +3025,10 @@ msgid ""
2976
3025
">>> 23 * 38 % 97 == 1\n"
2977
3026
"True"
2978
3027
msgstr ""
3028
+ ">>> pow(38, -1, mod=97)\n"
3029
+ "23\n"
3030
+ ">>> 23 * 38 % 97 == 1\n"
3031
+ "True"
2979
3032
2980
3033
#: ../../library/functions.rst:1578
2981
3034
msgid ""
@@ -3077,6 +3130,20 @@ msgid ""
3077
3130
"\n"
3078
3131
" x = property(getx, setx, delx, \" I'm the 'x' property.\" )"
3079
3132
msgstr ""
3133
+ "class C:\n"
3134
+ " def __init__(self):\n"
3135
+ " self._x = None\n"
3136
+ "\n"
3137
+ " def getx(self):\n"
3138
+ " return self._x\n"
3139
+ "\n"
3140
+ " def setx(self, value):\n"
3141
+ " self._x = value\n"
3142
+ "\n"
3143
+ " def delx(self):\n"
3144
+ " del self._x\n"
3145
+ "\n"
3146
+ " x = property(getx, setx, delx, \" I'm the 'x' property.\" )"
3080
3147
3081
3148
#: ../../library/functions.rst:1638
3082
3149
msgid ""
@@ -3110,6 +3177,14 @@ msgid ""
3110
3177
" \"\"\" Get the current voltage.\"\"\" \n"
3111
3178
" return self._voltage"
3112
3179
msgstr ""
3180
+ "class Parrot:\n"
3181
+ " def __init__(self):\n"
3182
+ " self._voltage = 100000\n"
3183
+ "\n"
3184
+ " @property\n"
3185
+ " def voltage(self):\n"
3186
+ " \"\"\" Get the current voltage.\"\"\" \n"
3187
+ " return self._voltage"
3113
3188
3114
3189
#: ../../library/functions.rst:1654
3115
3190
msgid ""
@@ -3152,6 +3227,22 @@ msgid ""
3152
3227
" def x(self):\n"
3153
3228
" del self._x"
3154
3229
msgstr ""
3230
+ "class C:\n"
3231
+ " def __init__(self):\n"
3232
+ " self._x = None\n"
3233
+ "\n"
3234
+ " @property\n"
3235
+ " def x(self):\n"
3236
+ " \"\"\" I'm the 'x' property.\"\"\" \n"
3237
+ " return self._x\n"
3238
+ "\n"
3239
+ " @x.setter\n"
3240
+ " def x(self, value):\n"
3241
+ " self._x = value\n"
3242
+ "\n"
3243
+ " @x.deleter\n"
3244
+ " def x(self):\n"
3245
+ " del self._x"
3155
3246
3156
3247
#: ../../library/functions.rst:1686
3157
3248
msgid ""
@@ -3178,7 +3269,7 @@ msgstr "属性オブジェクトのドックストリングが書き込み可能
3178
3269
msgid ""
3179
3270
"Attribute holding the name of the property. The name of the property can be "
3180
3271
"changed at runtime."
3181
- msgstr ""
3272
+ msgstr "プロパティ名を保持する属性。プロパティ名は実行時に変更できます。 "
3182
3273
3183
3274
#: ../../library/functions.rst:1709
3184
3275
msgid ""
@@ -3223,6 +3314,13 @@ msgid ""
3223
3314
" def __repr__(self):\n"
3224
3315
" return f\" Person('{self.name}', {self.age})\" "
3225
3316
msgstr ""
3317
+ "class Person:\n"
3318
+ " def __init__(self, name, age):\n"
3319
+ " self.name = name\n"
3320
+ " self.age = age\n"
3321
+ "\n"
3322
+ " def __repr__(self):\n"
3323
+ " return f\" Person('{self.name}', {self.age})\" "
3226
3324
3227
3325
#: ../../library/functions.rst:1739
3228
3326
msgid ""
@@ -3477,6 +3575,9 @@ msgid ""
3477
3575
" @staticmethod\n"
3478
3576
" def f(arg1, arg2, argN): ..."
3479
3577
msgstr ""
3578
+ "class C:\n"
3579
+ " @staticmethod\n"
3580
+ " def f(arg1, arg2, argN): ..."
3480
3581
3481
3582
#: ../../library/functions.rst:1876
3482
3583
msgid ""
@@ -3530,6 +3631,11 @@ msgid ""
3530
3631
"class C:\n"
3531
3632
" method = staticmethod(regular_function)"
3532
3633
msgstr ""
3634
+ "def regular_function():\n"
3635
+ " ...\n"
3636
+ "\n"
3637
+ "class C:\n"
3638
+ " method = staticmethod(regular_function)"
3533
3639
3534
3640
#: ../../library/functions.rst:1900
3535
3641
msgid "For more information on static methods, see :ref:`types`."
@@ -3633,6 +3739,9 @@ msgid ""
3633
3739
"`getattr` and :func:`super`. The attribute is dynamic and can change "
3634
3740
"whenever the inheritance hierarchy is updated."
3635
3741
msgstr ""
3742
+ "*object_or_type* に対応するクラスの :attr:`~class.__mro__` 属性は、 :func:"
3743
+ "`getattr` と :func:`super` の 両方で使われる、メソッド解決の探索順序を列記し"
3744
+ "ます。 この属性は動的で、継承の階層構造が更新されれば、随時変化します。"
3636
3745
3637
3746
#: ../../library/functions.rst:1962
3638
3747
msgid ""
@@ -3706,6 +3815,10 @@ msgid ""
3706
3815
" super().method(arg) # This does the same thing as:\n"
3707
3816
" # super(C, self).method(arg)"
3708
3817
msgstr ""
3818
+ "class C(B):\n"
3819
+ " def method(self, arg):\n"
3820
+ " super().method(arg) # これは次と同じことを行います:\n"
3821
+ " # super(C, self).method(arg)"
3709
3822
3710
3823
#: ../../library/functions.rst:1996
3711
3824
msgid ""
@@ -3897,6 +4010,12 @@ msgid ""
3897
4010
"(2, 'spice')\n"
3898
4011
"(3, 'everything nice')"
3899
4012
msgstr ""
4013
+ ">>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']):\n"
4014
+ "... print(item)\n"
4015
+ "...\n"
4016
+ "(1, 'sugar')\n"
4017
+ "(2, 'spice')\n"
4018
+ "(3, 'everything nice')"
3900
4019
3901
4020
#: ../../library/functions.rst:2107
3902
4021
msgid ""
@@ -3953,6 +4072,8 @@ msgid ""
3953
4072
">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n"
3954
4073
"[(0, 'fee'), (1, 'fi'), (2, 'fo')]"
3955
4074
msgstr ""
4075
+ ">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n"
4076
+ "[(0, 'fee'), (1, 'fi'), (2, 'fo')]"
3956
4077
3957
4078
#: ../../library/functions.rst:2130
3958
4079
msgid ""
@@ -3969,6 +4090,8 @@ msgid ""
3969
4090
">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n"
3970
4091
"[('a', 1), ('b', 2), ('c', 3)]"
3971
4092
msgstr ""
4093
+ ">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n"
4094
+ "[('a', 1), ('b', 2), ('c', 3)]"
3972
4095
3973
4096
#: ../../library/functions.rst:2137
3974
4097
msgid ""
@@ -4041,6 +4164,13 @@ msgid ""
4041
4164
">>> x == list(x2) and y == list(y2)\n"
4042
4165
"True"
4043
4166
msgstr ""
4167
+ ">>> x = [1, 2, 3]\n"
4168
+ ">>> y = [4, 5, 6]\n"
4169
+ ">>> list(zip(x, y))\n"
4170
+ "[(1, 4), (2, 5), (3, 6)]\n"
4171
+ ">>> x2, y2 = zip(*zip(x, y))\n"
4172
+ ">>> x == list(x2) and y == list(y2)\n"
4173
+ "True"
4044
4174
4045
4175
#: ../../library/functions.rst:2185
4046
4176
msgid "Added the ``strict`` argument."
@@ -4124,15 +4254,15 @@ msgstr ""
4124
4254
4125
4255
#: ../../library/functions.rst:2230
4126
4256
msgid "spam = __import__('spam', globals(), locals(), [], 0)"
4127
- msgstr ""
4257
+ msgstr "spam = __import__('spam', globals(), locals(), [], 0) "
4128
4258
4129
4259
#: ../../library/functions.rst:2232
4130
4260
msgid "The statement ``import spam.ham`` results in this call::"
4131
4261
msgstr "文 ``import spam.ham`` は、この呼び出しになります::"
4132
4262
4133
4263
#: ../../library/functions.rst:2234
4134
4264
msgid "spam = __import__('spam.ham', globals(), locals(), [], 0)"
4135
- msgstr ""
4265
+ msgstr "spam = __import__('spam.ham', globals(), locals(), [], 0) "
4136
4266
4137
4267
#: ../../library/functions.rst:2236
4138
4268
msgid ""
@@ -4157,6 +4287,9 @@ msgid ""
4157
4287
"eggs = _temp.eggs\n"
4158
4288
"saus = _temp.sausage"
4159
4289
msgstr ""
4290
+ "_temp = __import__('spam.ham', globals(), locals(), ['eggs', 'sausage'], 0)\n"
4291
+ "eggs = _temp.eggs\n"
4292
+ "saus = _temp.sausage"
4160
4293
4161
4294
#: ../../library/functions.rst:2246
4162
4295
msgid ""
0 commit comments