| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5c274b6 commit f3054f4
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ msgid "" | |||
| 11 | 11 | msgstr "" | |
| 12 | 12 | "Project-Id-Version: Python 3.15\n" | |
| 13 | 13 | "Report-Msgid-Bugs-To: \n" | |
| 14 | - "POT-Creation-Date: 2026-06-02 00:16+0000\n" | ||
| 14 | + "POT-Creation-Date: 2026-06-05 16:27+0000\n" | ||
| 15 | 15 | "PO-Revision-Date: 2025-09-16 00:00+0000\n" | |
| 16 | 16 | "Last-Translator: python-doc bot, 2025\n" | |
| 17 | 17 | "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" | |
@@ -171,8 +171,8 @@ msgstr "" | |||
| 171 | 171 | msgid "" | |
| 172 | 172 | "Please note, that these functions are :term:`soft deprecated` since Python " | |
| 173 | 173 | "3.15. Avoid using this API in a new code to do complex arithmetic: either " | |
| 174 | - "use the `Number Protocol <number>`_ API or use native complex types, like :c:" | ||
| 175 | - "expr:`double complex`." | ||
| 174 | + "use the :ref:`Number Protocol <number>` API or use native complex types, " | ||
| 175 | + "like :c:expr:`double complex`." | ||
| 176 | 176 | msgstr "" | |
| 177 | 177 | ||
| 178 | 178 | #: ../../c-api/complex.rst:139 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ msgid "" | |||
| 13 | 13 | msgstr "" | |
| 14 | 14 | "Project-Id-Version: Python 3.15\n" | |
| 15 | 15 | "Report-Msgid-Bugs-To: \n" | |
| 16 | - "POT-Creation-Date: 2026-06-03 18:19+0000\n" | ||
| 16 | + "POT-Creation-Date: 2026-06-05 16:27+0000\n" | ||
| 17 | 17 | "PO-Revision-Date: 2025-09-16 00:00+0000\n" | |
| 18 | 18 | "Last-Translator: TENMYO Masakazu, 2026\n" | |
| 19 | 19 | "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" | |
@@ -1060,6 +1060,10 @@ msgid "" | |||
| 1060 | 1060 | "argument name in the caller and callee, and consequently no call-by-" | |
| 1061 | 1061 | "reference. You can achieve the desired effect in a number of ways." | |
| 1062 | 1062 | msgstr "" | |
| 1063 | + "Pythonにおける実引数は代入にて渡されることと留意してください。 代入はオブジェ" | ||
| 1064 | + "クトへの参照を作るだけなので、呼び出し元/先での引数名の間にエイリアスは存在せ" | ||
| 1065 | + "ず、従って参照渡しになりません。 目的の動作を実現するには、いくつか方法があり" | ||
| 1066 | + "ます。" | ||
| 1063 | 1067 | ||
| 1064 | 1068 | #: ../../faq/programming.rst:518 | |
| 1065 | 1069 | msgid "By returning a tuple of the results::" | |
@@ -1076,6 +1080,14 @@ msgid "" | |||
| 1076 | 1080 | ">>> func1(x, y)\n" | |
| 1077 | 1081 | "('new-value', 100)" | |
| 1078 | 1082 | msgstr "" | |
| 1083 | + ">>> def func1(a, b):\n" | ||
| 1084 | + "... a = 'new-value' # a と b はローカル名で\n" | ||
| 1085 | + "... b = b + 1 # 新しいオブジェクトが代入され\n" | ||
| 1086 | + "... return a, b # 新しい値一式を返す\n" | ||
| 1087 | + "...\n" | ||
| 1088 | + ">>> x, y = 'old-value', 99\n" | ||
| 1089 | + ">>> func1(x, y)\n" | ||
| 1090 | + "('new-value', 100)" | ||
| 1079 | 1091 | ||
| 1080 | 1092 | #: ../../faq/programming.rst:529 | |
| 1081 | 1093 | msgid "This is almost always the clearest solution." | |
@@ -1103,10 +1115,18 @@ msgid "" | |||
| 1103 | 1115 | ">>> args\n" | |
| 1104 | 1116 | "['new-value', 100]" | |
| 1105 | 1117 | msgstr "" | |
| 1118 | + ">>> def func2(a):\n" | ||
| 1119 | + "... a[0] = 'new-value' # 'a' は mutable list への参照\n" | ||
| 1120 | + "... a[1] = a[1] + 1 # 共有されたオブジェクトを変える\n" | ||
| 1121 | + "...\n" | ||
| 1122 | + ">>> args = ['old-value', 99]\n" | ||
| 1123 | + ">>> func2(args)\n" | ||
| 1124 | + ">>> args\n" | ||
| 1125 | + "['new-value', 100]" | ||
| 1106 | 1126 | ||
| 1107 | 1127 | #: ../../faq/programming.rst:544 | |
| 1108 | 1128 | msgid "By passing in a dictionary that gets mutated::" | |
| 1109 | - msgstr "変更される辞書に渡すことによって::" | ||
| 1129 | + msgstr "変更を受ける辞書を渡すことによって::" | ||
| 1110 | 1130 | ||
| 1111 | 1131 | #: ../../faq/programming.rst:546 | |
| 1112 | 1132 | msgid "" | |
@@ -1119,6 +1139,14 @@ msgid "" | |||
| 1119 | 1139 | ">>> args\n" | |
| 1120 | 1140 | "{'a': 'new-value', 'b': 100}" | |
| 1121 | 1141 | msgstr "" | |
| 1142 | + ">>> def func3(args):\n" | ||
| 1143 | + "... args['a'] = 'new-value' # args は mutable dictionary\n" | ||
| 1144 | + "... args['b'] = args['b'] + 1 # インプレースで変更\n" | ||
| 1145 | + "...\n" | ||
| 1146 | + ">>> args = {'a': 'old-value', 'b': 99}\n" | ||
| 1147 | + ">>> func3(args)\n" | ||
| 1148 | + ">>> args\n" | ||
| 1149 | + "{'a': 'new-value', 'b': 100}" | ||
| 1122 | 1150 | ||
| 1123 | 1151 | #: ../../faq/programming.rst:555 | |
| 1124 | 1152 | msgid "Or bundle up values in a class instance::" | |
@@ -1140,6 +1168,19 @@ msgid "" | |||
| 1140 | 1168 | ">>> vars(args)\n" | |
| 1141 | 1169 | "{'a': 'new-value', 'b': 100}" | |
| 1142 | 1170 | msgstr "" | |
| 1171 | + ">>> class Namespace:\n" | ||
| 1172 | + "... def __init__(self, /, **args):\n" | ||
| 1173 | + "... for key, value in args.items():\n" | ||
| 1174 | + "... setattr(self, key, value)\n" | ||
| 1175 | + "...\n" | ||
| 1176 | + ">>> def func4(args):\n" | ||
| 1177 | + "... args.a = 'new-value' # args は mutable Namespace\n" | ||
| 1178 | + "... args.b = args.b + 1 # オブジェクトをインプレースで変更\n" | ||
| 1179 | + "...\n" | ||
| 1180 | + ">>> args = Namespace(a='old-value', b=99)\n" | ||
| 1181 | + ">>> func4(args)\n" | ||
| 1182 | + ">>> vars(args)\n" | ||
| 1183 | + "{'a': 'new-value', 'b': 100}" | ||
| 1143 | 1184 | ||
| 1144 | 1185 | #: ../../faq/programming.rst:572 | |
| 1145 | 1186 | msgid "There's almost never a good reason to get this complicated." | |
| Back | FazBrowse Home | New Git URL |
0 commit comments