55#
66# Translators:
77# tomo, 2018
8+ # Osamu NAKAMURA, 2019
89#
910#, fuzzy
1011msgid ""
@@ -13,7 +14,7 @@ msgstr ""
1314"Report-Msgid-Bugs-To : \n "
1415"POT-Creation-Date : 2019-01-01 15:22+0900\n "
1516"PO-Revision-Date : 2018-06-29 17:45+0000\n "
16- "Last-Translator : tomo, 2018 \n "
17+ "Last-Translator : Osamu NAKAMURA, 2019 \n "
1718"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
1819"MIME-Version : 1.0\n "
1920"Content-Type : text/plain; charset=UTF-8\n "
@@ -307,6 +308,8 @@ msgid ""
307308"to that directory and fire up Python --- you should be able to ``import "
308309"custom`` and play around with Custom objects."
309310msgstr ""
311+ "すると :file:`custom.so` ファイルがサブディレクトリに生成されます。そのディレクトリに移動して、Pythonを起動します -- これで"
312+ " ``import custom`` して、Custom オブジェクトで遊べるようになっているはずです。"
310313
311314#: ../../extending/newtypes_tutorial.rst:210
312315msgid "That wasn't so hard, was it?"
@@ -317,6 +320,7 @@ msgid ""
317320"Of course, the current Custom type is pretty uninteresting. It has no data "
318321"and doesn't do anything. It can't even be subclassed."
319322msgstr ""
323+ "もちろん、現在の Custom 型は面白みに欠けています。何もデータを持っていないし、何もできません。継承してサブクラスを作ることさえできないのです。"
320324
321325#: ../../extending/newtypes_tutorial.rst:216
322326msgid ""
@@ -327,6 +331,11 @@ msgid ""
327331"Packaging User's Guide <https://packaging.python.org/tutorials/distributing-"
328332"packages/>`_."
329333msgstr ""
334+ "この文書では、標準の :mod:`distutils` モジュールを使って C "
335+ "拡張をビルドしていますが、現実のユースケースでは、より新しく、保守されている ``setuptools`` "
336+ "ライブラリを利用することを推奨します。これを行う方法を文書化することはこのドキュメントの範囲外ですので、 `Python Packaging "
337+ "User's Guide <https://packaging.python.org/tutorials/distributing-"
338+ "packages/>`_ を参照してください。"
330339
331340#: ../../extending/newtypes_tutorial.rst:224
332341msgid "Adding data and methods to the Basic example"
@@ -338,6 +347,8 @@ msgid ""
338347"make the type usable as a base class. We'll create a new module, "
339348":mod:`custom2` that adds these capabilities:"
340349msgstr ""
350+ "この基本のサンプルにデータとメソッドを追加してみましょう。ついでに、この型を基底クラスとしても利用できるようにします。ここでは新しいモジュール "
351+ ":mod:`custom2` をつくり、これらの機能を追加します:"
341352
342353#: ../../extending/newtypes_tutorial.rst:233
343354msgid "This version of the module has a number of changes."
@@ -360,6 +371,9 @@ msgid ""
360371"strings containing first and last names. The *number* attribute is a C "
361372"integer."
362373msgstr ""
374+ ":class:`Custom` 型は そのC構造体に 3つのデータ属性 *first* 、 *last* 、および *number* "
375+ "をもつようになりました。 *first* と *last* 属性はファーストネームとラストネームを格納した Python 文字列で、 *number* "
376+ "属性は (C言語の) 整数の値です。"
363377
364378#: ../../extending/newtypes_tutorial.rst:246
365379msgid "The object structure is updated accordingly::"
@@ -386,6 +400,11 @@ msgid ""
386400" might not be :class:`CustomType`, because the object may be an instance of "
387401"a subclass."
388402msgstr ""
403+ "このメソッドは、まず二つのPython 属性の参照カウントをクリアします。 :c:func:`Py_XDECREF` は引数が *NULL* "
404+ "のケースを正しく扱えます( これは、``tp_new`` が途中で失敗した場合に起こりえます)。つぎにオブジェクトの型 "
405+ "(``Py_TYPE(self)`` で算出します)のメンバ :c:member:`~PyTypeObject.tp_free` "
406+ "を呼び出し、オブジェクトのメモリを開放します。オブジェクトはサブクラスのインスタンスかもしれず、その場合オブジェクトの型が "
407+ ":class:`CustomType` とは限らない点に注意してください。"
389408
390409#: ../../extending/newtypes_tutorial.rst:279
391410msgid ""
@@ -400,7 +419,7 @@ msgstr ""
400419msgid ""
401420"We want to make sure that the first and last names are initialized to empty "
402421"strings, so we provide a ``tp_new`` implementation::"
403- msgstr ""
422+ msgstr "ファーストネームとラストネームを空文字列に初期化しておきたいので、``tp_new`` の実装を追加することにしましょう:: "
404423
405424#: ../../extending/newtypes_tutorial.rst:309
406425msgid "and install it in the :c:member:`~PyTypeObject.tp_new` member::"
@@ -431,19 +450,22 @@ msgstr ""
431450msgid ""
432451"``tp_new`` shouldn't call ``tp_init`` explicitly, as the interpreter will do"
433452" it itself."
434- msgstr ""
453+ msgstr "``tp_new`` は明示的に ``tp_init`` を呼び出してはいけません、これはインタープリタが自分で行うためです。 "
435454
436455#: ../../extending/newtypes_tutorial.rst:332
437456msgid ""
438457"The ``tp_new`` implementation calls the :c:member:`~PyTypeObject.tp_alloc` "
439458"slot to allocate memory::"
440459msgstr ""
460+ "この ``tp_new`` の実装は、:c:member:`~PyTypeObject.tp_alloc` スロットを呼び出してメモリを割り当てます::"
441461
442462#: ../../extending/newtypes_tutorial.rst:337
443463msgid ""
444464"Since memory allocation may fail, we must check the "
445465":c:member:`~PyTypeObject.tp_alloc` result against *NULL* before proceeding."
446466msgstr ""
467+ "メモリ割り当ては失敗するかもしれないので、先に進む前に :c:member:`~PyTypeObject.tp_alloc` "
468+ "の結果がNULLでないかチェックする必要があります。"
447469
448470#: ../../extending/newtypes_tutorial.rst:341
449471msgid ""
@@ -521,7 +543,7 @@ msgstr ""
521543
522544#: ../../extending/newtypes_tutorial.rst:420
523545msgid "when we absolutely know that the reference count is greater than 1;"
524- msgstr ""
546+ msgstr "その参照カウントが 1 より大きいと確信できる場合 "
525547
526548#: ../../extending/newtypes_tutorial.rst:422
527549msgid ""
@@ -575,6 +597,8 @@ msgid ""
575597"We define a single method, :meth:`Custom.name()`, that outputs the objects "
576598"name as the concatenation of the first and last names. ::"
577599msgstr ""
600+ "ここでは :meth:`Custom.name()` と呼ばれるメソッドを定義しましょう。これはファーストネーム first とラストネーム last "
601+ "を連結した文字列をそのオブジェクトの名前として返します。 ::"
578602
579603#: ../../extending/newtypes_tutorial.rst:473
580604msgid ""
@@ -585,6 +609,9 @@ msgid ""
585609" to accept a positional argument tuple or keyword argument dictionary. This "
586610"method is equivalent to the Python method:"
587611msgstr ""
612+ "このメソッドは C 関数として実装され、 :class:`Custom` (あるいは :class:`Custom` のサブクラス) "
613+ "のインスタンスを第一引数として受けとります。メソッドはつねにそのインスタンスを最初の引数として受けとらなければなりません。しばしば位置引数とキーワード引数も受けとりますが、今回はなにも必要ないので、固定引数のタプルもキーワード引数の辞書も取らないことにします。このメソッドは"
614+ " Python の以下のメソッドと等価です:"
588615
589616#: ../../extending/newtypes_tutorial.rst:485
590617msgid ""
0 commit comments