Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c37dff0

Browse files
sync with cpython 35eb3b82
1 parent 9975605 commit c37dff0

File tree

4 files changed

+896
-869
lines changed

4 files changed

+896
-869
lines changed

library/code.po

Lines changed: 56 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.13\n"
99
"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"
1111
"PO-Revision-Date: 2018-05-23 14:40+0000\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -43,37 +43,45 @@ msgid ""
4343
"``'__console__'`` and key ``'__doc__'`` set to ``None``."
4444
msgstr ""
4545

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
4755
msgid ""
4856
"Closely emulate the behavior of the interactive Python interpreter. This "
4957
"class builds on :class:`InteractiveInterpreter` and adds prompting using the "
5058
"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."
5361
msgstr ""
5462

55-
#: ../../library/code.rst:34 ../../library/code.rst:52
63+
#: ../../library/code.rst:40 ../../library/code.rst:58
5664
msgid "Added *local_exit* parameter."
5765
msgstr "新增 *local_exit* 參數。"
5866

59-
#: ../../library/code.rst:39
67+
#: ../../library/code.rst:45
6068
msgid ""
6169
"Convenience function to run a read-eval-print loop. This creates a new "
6270
"instance of :class:`InteractiveConsole` and sets *readfunc* to be used as "
6371
"the :meth:`InteractiveConsole.raw_input` method, if provided. If *local* is "
6472
"provided, it is passed to the :class:`InteractiveConsole` constructor for "
6573
"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 "
6977
"provided. The console object is discarded after use."
7078
msgstr ""
7179

72-
#: ../../library/code.rst:49
80+
#: ../../library/code.rst:55
7381
msgid "Added *exitmsg* parameter."
7482
msgstr "新增 *exitmsg* 參數。"
7583

76-
#: ../../library/code.rst:57
84+
#: ../../library/code.rst:63
7785
msgid ""
7886
"This function is useful for programs that want to emulate Python's "
7987
"interpreter main loop (a.k.a. the read-eval-print loop). The tricky part is "
@@ -83,15 +91,15 @@ msgid ""
8391
"real interpreter main loop."
8492
msgstr ""
8593

86-
#: ../../library/code.rst:64
94+
#: ../../library/code.rst:70
8795
msgid ""
8896
"*source* is the source string; *filename* is the optional filename from "
8997
"which source was read, defaulting to ``'<input>'``; and *symbol* is the "
9098
"optional grammar start symbol, which should be ``'single'`` (the default), "
9199
"``'eval'`` or ``'exec'``."
92100
msgstr ""
93101

94-
#: ../../library/code.rst:69
102+
#: ../../library/code.rst:75
95103
msgid ""
96104
"Returns a code object (the same as ``compile(source, filename, symbol)``) if "
97105
"the command is complete and valid; ``None`` if the command is incomplete; "
@@ -100,60 +108,60 @@ msgid ""
100108
"contains an invalid literal."
101109
msgstr ""
102110

103-
#: ../../library/code.rst:79
111+
#: ../../library/code.rst:85
104112
msgid "Interactive Interpreter Objects"
105113
msgstr ""
106114

107-
#: ../../library/code.rst:84
115+
#: ../../library/code.rst:90
108116
msgid ""
109117
"Compile and run some source in the interpreter. Arguments are the same as "
110118
"for :func:`compile_command`; the default for *filename* is ``'<input>'``, "
111119
"and for *symbol* is ``'single'``. One of several things can happen:"
112120
msgstr ""
113121

114-
#: ../../library/code.rst:88
122+
#: ../../library/code.rst:94
115123
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``."
120128
msgstr ""
121129

122-
#: ../../library/code.rst:93
130+
#: ../../library/code.rst:99
123131
msgid ""
124132
"The input is incomplete, and more input is required; :func:`compile_command` "
125133
"returned ``None``. :meth:`runsource` returns ``True``."
126134
msgstr ""
127135

128-
#: ../../library/code.rst:96
136+
#: ../../library/code.rst:102
129137
msgid ""
130138
"The input is complete; :func:`compile_command` returned a code object. The "
131139
"code is executed by calling the :meth:`runcode` (which also handles run-time "
132140
"exceptions, except for :exc:`SystemExit`). :meth:`runsource` returns "
133141
"``False``."
134142
msgstr ""
135143

