7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.13\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2024-09-23 07:52+0800 \n "
10
+ "POT-Creation-Date : 2025-05-21 00:17+0000 \n "
11
11
"PO-Revision-Date : 2018-05-23 14:40+0000\n "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -43,37 +43,45 @@ msgid ""
43
43
"``'__console__'`` and key ``'__doc__'`` set to ``None``."
44
44
msgstr ""
45
45
46
- #: ../../library/code.rst:28
46
+ #: ../../library/code.rst:25
47
+ msgid ""
48
+ "Note that functions and classes objects created under an :class:`!"
49
+ "InteractiveInterpreter` instance will belong to the namespace specified by "
50
+ "*locals*. They are only pickleable if *locals* is the namespace of an "
51
+ "existing module."
52
+ msgstr ""
53
+
54
+ #: ../../library/code.rst:34
47
55
msgid ""
48
56
"Closely emulate the behavior of the interactive Python interpreter. This "
49
57
"class builds on :class:`InteractiveInterpreter` and adds prompting using the "
50
58
"familiar ``sys.ps1`` and ``sys.ps2``, and input buffering. If *local_exit* "
51
- "is true, ``exit()`` and ``quit()`` in the console will not "
52
- "raise :exc: `SystemExit`, but instead return to the calling code."
59
+ "is true, ``exit()`` and ``quit()`` in the console will not raise :exc: "
60
+ "`SystemExit`, but instead return to the calling code."
53
61
msgstr ""
54
62
55
- #: ../../library/code.rst:34 ../../library/code.rst:52
63
+ #: ../../library/code.rst:40 ../../library/code.rst:58
56
64
msgid "Added *local_exit* parameter."
57
65
msgstr "新增 *local_exit* 參數。"
58
66
59
- #: ../../library/code.rst:39
67
+ #: ../../library/code.rst:45
60
68
msgid ""
61
69
"Convenience function to run a read-eval-print loop. This creates a new "
62
70
"instance of :class:`InteractiveConsole` and sets *readfunc* to be used as "
63
71
"the :meth:`InteractiveConsole.raw_input` method, if provided. If *local* is "
64
72
"provided, it is passed to the :class:`InteractiveConsole` constructor for "
65
73
"use as the default namespace for the interpreter loop. If *local_exit* is "
66
- "provided, it is passed to the :class:`InteractiveConsole` constructor. "
67
- "The : meth:`~InteractiveConsole.interact` method of the instance is then run "
68
- "with *banner* and *exitmsg* passed as the banner and exit message to use, if "
74
+ "provided, it is passed to the :class:`InteractiveConsole` constructor. The : "
75
+ "meth:`~InteractiveConsole.interact` method of the instance is then run with "
76
+ "*banner* and *exitmsg* passed as the banner and exit message to use, if "
69
77
"provided. The console object is discarded after use."
70
78
msgstr ""
71
79
72
- #: ../../library/code.rst:49
80
+ #: ../../library/code.rst:55
73
81
msgid "Added *exitmsg* parameter."
74
82
msgstr "新增 *exitmsg* 參數。"
75
83
76
- #: ../../library/code.rst:57
84
+ #: ../../library/code.rst:63
77
85
msgid ""
78
86
"This function is useful for programs that want to emulate Python's "
79
87
"interpreter main loop (a.k.a. the read-eval-print loop). The tricky part is "
@@ -83,15 +91,15 @@ msgid ""
83
91
"real interpreter main loop."
84
92
msgstr ""
85
93
86
- #: ../../library/code.rst:64
94
+ #: ../../library/code.rst:70
87
95
msgid ""
88
96
"*source* is the source string; *filename* is the optional filename from "
89
97
"which source was read, defaulting to ``'<input>'``; and *symbol* is the "
90
98
"optional grammar start symbol, which should be ``'single'`` (the default), "
91
99
"``'eval'`` or ``'exec'``."
92
100
msgstr ""
93
101
94
- #: ../../library/code.rst:69
102
+ #: ../../library/code.rst:75
95
103
msgid ""
96
104
"Returns a code object (the same as ``compile(source, filename, symbol)``) if "
97
105
"the command is complete and valid; ``None`` if the command is incomplete; "
@@ -100,60 +108,60 @@ msgid ""
100
108
"contains an invalid literal."
101
109
msgstr ""
102
110
103
- #: ../../library/code.rst:79
111
+ #: ../../library/code.rst:85
104
112
msgid "Interactive Interpreter Objects"
105
113
msgstr ""
106
114
107
- #: ../../library/code.rst:84
115
+ #: ../../library/code.rst:90
108
116
msgid ""
109
117
"Compile and run some source in the interpreter. Arguments are the same as "
110
118
"for :func:`compile_command`; the default for *filename* is ``'<input>'``, "
111
119
"and for *symbol* is ``'single'``. One of several things can happen:"
112
120
msgstr ""
113
121
114
- #: ../../library/code.rst:88
122
+ #: ../../library/code.rst:94
115
123
msgid ""
116
- "The input is incorrect; :func:`compile_command` raised an exception "
117
- "(:exc: `SyntaxError` or :exc:`OverflowError`). A syntax traceback will be "
118
- "printed by calling the :meth:`showsyntaxerror` method. :meth:`runsource` "
119
- "returns ``False``."
124
+ "The input is incorrect; :func:`compile_command` raised an exception (:exc: "
125
+ "`SyntaxError` or :exc:`OverflowError`). A syntax traceback will be printed "
126
+ "by calling the :meth:`showsyntaxerror` method. :meth:`runsource` returns "
127
+ "``False``."
120
128
msgstr ""
121
129
122
- #: ../../library/code.rst:93
130
+ #: ../../library/code.rst:99
123
131
msgid ""
124
132
"The input is incomplete, and more input is required; :func:`compile_command` "
125
133
"returned ``None``. :meth:`runsource` returns ``True``."
126
134
msgstr ""
127
135
128
- #: ../../library/code.rst:96
136
+ #: ../../library/code.rst:102
129
137
msgid ""
130
138
"The input is complete; :func:`compile_command` returned a code object. The "
131
139
"code is executed by calling the :meth:`runcode` (which also handles run-time "
132
140
"exceptions, except for :exc:`SystemExit`). :meth:`runsource` returns "
133
141
"``False``."
134
142
msgstr ""
135
143
136
- #: ../../library/code.rst:100
144
+ #: ../../library/code.rst:106
137
145
msgid ""
138
- "The return value can be used to decide whether to use ``sys.ps1`` or "
139
- "``sys. ps2`` to prompt the next line."
146
+ "The return value can be used to decide whether to use ``sys.ps1`` or ``sys. "
147
+ "ps2`` to prompt the next line."
140
148
msgstr ""
141
149
142
- #: ../../library/code.rst:106
150
+ #: ../../library/code.rst:112
143
151
msgid ""
144
152
"Execute a code object. When an exception occurs, :meth:`showtraceback` is "
145
- "called to display a traceback. All exceptions are caught "
146
- "except :exc: `SystemExit`, which is allowed to propagate."
153
+ "called to display a traceback. All exceptions are caught except :exc: "
154
+ "`SystemExit`, which is allowed to propagate."
147
155
msgstr ""
148
156
149
- #: ../../library/code.rst:110
157
+ #: ../../library/code.rst:116
150
158
msgid ""
151
159
"A note about :exc:`KeyboardInterrupt`: this exception may occur elsewhere in "
152
160
"this code, and may not always be caught. The caller should be prepared to "
153
161
"deal with it."
154
162
msgstr ""
155
163
156
- #: ../../library/code.rst:117
164
+ #: ../../library/code.rst:123
157
165
msgid ""
158
166
"Display the syntax error that just occurred. This does not display a stack "
159
167
"trace because there isn't one for syntax errors. If *filename* is given, it "
@@ -162,38 +170,38 @@ msgid ""
162
170
"string. The output is written by the :meth:`write` method."
163
171
msgstr ""
164
172
165
- #: ../../library/code.rst:126
173
+ #: ../../library/code.rst:132
166
174
msgid ""
167
175
"Display the exception that just occurred. We remove the first stack item "
168
176
"because it is within the interpreter object implementation. The output is "
169
177
"written by the :meth:`write` method."
170
178
msgstr ""
171
179
172
- #: ../../library/code.rst:130
180
+ #: ../../library/code.rst:136
173
181
msgid ""
174
182
"The full chained traceback is displayed instead of just the primary "
175
183
"traceback."
176
184
msgstr ""
177
185
178
- #: ../../library/code.rst:136
186
+ #: ../../library/code.rst:142
179
187
msgid ""
180
188
"Write a string to the standard error stream (``sys.stderr``). Derived "
181
189
"classes should override this to provide the appropriate output handling as "
182
190
"needed."
183
191
msgstr ""
184
192
185
- #: ../../library/code.rst:143
193
+ #: ../../library/code.rst:149
186
194
msgid "Interactive Console Objects"
187
195
msgstr ""
188
196
189
- #: ../../library/code.rst:145
197
+ #: ../../library/code.rst:151
190
198
msgid ""
191
- "The :class:`InteractiveConsole` class is a subclass "
192
- "of :class: `InteractiveInterpreter`, and so offers all the methods of the "
193
- "interpreter objects as well as the following additions."
199
+ "The :class:`InteractiveConsole` class is a subclass of :class: "
200
+ "`InteractiveInterpreter`, and so offers all the methods of the interpreter "
201
+ "objects as well as the following additions."
194
202
msgstr ""
195
203
196
- #: ../../library/code.rst:152
204
+ #: ../../library/code.rst:158
197
205
msgid ""
198
206
"Closely emulate the interactive Python console. The optional *banner* "
199
207
"argument specify the banner to print before the first interaction; by "
@@ -203,22 +211,22 @@ msgid ""
203
211
"close!)."
204
212
msgstr ""
205
213
206
- #: ../../library/code.rst:158
214
+ #: ../../library/code.rst:164
207
215
msgid ""
208
216
"The optional *exitmsg* argument specifies an exit message printed when "
209
217
"exiting. Pass the empty string to suppress the exit message. If *exitmsg* is "
210
218
"not given or ``None``, a default message is printed."
211
219
msgstr ""
212
220
213
- #: ../../library/code.rst:162
221
+ #: ../../library/code.rst:168
214
222
msgid "To suppress printing any banner, pass an empty string."
215
223
msgstr ""
216
224
217
- #: ../../library/code.rst:165
225
+ #: ../../library/code.rst:171
218
226
msgid "Print an exit message when exiting."
219
227
msgstr ""
220
228
221
- #: ../../library/code.rst:171
229
+ #: ../../library/code.rst:177
222
230
msgid ""
223
231
"Push a line of source text to the interpreter. The line should not have a "
224
232
"trailing newline; it may have internal newlines. The line is appended to a "
@@ -231,14 +239,14 @@ msgid ""
231
239
"same as :meth:`!runsource`)."
232
240
msgstr ""
233
241
234
- #: ../../library/code.rst:183
242
+ #: ../../library/code.rst:189
235
243
msgid "Remove any unhandled source text from the input buffer."
236
244
msgstr ""
237
245
238
- #: ../../library/code.rst:188
246
+ #: ../../library/code.rst:194
239
247
msgid ""
240
248
"Write a prompt and read a line. The returned line does not include the "
241
- "trailing newline. When the user enters the EOF key "
242
- "sequence, :exc: `EOFError` is raised. The base implementation reads from "
243
- "``sys.stdin``; a subclass may replace this with a different implementation."
249
+ "trailing newline. When the user enters the EOF key sequence, :exc: "
250
+ "`EOFError` is raised. The base implementation reads from ``sys.stdin``; a "
251
+ "subclass may replace this with a different implementation."
244
252
msgstr ""
0 commit comments