@@ -15,7 +15,7 @@ msgid ""
15
15
msgstr ""
16
16
"Project-Id-Version : Python 3.13\n "
17
17
"Report-Msgid-Bugs-To : \n "
18
- "POT-Creation-Date : 2025-01-24 14:16 +0000\n "
18
+ "POT-Creation-Date : 2025-02-03 17:40 +0000\n "
19
19
"PO-Revision-Date : 2021-06-28 00:49+0000\n "
20
20
"Last-Translator : 石井明久, 2024\n "
21
21
"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
@@ -749,18 +749,12 @@ msgid ""
749
749
msgstr ""
750
750
"成功すると ``0`` を返し、エラーになると例外を送出して ``-1`` を返します。"
751
751
752
- #: ../../c-api/module.rst:526
753
- msgid ""
754
- "Return ``-1`` if *value* is ``NULL``. It must be called with an exception "
755
- "raised in this case."
756
- msgstr ""
757
-
758
- #: ../../c-api/module.rst:529 ../../c-api/module.rst:576
759
- #: ../../c-api/module.rst:603
752
+ #: ../../c-api/module.rst:526 ../../c-api/module.rst:577
753
+ #: ../../c-api/module.rst:604
760
754
msgid "Example usage::"
761
755
msgstr "使用例::"
762
756
763
- #: ../../c-api/module.rst:531
757
+ #: ../../c-api/module.rst:528
764
758
msgid ""
765
759
"static int\n"
766
760
"add_spam(PyObject *module, int value)\n"
@@ -775,15 +769,22 @@ msgid ""
775
769
" }"
776
770
msgstr ""
777
771
778
- #: ../../c-api/module.rst:543
772
+ #: ../../c-api/module.rst:540
773
+ msgid ""
774
+ "To be convenient, the function accepts ``NULL`` *value* with an exception "
775
+ "set. In this case, return ``-1`` and just leave the raised exception "
776
+ "unchanged."
777
+ msgstr ""
778
+
779
+ #: ../../c-api/module.rst:544
779
780
msgid ""
780
781
"The example can also be written without checking explicitly if *obj* is "
781
782
"``NULL``::"
782
783
msgstr ""
783
784
"この例は、明示的に *obj* が ``NULL`` であることを確認せずに書くこともできま"
784
785
"す::"
785
786
786
- #: ../../c-api/module.rst:546
787
+ #: ../../c-api/module.rst:547
787
788
msgid ""
788
789
"static int\n"
789
790
"add_spam(PyObject *module, int value)\n"
@@ -795,15 +796,15 @@ msgid ""
795
796
" }"
796
797
msgstr ""
797
798
798
- #: ../../c-api/module.rst:555
799
+ #: ../../c-api/module.rst:556
799
800
msgid ""
800
801
"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this "
801
802
"case, since *obj* can be ``NULL``."
802
803
msgstr ""
803
804
"この場合は、 *obj* が ``NULL`` でありうるため、 ``Py_DECREF()`` の代わりに "
804
805
"``Py_XDECREF()`` を呼び出す必要があることに注意してください。"
805
806
806
- #: ../../c-api/module.rst:558
807
+ #: ../../c-api/module.rst:559
807
808
msgid ""
808
809
"The number of different *name* strings passed to this function should be "
809
810
"kept small, usually by only using statically allocated strings as *name*. "
@@ -813,47 +814,47 @@ msgid ""
813
814
"internally to create a key object."
814
815
msgstr ""
815
816
816
- #: ../../c-api/module.rst:571
817
+ #: ../../c-api/module.rst:572
817
818
msgid ""
818
819
"Similar to :c:func:`PyModule_AddObjectRef`, but \" steals\" a reference to "
819
820
"*value*. It can be called with a result of function that returns a new "
820
821
"reference without bothering to check its result or even saving it to a "
821
822
"variable."
822
823
msgstr ""
823
824
824
- #: ../../c-api/module.rst:578
825
+ #: ../../c-api/module.rst:579
825
826
msgid ""
826
827
"if (PyModule_Add(module, \" spam\" , PyBytes_FromString(value)) < 0) {\n"
827
828
" goto error;\n"
828
829
"}"
829
830
msgstr ""
830
831
831
- #: ../../c-api/module.rst:587
832
+ #: ../../c-api/module.rst:588
832
833
msgid ""
833
834
"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to "
834
835
"*value* on success (if it returns ``0``)."
835
836
msgstr ""
836
837
837
- #: ../../c-api/module.rst:590
838
+ #: ../../c-api/module.rst:591
838
839
msgid ""
839
840
"The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions "
840
841
"are recommended, since it is easy to introduce reference leaks by misusing "
841
842
"the :c:func:`PyModule_AddObject` function."
842
843
msgstr ""
843
844
844
- #: ../../c-api/module.rst:597
845
+ #: ../../c-api/module.rst:598
845
846
msgid ""
846
847
"Unlike other functions that steal references, ``PyModule_AddObject()`` only "
847
848
"releases the reference to *value* **on success**."
848
849
msgstr ""
849
850
850
- #: ../../c-api/module.rst:600
851
+ #: ../../c-api/module.rst:601
851
852
msgid ""
852
853
"This means that its return value must be checked, and calling code must :c:"
853
854
"func:`Py_XDECREF` *value* manually on error."
854
855
msgstr ""
855
856
856
- #: ../../c-api/module.rst:605
857
+ #: ../../c-api/module.rst:606
857
858
msgid ""
858
859
"PyObject *obj = PyBytes_FromString(value);\n"
859
860
"if (PyModule_AddObject(module, \" spam\" , obj) < 0) {\n"
@@ -867,59 +868,59 @@ msgid ""
867
868
"// Py_XDECREF(obj) is not needed here."
868
869
msgstr ""
869
870
870
- #: ../../c-api/module.rst:618
871
+ #: ../../c-api/module.rst:619
871
872
msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`."
872
873
msgstr ""
873
874
874
- #: ../../c-api/module.rst:623
875
+ #: ../../c-api/module.rst:624
875
876
msgid ""
876
877
"Add an integer constant to *module* as *name*. This convenience function "
877
878
"can be used from the module's initialization function. Return ``-1`` with an "
878
879
"exception set on error, ``0`` on success."
879
880
msgstr ""
880
881
881
- #: ../../c-api/module.rst:627
882
+ #: ../../c-api/module.rst:628
882
883
msgid ""
883
884
"This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:"
884
885
"func:`PyModule_AddObjectRef`; see their documentation for details."
885
886
msgstr ""
886
887
887
- #: ../../c-api/module.rst:633
888
+ #: ../../c-api/module.rst:634
888
889
msgid ""
889
890
"Add a string constant to *module* as *name*. This convenience function can "
890
891
"be used from the module's initialization function. The string *value* must "
891
892
"be ``NULL``-terminated. Return ``-1`` with an exception set on error, ``0`` "
892
893
"on success."
893
894
msgstr ""
894
895
895
- #: ../../c-api/module.rst:638
896
+ #: ../../c-api/module.rst:639
896
897
msgid ""
897
898
"This is a convenience function that calls :c:func:"
898
899
"`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their "
899
900
"documentation for details."
900
901
msgstr ""
901
902
902
- #: ../../c-api/module.rst:645
903
+ #: ../../c-api/module.rst:646
903
904
msgid ""
904
905
"Add an int constant to *module*. The name and the value are taken from "
905
906
"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
906
907
"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` "
907
908
"with an exception set on error, ``0`` on success."
908
909
msgstr ""
909
910
910
- #: ../../c-api/module.rst:653
911
+ #: ../../c-api/module.rst:654
911
912
msgid "Add a string constant to *module*."
912
913
msgstr "文字列定数を *module* に追加します。"
913
914
914
- #: ../../c-api/module.rst:657
915
+ #: ../../c-api/module.rst:658
915
916
msgid ""
916
917
"Add a type object to *module*. The type object is finalized by calling "
917
918
"internally :c:func:`PyType_Ready`. The name of the type object is taken from "
918
919
"the last component of :c:member:`~PyTypeObject.tp_name` after dot. Return "
919
920
"``-1`` with an exception set on error, ``0`` on success."
920
921
msgstr ""
921
922
922
- #: ../../c-api/module.rst:667
923
+ #: ../../c-api/module.rst:668
923
924
msgid ""
924
925
"Indicate that *module* does or does not support running without the global "
925
926
"interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. "
@@ -930,11 +931,11 @@ msgid ""
930
931
"Return ``-1`` with an exception set on error, ``0`` on success."
931
932
msgstr ""
932
933
933
- #: ../../c-api/module.rst:680
934
+ #: ../../c-api/module.rst:681
934
935
msgid "Module lookup"
935
936
msgstr "モジュール検索"
936
937
937
- #: ../../c-api/module.rst:682
938
+ #: ../../c-api/module.rst:683
938
939
msgid ""
939
940
"Single-phase initialization creates singleton modules that can be looked up "
940
941
"in the context of the current interpreter. This allows the module object to "
@@ -945,7 +946,7 @@ msgstr ""
945
946
"これによって、後からモジュール定義への参照だけでモジュールオブジェクトが取得"
946
947
"できます。"
947
948
948
- #: ../../c-api/module.rst:686
949
+ #: ../../c-api/module.rst:687
949
950
msgid ""
950
951
"These functions will not work on modules created using multi-phase "
951
952
"initialization, since multiple such modules can be created from a single "
@@ -954,7 +955,7 @@ msgstr ""
954
955
"多段階初期化を使うと単一の定義から複数のモジュールが作成できるので、これらの"
955
956
"関数は多段階初期化を使って作成されたモジュールには使えません。"
956
957
957
- #: ../../c-api/module.rst:691
958
+ #: ../../c-api/module.rst:692
958
959
msgid ""
959
960
"Returns the module object that was created from *def* for the current "
960
961
"interpreter. This method requires that the module object has been attached "
@@ -968,7 +969,7 @@ msgstr ""
968
969
"ジュールオブジェクトが見付からない、もしくは事前にインタプリタの state に連結"
969
970
"されていない場合は、 ``NULL`` を返します。"
970
971
971
- #: ../../c-api/module.rst:698
972
+ #: ../../c-api/module.rst:699
972
973
msgid ""
973
974
"Attaches the module object passed to the function to the interpreter state. "
974
975
"This allows the module object to be accessible via :c:func:"
@@ -978,11 +979,11 @@ msgstr ""
978
979
"の関数を使うことで :c:func:`PyState_FindModule` からモジュールオブジェクトに"
979
980
"アクセスできるようになります。"
980
981
981
- #: ../../c-api/module.rst:701
982
+ #: ../../c-api/module.rst:702
982
983
msgid "Only effective on modules created using single-phase initialization."
983
984
msgstr "一段階初期化を使って作成されたモジュールにのみ有効です。"
984
985
985
- #: ../../c-api/module.rst:703
986
+ #: ../../c-api/module.rst:704
986
987
msgid ""
987
988
"Python calls ``PyState_AddModule`` automatically after importing a module, "
988
989
"so it is unnecessary (but harmless) to call it from module initialization "
@@ -993,15 +994,15 @@ msgid ""
993
994
"state updates)."
994
995
msgstr ""
995
996
996
- #: ../../c-api/module.rst:711 ../../c-api/module.rst:722
997
+ #: ../../c-api/module.rst:712 ../../c-api/module.rst:723
997
998
msgid "The caller must hold the GIL."
998
999
msgstr "呼び出し側はGILを獲得しなければなりません。"
999
1000
1000
- #: ../../c-api/module.rst:713
1001
+ #: ../../c-api/module.rst:714
1001
1002
msgid "Return ``-1`` with an exception set on error, ``0`` on success."
1002
1003
msgstr ""
1003
1004
1004
- #: ../../c-api/module.rst:719
1005
+ #: ../../c-api/module.rst:720
1005
1006
msgid ""
1006
1007
"Removes the module object created from *def* from the interpreter state. "
1007
1008
"Return ``-1`` with an exception set on error, ``0`` on success."
0 commit comments