136-
#: ../../library/code.rst:100
144+
#: ../../library/code.rst:106
137145
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."
140148
msgstr ""
141149

142-
#: ../../library/code.rst:106
150+
#: ../../library/code.rst:112
143151
msgid ""
144152
"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."
147155
msgstr ""
148156

149-
#: ../../library/code.rst:110
157+
#: ../../library/code.rst:116
150158
msgid ""
151159
"A note about :exc:`KeyboardInterrupt`: this exception may occur elsewhere in "
152160
"this code, and may not always be caught. The caller should be prepared to "
153161
"deal with it."
154162
msgstr ""
155163

156-
#: ../../library/code.rst:117
164+
#: ../../library/code.rst:123
157165
msgid ""
158166
"Display the syntax error that just occurred. This does not display a stack "
159167
"trace because there isn't one for syntax errors. If *filename* is given, it "
@@ -162,38 +170,38 @@ msgid ""
162170
"string. The output is written by the :meth:`write` method."
163171
msgstr ""
164172

165-
#: ../../library/code.rst:126
173+
#: ../../library/code.rst:132
166174
msgid ""
167175
"Display the exception that just occurred. We remove the first stack item "
168176
"because it is within the interpreter object implementation. The output is "
169177
"written by the :meth:`write` method."
170178
msgstr ""
171179

172-
#: ../../library/code.rst:130
180+
#: ../../library/code.rst:136
173181
msgid ""
174182
"The full chained traceback is displayed instead of just the primary "
175183
"traceback."
176184
msgstr ""
177185

178-
#: ../../library/code.rst:136
186+
#: ../../library/code.rst:142
179187
msgid ""
180188
"Write a string to the standard error stream (``sys.stderr``). Derived "
181189
"classes should override this to provide the appropriate output handling as "
182190
"needed."
183191
msgstr ""
184192

185-
#: ../../library/code.rst:143
193+
#: ../../library/code.rst:149
186194
msgid "Interactive Console Objects"
187195
msgstr ""
188196

189-
#: ../../library/code.rst:145
197+
#: ../../library/code.rst:151
190198
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."
194202
msgstr ""
195203

196-
#: ../../library/code.rst:152
204+
#: ../../library/code.rst:158
197205
msgid ""
198206
"Closely emulate the interactive Python console. The optional *banner* "
199207
"argument specify the banner to print before the first interaction; by "
@@ -203,22 +211,22 @@ msgid ""
203211
"close!)."
204212
msgstr ""
205213

206-
#: ../../library/code.rst:158
214+
#: ../../library/code.rst:164
207215
msgid ""
208216
"The optional *exitmsg* argument specifies an exit message printed when "
209217
"exiting. Pass the empty string to suppress the exit message. If *exitmsg* is "
210218
"not given or ``None``, a default message is printed."
211219
msgstr ""
212220

213-
#: ../../library/code.rst:162
221+
#: ../../library/code.rst:168
214222
msgid "To suppress printing any banner, pass an empty string."
215223
msgstr ""
216224

217-
#: ../../library/code.rst:165
225+
#: ../../library/code.rst:171
218226
msgid "Print an exit message when exiting."
219227
msgstr ""
220228

221-
#: ../../library/code.rst:171
229+
#: ../../library/code.rst:177
222230
msgid ""
223231
"Push a line of source text to the interpreter. The line should not have a "
224232
"trailing newline; it may have internal newlines. The line is appended to a "
@@ -231,14 +239,14 @@ msgid ""
231239
"same as :meth:`!runsource`)."
232240
msgstr ""
233241

234-
#: ../../library/code.rst:183
242+
#: ../../library/code.rst:189
235243
msgid "Remove any unhandled source text from the input buffer."
236244
msgstr ""
237245

238-
#: ../../library/code.rst:188
246+
#: ../../library/code.rst:194
239247
msgid ""
240248
"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."
244252
msgstr ""

0 commit comments

Comments
 (0)