From 49bf1f38222144cfc149896ee253046fb6502dd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Jun 2022 00:17:13 +0000 Subject: [PATCH 01/11] sync with cpython 5163a253 --- library/asyncio-llapi-index.po | 150 ++++++++++++++++++--------------- 1 file changed, 82 insertions(+), 68 deletions(-) diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index f144a09f17..29e7624d6f 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-20 15:25+0800\n" +"POT-Creation-Date: 2022-06-17 00:14+0000\n" "PO-Revision-Date: 2022-02-09 11:27+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -713,7 +713,7 @@ msgid ":meth:`transport.abort() `" msgstr ":meth:`transport.abort() `" #: ../../library/asyncio-llapi-index.rst:348 -#: ../../library/asyncio-llapi-index.rst:370 +#: ../../library/asyncio-llapi-index.rst:374 msgid "Close the transport immediately." msgstr "立即關閉傳輸。" @@ -726,12 +726,26 @@ msgstr "" "get_write_buffer_size>`" #: ../../library/asyncio-llapi-index.rst:352 +#, fuzzy +msgid "Return the current size of the output buffer." +msgstr "回傳當前協定。" + +#: ../../library/asyncio-llapi-index.rst:354 +#, fuzzy +msgid "" +":meth:`transport.get_write_buffer_limits() `" +msgstr "" +":meth:`transport.set_write_buffer_limits() `" + +#: ../../library/asyncio-llapi-index.rst:356 msgid "Return high and low water marks for write flow control." msgstr "" "回傳用於寫入流量控制 (write flow control) 的高低標記位 (high and low water " "marks)。" -#: ../../library/asyncio-llapi-index.rst:354 +#: ../../library/asyncio-llapi-index.rst:358 msgid "" ":meth:`transport.set_write_buffer_limits() `" @@ -739,31 +753,31 @@ msgstr "" ":meth:`transport.set_write_buffer_limits() `" -#: ../../library/asyncio-llapi-index.rst:356 +#: ../../library/asyncio-llapi-index.rst:360 msgid "Set new high and low water marks for write flow control." msgstr "為寫入流量控制設定高低標記位。" -#: ../../library/asyncio-llapi-index.rst:359 +#: ../../library/asyncio-llapi-index.rst:363 msgid "Transports returned by :meth:`loop.create_datagram_endpoint`:" msgstr "由 :meth:`loop.create_datagram_endpoint` 回傳的傳輸:" -#: ../../library/asyncio-llapi-index.rst:361 +#: ../../library/asyncio-llapi-index.rst:365 msgid "Datagram Transports" msgstr "資料單元傳輸" -#: ../../library/asyncio-llapi-index.rst:366 +#: ../../library/asyncio-llapi-index.rst:370 msgid ":meth:`transport.sendto() `" msgstr ":meth:`transport.sendto() `" -#: ../../library/asyncio-llapi-index.rst:367 +#: ../../library/asyncio-llapi-index.rst:371 msgid "Send data to the remote peer." msgstr "傳送資料到連線遠端。" -#: ../../library/asyncio-llapi-index.rst:369 +#: ../../library/asyncio-llapi-index.rst:373 msgid ":meth:`transport.abort() `" msgstr ":meth:`transport.abort() `" -#: ../../library/asyncio-llapi-index.rst:373 +#: ../../library/asyncio-llapi-index.rst:377 msgid "" "Low-level transport abstraction over subprocesses. Returned by :meth:`loop." "subprocess_exec` and :meth:`loop.subprocess_shell`:" @@ -771,19 +785,19 @@ msgstr "" "基於子行程的低階傳輸抽象,它會由 :meth:`loop.subprocess_exec` 和 :meth:`loop." "subprocess_shell` 所回傳:" -#: ../../library/asyncio-llapi-index.rst:377 +#: ../../library/asyncio-llapi-index.rst:381 msgid "Subprocess Transports" msgstr "子行程傳輸" -#: ../../library/asyncio-llapi-index.rst:382 +#: ../../library/asyncio-llapi-index.rst:386 msgid ":meth:`transport.get_pid() `" msgstr ":meth:`transport.get_pid() `" -#: ../../library/asyncio-llapi-index.rst:383 +#: ../../library/asyncio-llapi-index.rst:387 msgid "Return the subprocess process id." msgstr "回傳子行程的行程 id。" -#: ../../library/asyncio-llapi-index.rst:385 +#: ../../library/asyncio-llapi-index.rst:389 msgid "" ":meth:`transport.get_pipe_transport() `" @@ -791,169 +805,169 @@ msgstr "" ":meth:`transport.get_pipe_transport() `" -#: ../../library/asyncio-llapi-index.rst:387 +#: ../../library/asyncio-llapi-index.rst:391 msgid "" "Return the transport for the requested communication pipe (*stdin*, " "*stdout*, or *stderr*)." msgstr "" "回傳被請求用於通訊 pipe (*stdin*\\ 、\\ *stdout* 或 *stderr*)的傳輸。" -#: ../../library/asyncio-llapi-index.rst:390 +#: ../../library/asyncio-llapi-index.rst:394 msgid ":meth:`transport.get_returncode() `" msgstr "" ":meth:`transport.get_returncode() `" -#: ../../library/asyncio-llapi-index.rst:391 +#: ../../library/asyncio-llapi-index.rst:395 msgid "Return the subprocess return code." msgstr "回傳子行程的回傳代號 (return code)。" -#: ../../library/asyncio-llapi-index.rst:393 +#: ../../library/asyncio-llapi-index.rst:397 msgid ":meth:`transport.kill() `" msgstr ":meth:`transport.kill() `" -#: ../../library/asyncio-llapi-index.rst:394 +#: ../../library/asyncio-llapi-index.rst:398 msgid "Kill the subprocess." msgstr "殺死子行程。" -#: ../../library/asyncio-llapi-index.rst:396 +#: ../../library/asyncio-llapi-index.rst:400 msgid ":meth:`transport.send_signal() `" msgstr ":meth:`transport.send_signal() `" -#: ../../library/asyncio-llapi-index.rst:397 +#: ../../library/asyncio-llapi-index.rst:401 msgid "Send a signal to the subprocess." msgstr "傳送一個訊號到子行程。" -#: ../../library/asyncio-llapi-index.rst:399 +#: ../../library/asyncio-llapi-index.rst:403 msgid ":meth:`transport.terminate() `" msgstr ":meth:`transport.terminate() `" -#: ../../library/asyncio-llapi-index.rst:400 +#: ../../library/asyncio-llapi-index.rst:404 msgid "Stop the subprocess." msgstr "停止子行程。" -#: ../../library/asyncio-llapi-index.rst:402 +#: ../../library/asyncio-llapi-index.rst:406 msgid ":meth:`transport.close() `" msgstr ":meth:`transport.close() `" -#: ../../library/asyncio-llapi-index.rst:403 +#: ../../library/asyncio-llapi-index.rst:407 msgid "Kill the subprocess and close all pipes." msgstr "殺死子行程並關閉所有 pipes。" -#: ../../library/asyncio-llapi-index.rst:407 +#: ../../library/asyncio-llapi-index.rst:411 msgid "Protocols" msgstr "協定" -#: ../../library/asyncio-llapi-index.rst:409 +#: ../../library/asyncio-llapi-index.rst:413 msgid "Protocol classes can implement the following **callback methods**:" msgstr "協定類別可以實作以下\\ **回呼方法**\\ :" -#: ../../library/asyncio-llapi-index.rst:415 +#: ../../library/asyncio-llapi-index.rst:419 msgid "``callback`` :meth:`connection_made() `" msgstr "``callback`` :meth:`connection_made() `" -#: ../../library/asyncio-llapi-index.rst:416 +#: ../../library/asyncio-llapi-index.rst:420 msgid "Called when a connection is made." msgstr "在連線建立時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:418 +#: ../../library/asyncio-llapi-index.rst:422 msgid "``callback`` :meth:`connection_lost() `" msgstr "``callback`` :meth:`connection_lost() `" -#: ../../library/asyncio-llapi-index.rst:419 +#: ../../library/asyncio-llapi-index.rst:423 msgid "Called when the connection is lost or closed." msgstr "在失去連線或連線關閉時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:421 +#: ../../library/asyncio-llapi-index.rst:425 msgid "``callback`` :meth:`pause_writing() `" msgstr "``callback`` :meth:`pause_writing() `" -#: ../../library/asyncio-llapi-index.rst:422 +#: ../../library/asyncio-llapi-index.rst:426 msgid "Called when the transport's buffer goes over the high water mark." msgstr "在傳輸緩衝區超過高標記位時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:424 +#: ../../library/asyncio-llapi-index.rst:428 msgid "``callback`` :meth:`resume_writing() `" msgstr "``callback`` :meth:`resume_writing() `" -#: ../../library/asyncio-llapi-index.rst:425 +#: ../../library/asyncio-llapi-index.rst:429 msgid "Called when the transport's buffer drains below the low water mark." msgstr "在傳輸緩衝區低於低標記位時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:428 +#: ../../library/asyncio-llapi-index.rst:432 msgid "Streaming Protocols (TCP, Unix Sockets, Pipes)" msgstr "串流協定 (TCP, Unix socket, Pipes)" -#: ../../library/asyncio-llapi-index.rst:433 +#: ../../library/asyncio-llapi-index.rst:437 msgid "``callback`` :meth:`data_received() `" msgstr "``callback`` :meth:`data_received() `" -#: ../../library/asyncio-llapi-index.rst:434 +#: ../../library/asyncio-llapi-index.rst:438 msgid "Called when some data is received." msgstr "在接收到資料時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:436 +#: ../../library/asyncio-llapi-index.rst:440 msgid "``callback`` :meth:`eof_received() `" msgstr "``callback`` :meth:`eof_received() `" -#: ../../library/asyncio-llapi-index.rst:437 -#: ../../library/asyncio-llapi-index.rst:452 +#: ../../library/asyncio-llapi-index.rst:441 +#: ../../library/asyncio-llapi-index.rst:456 msgid "Called when an EOF is received." msgstr "在接收到 EOF 時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:440 +#: ../../library/asyncio-llapi-index.rst:444 msgid "Buffered Streaming Protocols" msgstr "緩衝串流協定" -#: ../../library/asyncio-llapi-index.rst:445 +#: ../../library/asyncio-llapi-index.rst:449 msgid "``callback`` :meth:`get_buffer() `" msgstr "``callback`` :meth:`get_buffer() `" -#: ../../library/asyncio-llapi-index.rst:446 +#: ../../library/asyncio-llapi-index.rst:450 msgid "Called to allocate a new receive buffer." msgstr "呼叫後會分配新的接收緩衝區。" -#: ../../library/asyncio-llapi-index.rst:448 +#: ../../library/asyncio-llapi-index.rst:452 msgid "``callback`` :meth:`buffer_updated() `" msgstr "" "``callback`` :meth:`buffer_updated() `" -#: ../../library/asyncio-llapi-index.rst:449 +#: ../../library/asyncio-llapi-index.rst:453 msgid "Called when the buffer was updated with the received data." msgstr "在以接收到的資料更新緩衝區時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:451 +#: ../../library/asyncio-llapi-index.rst:455 msgid "``callback`` :meth:`eof_received() `" msgstr "``callback`` :meth:`eof_received() `" -#: ../../library/asyncio-llapi-index.rst:455 +#: ../../library/asyncio-llapi-index.rst:459 msgid "Datagram Protocols" msgstr "資料單元協定" -#: ../../library/asyncio-llapi-index.rst:460 +#: ../../library/asyncio-llapi-index.rst:464 msgid "" "``callback`` :meth:`datagram_received() `" msgstr "" "``callback`` :meth:`datagram_received() `" -#: ../../library/asyncio-llapi-index.rst:462 +#: ../../library/asyncio-llapi-index.rst:466 msgid "Called when a datagram is received." msgstr "在接收到資料單元時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:464 +#: ../../library/asyncio-llapi-index.rst:468 msgid "``callback`` :meth:`error_received() `" msgstr "" "``callback`` :meth:`error_received() `" -#: ../../library/asyncio-llapi-index.rst:465 +#: ../../library/asyncio-llapi-index.rst:469 msgid "" "Called when a previous send or receive operation raises an :class:`OSError`." msgstr "在前一個傳送或接收操作引發 :class:`OSError` 時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:469 +#: ../../library/asyncio-llapi-index.rst:473 msgid "Subprocess Protocols" msgstr "子行程協定" -#: ../../library/asyncio-llapi-index.rst:474 +#: ../../library/asyncio-llapi-index.rst:478 msgid "" "``callback`` :meth:`pipe_data_received() `" @@ -961,12 +975,12 @@ msgstr "" "``callback`` :meth:`pipe_data_received() `" -#: ../../library/asyncio-llapi-index.rst:476 +#: ../../library/asyncio-llapi-index.rst:480 msgid "" "Called when the child process writes data into its *stdout* or *stderr* pipe." msgstr "在子行程向 *stdout* 或 *stderr* pipe 寫入資料時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:479 +#: ../../library/asyncio-llapi-index.rst:483 msgid "" "``callback`` :meth:`pipe_connection_lost() `" @@ -974,26 +988,26 @@ msgstr "" "``callback`` :meth:`pipe_connection_lost() `" -#: ../../library/asyncio-llapi-index.rst:481 +#: ../../library/asyncio-llapi-index.rst:485 msgid "" "Called when one of the pipes communicating with the child process is closed." msgstr "在與子行程通訊的其中一個 pipes 關閉時被呼叫。" -#: ../../library/asyncio-llapi-index.rst:484 +#: ../../library/asyncio-llapi-index.rst:488 msgid "" "``callback`` :meth:`process_exited() `" msgstr "" "``callback`` :meth:`process_exited() `" -#: ../../library/asyncio-llapi-index.rst:486 +#: ../../library/asyncio-llapi-index.rst:490 msgid "Called when the child process has exited." msgstr "在子行程退出後被呼叫。" -#: ../../library/asyncio-llapi-index.rst:490 +#: ../../library/asyncio-llapi-index.rst:494 msgid "Event Loop Policies" msgstr "事件迴圈 Policies" -#: ../../library/asyncio-llapi-index.rst:492 +#: ../../library/asyncio-llapi-index.rst:496 msgid "" "Policies is a low-level mechanism to alter the behavior of functions like :" "func:`asyncio.get_event_loop`. See also the main :ref:`policies section " @@ -1002,30 +1016,30 @@ msgstr "" "Policy 是改變 :func:`asyncio.get_event_loop` 這類函式行為的一個低階機制。更多" "細節請見 :ref:`Policy 相關段落 `\\ 。" -#: ../../library/asyncio-llapi-index.rst:498 +#: ../../library/asyncio-llapi-index.rst:502 msgid "Accessing Policies" msgstr "存取 Policy" -#: ../../library/asyncio-llapi-index.rst:503 +#: ../../library/asyncio-llapi-index.rst:507 msgid ":meth:`asyncio.get_event_loop_policy`" msgstr ":meth:`asyncio.get_event_loop_policy`" -#: ../../library/asyncio-llapi-index.rst:504 +#: ../../library/asyncio-llapi-index.rst:508 msgid "Return the current process-wide policy." msgstr "回傳當前整個行程中的 Policy。" -#: ../../library/asyncio-llapi-index.rst:506 +#: ../../library/asyncio-llapi-index.rst:510 msgid ":meth:`asyncio.set_event_loop_policy`" msgstr ":meth:`asyncio.set_event_loop_policy`" -#: ../../library/asyncio-llapi-index.rst:507 +#: ../../library/asyncio-llapi-index.rst:511 msgid "Set a new process-wide policy." msgstr "設定整個行程中的一個新 Policy。" -#: ../../library/asyncio-llapi-index.rst:509 +#: ../../library/asyncio-llapi-index.rst:513 msgid ":class:`AbstractEventLoopPolicy`" msgstr ":class:`AbstractEventLoopPolicy`" -#: ../../library/asyncio-llapi-index.rst:510 +#: ../../library/asyncio-llapi-index.rst:514 msgid "Base class for policy objects." msgstr "Policy 物件的基礎類別。" From 6d8391cd5f8255fe0400d2c1738b1016415fd757 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Jun 2022 00:16:38 +0000 Subject: [PATCH 02/11] sync with cpython cdf3689a --- library/sqlite3.po | 363 +++++++++++++++++++++++---------------------- whatsnew/3.10.po | 4 +- 2 files changed, 190 insertions(+), 177 deletions(-) diff --git a/library/sqlite3.po b/library/sqlite3.po index 7538d15819..f0f0edee41 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-15 18:14+0000\n" +"POT-Creation-Date: 2022-06-20 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -407,44 +407,42 @@ msgstr "" #: ../../library/sqlite3.rst:363 msgid "" -"This method commits the current transaction. If you don't call this method, " -"anything you did since the last call to ``commit()`` is not visible from " -"other database connections. If you wonder why you don't see the data you've " -"written to the database, please check you didn't forget to call this method." +"Commit any pending transaction to the database. If there is no open " +"transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:370 +#: ../../library/sqlite3.rst:368 msgid "" -"This method rolls back any changes to the database since the last call to :" -"meth:`commit`." +"Roll back to the start of any pending transaction. If there is no open " +"transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:375 +#: ../../library/sqlite3.rst:373 msgid "" -"This closes the database connection. Note that this does not automatically " -"call :meth:`commit`. If you just close your database connection without " -"calling :meth:`commit` first, your changes will be lost!" +"Close the database connection. Any pending transaction is not committed " +"implicitly; make sure to :meth:`commit` before closing to avoid losing " +"pending changes." msgstr "" -#: ../../library/sqlite3.rst:381 +#: ../../library/sqlite3.rst:380 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " "with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:387 +#: ../../library/sqlite3.rst:386 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " "it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:393 +#: ../../library/sqlite3.rst:392 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " "on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:399 +#: ../../library/sqlite3.rst:398 msgid "" "Creates a user-defined function that you can later use from within SQL " "statements under the function name *name*. *narg* is the number of " @@ -457,26 +455,26 @@ msgid "" "versions." msgstr "" -#: ../../library/sqlite3.rst:409 +#: ../../library/sqlite3.rst:408 msgid "" "The function can return any of the types supported by SQLite: bytes, str, " "int, float and ``None``." msgstr "" -#: ../../library/sqlite3.rst:412 +#: ../../library/sqlite3.rst:411 msgid "The *deterministic* parameter was added." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:415 ../../library/sqlite3.rst:432 -#: ../../library/sqlite3.rst:561 ../../library/sqlite3.rst:712 +#: ../../library/sqlite3.rst:414 ../../library/sqlite3.rst:431 +#: ../../library/sqlite3.rst:560 ../../library/sqlite3.rst:711 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:422 +#: ../../library/sqlite3.rst:421 msgid "Creates a user-defined aggregate function." msgstr "" -#: ../../library/sqlite3.rst:424 +#: ../../library/sqlite3.rst:423 msgid "" "The aggregate class must implement a ``step`` method, which accepts the " "number of parameters *n_arg* (if *n_arg* is -1, the function may take any " @@ -484,47 +482,47 @@ msgid "" "result of the aggregate." msgstr "" -#: ../../library/sqlite3.rst:429 +#: ../../library/sqlite3.rst:428 msgid "" "The ``finalize`` method can return any of the types supported by SQLite: " "bytes, str, int, float and ``None``." msgstr "" -#: ../../library/sqlite3.rst:439 +#: ../../library/sqlite3.rst:438 msgid "" "Create a collation named *name* using the collating function *callable*. " "*callable* is passed two :class:`string ` arguments, and it should " "return an :class:`integer `:" msgstr "" -#: ../../library/sqlite3.rst:443 +#: ../../library/sqlite3.rst:442 msgid "``1`` if the first is ordered higher than the second" msgstr "" -#: ../../library/sqlite3.rst:444 +#: ../../library/sqlite3.rst:443 msgid "``-1`` if the first is ordered lower than the second" msgstr "" -#: ../../library/sqlite3.rst:445 +#: ../../library/sqlite3.rst:444 msgid "``0`` if they are ordered equal" msgstr "" -#: ../../library/sqlite3.rst:447 +#: ../../library/sqlite3.rst:446 msgid "The following example shows a reverse sorting collation:" msgstr "" -#: ../../library/sqlite3.rst:451 +#: ../../library/sqlite3.rst:450 msgid "Remove a collation function by setting *callable* to :const:`None`." msgstr "" -#: ../../library/sqlite3.rst:456 +#: ../../library/sqlite3.rst:455 msgid "" "You can call this method from a different thread to abort any queries that " "might be executing on the connection. The query will then abort and the " "caller will get an exception." msgstr "" -#: ../../library/sqlite3.rst:463 +#: ../../library/sqlite3.rst:462 msgid "" "This routine registers a callback. The callback is invoked for each attempt " "to access a column of a table in the database. The callback should return :" @@ -534,7 +532,7 @@ msgid "" "in the :mod:`sqlite3` module." msgstr "" -#: ../../library/sqlite3.rst:470 +#: ../../library/sqlite3.rst:469 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or :const:`None` " @@ -545,7 +543,7 @@ msgid "" "code." msgstr "" -#: ../../library/sqlite3.rst:477 +#: ../../library/sqlite3.rst:476 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -553,7 +551,7 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:484 +#: ../../library/sqlite3.rst:483 msgid "" "This routine registers a callback. The callback is invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -561,26 +559,26 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:489 +#: ../../library/sqlite3.rst:488 msgid "" "If you want to clear any previously installed progress handler, call the " "method with :const:`None` for *progress_handler*." msgstr "" -#: ../../library/sqlite3.rst:492 +#: ../../library/sqlite3.rst:491 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise an :exc:`OperationalError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:499 +#: ../../library/sqlite3.rst:498 msgid "" "Registers *trace_callback* to be called for each SQL statement that is " "actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:502 +#: ../../library/sqlite3.rst:501 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -590,19 +588,19 @@ msgid "" "of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:510 +#: ../../library/sqlite3.rst:509 msgid "" "Passing :const:`None` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:513 +#: ../../library/sqlite3.rst:512 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:523 +#: ../../library/sqlite3.rst:522 msgid "" "This routine allows/disallows the SQLite engine to load SQLite extensions " "from shared libraries. SQLite extensions can define new functions, " @@ -610,38 +608,38 @@ msgid "" "extension is the fulltext-search extension distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:528 ../../library/sqlite3.rst:545 +#: ../../library/sqlite3.rst:527 ../../library/sqlite3.rst:544 msgid "Loadable extensions are disabled by default. See [#f1]_." msgstr "" -#: ../../library/sqlite3.rst:530 +#: ../../library/sqlite3.rst:529 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.enable_load_extension`` " "with arguments ``connection``, ``enabled``." msgstr "" -#: ../../library/sqlite3.rst:534 +#: ../../library/sqlite3.rst:533 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:541 +#: ../../library/sqlite3.rst:540 msgid "" "This routine loads an SQLite extension from a shared library. You have to " "enable extension loading with :meth:`enable_load_extension` before you can " "use this routine." msgstr "" -#: ../../library/sqlite3.rst:547 +#: ../../library/sqlite3.rst:546 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.load_extension`` with " "arguments ``connection``, ``path``." msgstr "" -#: ../../library/sqlite3.rst:551 +#: ../../library/sqlite3.rst:550 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:556 +#: ../../library/sqlite3.rst:555 msgid "" "You can change this attribute to a callable that accepts the cursor and the " "original row as a tuple and will return the real result row. This way, you " @@ -649,7 +647,7 @@ msgid "" "object that can also access columns by name." msgstr "" -#: ../../library/sqlite3.rst:565 +#: ../../library/sqlite3.rst:564 msgid "" "If returning a tuple doesn't suffice and you want name-based access to " "columns, you should consider setting :attr:`row_factory` to the highly-" @@ -659,7 +657,7 @@ msgid "" "approach or even a db_row based solution." msgstr "" -#: ../../library/sqlite3.rst:577 +#: ../../library/sqlite3.rst:576 msgid "" "Using this attribute you can control what objects are returned for the " "``TEXT`` data type. By default, this attribute is set to :class:`str` and " @@ -667,23 +665,23 @@ msgid "" "you want to return :class:`bytes` instead, you can set it to :class:`bytes`." msgstr "" -#: ../../library/sqlite3.rst:582 +#: ../../library/sqlite3.rst:581 msgid "" "You can also set it to any other callable that accepts a single bytestring " "parameter and returns the resulting object." msgstr "" -#: ../../library/sqlite3.rst:585 +#: ../../library/sqlite3.rst:584 msgid "See the following example code for illustration:" msgstr "" -#: ../../library/sqlite3.rst:592 +#: ../../library/sqlite3.rst:591 msgid "" "Returns the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:598 +#: ../../library/sqlite3.rst:597 msgid "" "Returns an iterator to dump the database in an SQL text format. Useful when " "saving an in-memory database for later restoration. This function provides " @@ -691,14 +689,14 @@ msgid "" "shell." msgstr "" -#: ../../library/sqlite3.rst:603 +#: ../../library/sqlite3.rst:602 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/sqlite3.rst:617 +#: ../../library/sqlite3.rst:616 msgid "" "This method makes a backup of an SQLite database even while it's being " "accessed by other clients, or concurrently by the same connection. The copy " @@ -706,14 +704,14 @@ msgid "" "class:`Connection` instance." msgstr "" -#: ../../library/sqlite3.rst:622 +#: ../../library/sqlite3.rst:621 msgid "" "By default, or when *pages* is either ``0`` or a negative integer, the " "entire database is copied in a single step; otherwise the method performs a " "loop copying up to *pages* pages at a time." msgstr "" -#: ../../library/sqlite3.rst:626 +#: ../../library/sqlite3.rst:625 msgid "" "If *progress* is specified, it must either be ``None`` or a callable object " "that will be executed at each iteration with three integer arguments, " @@ -721,7 +719,7 @@ msgid "" "pages still to be copied and the *total* number of pages." msgstr "" -#: ../../library/sqlite3.rst:631 +#: ../../library/sqlite3.rst:630 msgid "" "The *name* argument specifies the database name that will be copied: it must " "be a string containing either ``\"main\"``, the default, to indicate the " @@ -730,36 +728,36 @@ msgid "" "an attached database." msgstr "" -#: ../../library/sqlite3.rst:637 +#: ../../library/sqlite3.rst:636 msgid "" "The *sleep* argument specifies the number of seconds to sleep by between " "successive attempts to backup remaining pages, can be specified either as an " "integer or a floating point value." msgstr "" -#: ../../library/sqlite3.rst:641 +#: ../../library/sqlite3.rst:640 msgid "Example 1, copy an existing database into another::" msgstr "" -#: ../../library/sqlite3.rst:655 +#: ../../library/sqlite3.rst:654 msgid "Example 2, copy an existing database into a transient copy::" msgstr "" -#: ../../library/sqlite3.rst:669 +#: ../../library/sqlite3.rst:668 msgid "Cursor Objects" msgstr "" -#: ../../library/sqlite3.rst:673 +#: ../../library/sqlite3.rst:672 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:680 +#: ../../library/sqlite3.rst:679 msgid "" "Executes an SQL statement. Values may be bound to the statement using :ref:" "`placeholders `." msgstr "" -#: ../../library/sqlite3.rst:683 +#: ../../library/sqlite3.rst:682 msgid "" ":meth:`execute` will only execute a single SQL statement. If you try to " "execute more than one statement with it, it will raise a :exc:`Warning`. " @@ -767,7 +765,7 @@ msgid "" "with one call." msgstr "" -#: ../../library/sqlite3.rst:691 +#: ../../library/sqlite3.rst:690 msgid "" "Executes a :ref:`parameterized ` SQL command against " "all parameter sequences or mappings found in the sequence " @@ -775,11 +773,11 @@ msgid "" "`iterator` yielding parameters instead of a sequence." msgstr "" -#: ../../library/sqlite3.rst:698 +#: ../../library/sqlite3.rst:697 msgid "Here's a shorter example using a :term:`generator`:" msgstr "" -#: ../../library/sqlite3.rst:705 +#: ../../library/sqlite3.rst:704 msgid "" "This is a nonstandard convenience method for executing multiple SQL " "statements at once. It issues a ``COMMIT`` statement first, then executes " @@ -787,23 +785,23 @@ msgid "" "`isolation_level`; any transaction control must be added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:710 +#: ../../library/sqlite3.rst:709 msgid "*sql_script* can be an instance of :class:`str`." msgstr "" -#: ../../library/sqlite3.rst:719 +#: ../../library/sqlite3.rst:718 msgid "" "Fetches the next row of a query result set, returning a single sequence, or :" "const:`None` when no more data is available." msgstr "" -#: ../../library/sqlite3.rst:725 +#: ../../library/sqlite3.rst:724 msgid "" "Fetches the next set of rows of a query result, returning a list. An empty " "list is returned when no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:728 +#: ../../library/sqlite3.rst:727 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If it is not given, the cursor's arraysize determines the number of rows to " @@ -812,7 +810,7 @@ msgid "" "not being available, fewer rows may be returned." msgstr "" -#: ../../library/sqlite3.rst:734 +#: ../../library/sqlite3.rst:733 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -820,42 +818,42 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:741 +#: ../../library/sqlite3.rst:740 msgid "" "Fetches all (remaining) rows of a query result, returning a list. Note that " "the cursor's arraysize attribute can affect the performance of this " "operation. An empty list is returned when no rows are available." msgstr "" -#: ../../library/sqlite3.rst:747 +#: ../../library/sqlite3.rst:746 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:749 +#: ../../library/sqlite3.rst:748 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:754 ../../library/sqlite3.rst:758 +#: ../../library/sqlite3.rst:753 ../../library/sqlite3.rst:757 msgid "Required by the DB-API. Does nothing in :mod:`sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:762 +#: ../../library/sqlite3.rst:761 msgid "" "Although the :class:`Cursor` class of the :mod:`sqlite3` module implements " "this attribute, the database engine's own support for the determination of " "\"rows affected\"/\"rows selected\" is quirky." msgstr "" -#: ../../library/sqlite3.rst:766 +#: ../../library/sqlite3.rst:765 msgid "" "For :meth:`executemany` statements, the number of modifications are summed " "up into :attr:`rowcount`." msgstr "" -#: ../../library/sqlite3.rst:769 +#: ../../library/sqlite3.rst:768 msgid "" "As required by the Python DB API Spec, the :attr:`rowcount` attribute \"is " "-1 in case no ``executeXX()`` has been performed on the cursor or the " @@ -864,7 +862,7 @@ msgid "" "rows a query produced until all rows were fetched." msgstr "" -#: ../../library/sqlite3.rst:777 +#: ../../library/sqlite3.rst:776 msgid "" "This read-only attribute provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -874,33 +872,33 @@ msgid "" "const:`None`." msgstr "" -#: ../../library/sqlite3.rst:785 +#: ../../library/sqlite3.rst:784 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:787 +#: ../../library/sqlite3.rst:786 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:792 +#: ../../library/sqlite3.rst:791 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:797 +#: ../../library/sqlite3.rst:796 msgid "" "This read-only attribute provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are :const:`None`." msgstr "" -#: ../../library/sqlite3.rst:801 +#: ../../library/sqlite3.rst:800 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:805 +#: ../../library/sqlite3.rst:804 msgid "" "This read-only attribute provides the SQLite database :class:`Connection` " "used by the :class:`Cursor` object. A :class:`Cursor` object created by " @@ -908,56 +906,56 @@ msgid "" "`connection` attribute that refers to *con*::" msgstr "" -#: ../../library/sqlite3.rst:818 +#: ../../library/sqlite3.rst:817 msgid "Row Objects" msgstr "" -#: ../../library/sqlite3.rst:822 +#: ../../library/sqlite3.rst:821 msgid "" "A :class:`Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It tries to mimic a tuple in " "most of its features." msgstr "" -#: ../../library/sqlite3.rst:826 +#: ../../library/sqlite3.rst:825 msgid "" "It supports mapping access by column name and index, iteration, " "representation, equality testing and :func:`len`." msgstr "" -#: ../../library/sqlite3.rst:829 +#: ../../library/sqlite3.rst:828 msgid "" "If two :class:`Row` objects have exactly the same columns and their members " "are equal, they compare equal." msgstr "" -#: ../../library/sqlite3.rst:834 +#: ../../library/sqlite3.rst:833 msgid "" "This method returns a list of column names. Immediately after a query, it is " "the first member of each tuple in :attr:`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:837 +#: ../../library/sqlite3.rst:836 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:840 +#: ../../library/sqlite3.rst:839 msgid "Let's assume we initialize a table as in the example given above::" msgstr "" -#: ../../library/sqlite3.rst:852 +#: ../../library/sqlite3.rst:851 msgid "Now we plug :class:`Row` in::" msgstr "" -#: ../../library/sqlite3.rst:884 +#: ../../library/sqlite3.rst:883 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:886 +#: ../../library/sqlite3.rst:885 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:890 +#: ../../library/sqlite3.rst:889 msgid "" "This exception is raised by ``sqlite3`` if an SQL query is not a :class:" "`string `, or if multiple statements are passed to :meth:`~Cursor." @@ -965,21 +963,21 @@ msgid "" "`Exception`." msgstr "" -#: ../../library/sqlite3.rst:897 +#: ../../library/sqlite3.rst:896 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:903 +#: ../../library/sqlite3.rst:902 msgid "" "This exception is raised by ``sqlite3`` for fetch across rollback, or if " "``sqlite3`` is unable to bind parameters. ``InterfaceError`` is a subclass " "of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:909 +#: ../../library/sqlite3.rst:908 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -987,14 +985,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:916 +#: ../../library/sqlite3.rst:915 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:922 +#: ../../library/sqlite3.rst:921 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -1002,20 +1000,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:930 +#: ../../library/sqlite3.rst:929 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:935 +#: ../../library/sqlite3.rst:934 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:942 +#: ../../library/sqlite3.rst:941 msgid "" "Exception raised for ``sqlite3`` API programming errors, for example trying " "to operate on a closed :class:`Connection`, or trying to execute non-DML " @@ -1023,7 +1021,7 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:949 +#: ../../library/sqlite3.rst:948 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to :const:" @@ -1032,82 +1030,82 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:959 +#: ../../library/sqlite3.rst:958 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:963 +#: ../../library/sqlite3.rst:962 msgid "Introduction" msgstr "簡介" -#: ../../library/sqlite3.rst:965 +#: ../../library/sqlite3.rst:964 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:968 +#: ../../library/sqlite3.rst:967 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:971 ../../library/sqlite3.rst:988 +#: ../../library/sqlite3.rst:970 ../../library/sqlite3.rst:987 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:971 ../../library/sqlite3.rst:988 +#: ../../library/sqlite3.rst:970 ../../library/sqlite3.rst:987 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:973 ../../library/sqlite3.rst:990 +#: ../../library/sqlite3.rst:972 ../../library/sqlite3.rst:989 msgid ":const:`None`" msgstr ":const:`None`" -#: ../../library/sqlite3.rst:973 ../../library/sqlite3.rst:990 +#: ../../library/sqlite3.rst:972 ../../library/sqlite3.rst:989 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:975 ../../library/sqlite3.rst:992 +#: ../../library/sqlite3.rst:974 ../../library/sqlite3.rst:991 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:975 ../../library/sqlite3.rst:992 +#: ../../library/sqlite3.rst:974 ../../library/sqlite3.rst:991 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:977 ../../library/sqlite3.rst:994 +#: ../../library/sqlite3.rst:976 ../../library/sqlite3.rst:993 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:977 ../../library/sqlite3.rst:994 +#: ../../library/sqlite3.rst:976 ../../library/sqlite3.rst:993 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:979 +#: ../../library/sqlite3.rst:978 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:979 ../../library/sqlite3.rst:996 +#: ../../library/sqlite3.rst:978 ../../library/sqlite3.rst:995 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:981 ../../library/sqlite3.rst:999 +#: ../../library/sqlite3.rst:980 ../../library/sqlite3.rst:998 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:981 ../../library/sqlite3.rst:999 +#: ../../library/sqlite3.rst:980 ../../library/sqlite3.rst:998 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:985 +#: ../../library/sqlite3.rst:984 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:996 +#: ../../library/sqlite3.rst:995 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1002 +#: ../../library/sqlite3.rst:1001 msgid "" "The type system of the :mod:`sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via object " @@ -1115,11 +1113,11 @@ msgid "" "to different Python types via converters." msgstr "" -#: ../../library/sqlite3.rst:1009 +#: ../../library/sqlite3.rst:1008 msgid "Using adapters to store additional Python types in SQLite databases" msgstr "" -#: ../../library/sqlite3.rst:1011 +#: ../../library/sqlite3.rst:1010 msgid "" "As described before, SQLite supports only a limited set of types natively. " "To use other Python types with SQLite, you must **adapt** them to one of the " @@ -1127,23 +1125,23 @@ msgid "" "str, bytes." msgstr "" -#: ../../library/sqlite3.rst:1016 +#: ../../library/sqlite3.rst:1015 msgid "" "There are two ways to enable the :mod:`sqlite3` module to adapt a custom " "Python type to one of the supported ones." msgstr "" -#: ../../library/sqlite3.rst:1021 +#: ../../library/sqlite3.rst:1020 msgid "Letting your object adapt itself" msgstr "" -#: ../../library/sqlite3.rst:1023 +#: ../../library/sqlite3.rst:1022 msgid "" "This is a good approach if you write the class yourself. Let's suppose you " "have a class like this::" msgstr "" -#: ../../library/sqlite3.rst:1030 +#: ../../library/sqlite3.rst:1029 msgid "" "Now you want to store the point in a single SQLite column. First you'll " "have to choose one of the supported types to be used for representing the " @@ -1153,18 +1151,18 @@ msgid "" "class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1040 +#: ../../library/sqlite3.rst:1039 msgid "Registering an adapter callable" msgstr "" -#: ../../library/sqlite3.rst:1042 +#: ../../library/sqlite3.rst:1041 msgid "" "The other possibility is to create a function that converts the type to the " "string representation and register the function with :meth:" "`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1047 +#: ../../library/sqlite3.rst:1046 msgid "" "The :mod:`sqlite3` module has two default adapters for Python's built-in :" "class:`datetime.date` and :class:`datetime.datetime` types. Now let's " @@ -1172,100 +1170,100 @@ msgid "" "representation, but as a Unix timestamp." msgstr "" -#: ../../library/sqlite3.rst:1056 +#: ../../library/sqlite3.rst:1055 msgid "Converting SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1058 +#: ../../library/sqlite3.rst:1057 msgid "" "Writing an adapter lets you send custom Python types to SQLite. But to make " "it really useful we need to make the Python to SQLite to Python roundtrip " "work." msgstr "" -#: ../../library/sqlite3.rst:1061 +#: ../../library/sqlite3.rst:1060 msgid "Enter converters." msgstr "" -#: ../../library/sqlite3.rst:1063 +#: ../../library/sqlite3.rst:1062 msgid "" "Let's go back to the :class:`Point` class. We stored the x and y coordinates " "separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1066 +#: ../../library/sqlite3.rst:1065 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1071 +#: ../../library/sqlite3.rst:1070 msgid "" "Converter functions **always** get called with a :class:`bytes` object, no " "matter under which data type you sent the value to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1080 +#: ../../library/sqlite3.rst:1079 msgid "" "Now you need to make the :mod:`sqlite3` module know that what you select " "from the database is actually a point. There are two ways of doing this:" msgstr "" -#: ../../library/sqlite3.rst:1083 +#: ../../library/sqlite3.rst:1082 msgid "Implicitly via the declared type" msgstr "" -#: ../../library/sqlite3.rst:1085 +#: ../../library/sqlite3.rst:1084 msgid "Explicitly via the column name" msgstr "" -#: ../../library/sqlite3.rst:1087 +#: ../../library/sqlite3.rst:1086 msgid "" "Both ways are described in section :ref:`sqlite3-module-contents`, in the " "entries for the constants :const:`PARSE_DECLTYPES` and :const:" "`PARSE_COLNAMES`." msgstr "" -#: ../../library/sqlite3.rst:1090 +#: ../../library/sqlite3.rst:1089 msgid "The following example illustrates both approaches." msgstr "" -#: ../../library/sqlite3.rst:1096 +#: ../../library/sqlite3.rst:1095 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1098 +#: ../../library/sqlite3.rst:1097 msgid "" "There are default adapters for the date and datetime types in the datetime " "module. They will be sent as ISO dates/ISO timestamps to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1101 +#: ../../library/sqlite3.rst:1100 msgid "" "The default converters are registered under the name \"date\" for :class:" "`datetime.date` and under the name \"timestamp\" for :class:`datetime." "datetime`." msgstr "" -#: ../../library/sqlite3.rst:1105 +#: ../../library/sqlite3.rst:1104 msgid "" "This way, you can use date/timestamps from Python without any additional " "fiddling in most cases. The format of the adapters is also compatible with " "the experimental SQLite date/time functions." msgstr "" -#: ../../library/sqlite3.rst:1109 +#: ../../library/sqlite3.rst:1108 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1113 +#: ../../library/sqlite3.rst:1112 msgid "" "If a timestamp stored in SQLite has a fractional part longer than 6 numbers, " "its value will be truncated to microsecond precision by the timestamp " "converter." msgstr "" -#: ../../library/sqlite3.rst:1119 +#: ../../library/sqlite3.rst:1118 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1273,17 +1271,17 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1127 +#: ../../library/sqlite3.rst:1126 msgid "Controlling Transactions" msgstr "" -#: ../../library/sqlite3.rst:1129 +#: ../../library/sqlite3.rst:1128 msgid "" "The underlying ``sqlite3`` library operates in ``autocommit`` mode by " "default, but the Python :mod:`sqlite3` module by default does not." msgstr "" -#: ../../library/sqlite3.rst:1132 +#: ../../library/sqlite3.rst:1131 msgid "" "``autocommit`` mode means that statements that modify the database take " "effect immediately. A ``BEGIN`` or ``SAVEPOINT`` statement disables " @@ -1291,14 +1289,14 @@ msgid "" "ends the outermost transaction, turns ``autocommit`` mode back on." msgstr "" -#: ../../library/sqlite3.rst:1137 +#: ../../library/sqlite3.rst:1136 msgid "" "The Python :mod:`sqlite3` module by default issues a ``BEGIN`` statement " "implicitly before a Data Modification Language (DML) statement (i.e. " "``INSERT``/``UPDATE``/``DELETE``/``REPLACE``)." msgstr "" -#: ../../library/sqlite3.rst:1141 +#: ../../library/sqlite3.rst:1140 msgid "" "You can control which kind of ``BEGIN`` statements :mod:`sqlite3` implicitly " "executes via the *isolation_level* parameter to the :func:`connect` call, or " @@ -1308,7 +1306,7 @@ msgid "" "``EXCLUSIVE``." msgstr "" -#: ../../library/sqlite3.rst:1148 +#: ../../library/sqlite3.rst:1147 msgid "" "You can disable the :mod:`sqlite3` module's implicit transaction management " "by setting :attr:`isolation_level` to ``None``. This will leave the " @@ -1318,27 +1316,27 @@ msgid "" "code." msgstr "" -#: ../../library/sqlite3.rst:1154 +#: ../../library/sqlite3.rst:1153 msgid "" "Note that :meth:`~Cursor.executescript` disregards :attr:`isolation_level`; " "any transaction control must be added explicitly." msgstr "" -#: ../../library/sqlite3.rst:1157 +#: ../../library/sqlite3.rst:1156 msgid "" ":mod:`sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: ../../library/sqlite3.rst:1163 +#: ../../library/sqlite3.rst:1162 msgid "Using :mod:`sqlite3` efficiently" msgstr "" -#: ../../library/sqlite3.rst:1167 +#: ../../library/sqlite3.rst:1166 msgid "Using shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:1169 +#: ../../library/sqlite3.rst:1168 msgid "" "Using the nonstandard :meth:`execute`, :meth:`executemany` and :meth:" "`executescript` methods of the :class:`Connection` object, your code can be " @@ -1350,38 +1348,53 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:1181 +#: ../../library/sqlite3.rst:1180 msgid "Accessing columns by name instead of by index" msgstr "" -#: ../../library/sqlite3.rst:1183 +#: ../../library/sqlite3.rst:1182 msgid "" "One useful feature of the :mod:`sqlite3` module is the built-in :class:" "`sqlite3.Row` class designed to be used as a row factory." msgstr "" -#: ../../library/sqlite3.rst:1186 +#: ../../library/sqlite3.rst:1185 msgid "" "Rows wrapped with this class can be accessed both by index (like tuples) and " "case-insensitively by name:" msgstr "" -#: ../../library/sqlite3.rst:1193 +#: ../../library/sqlite3.rst:1194 msgid "Using the connection as a context manager" msgstr "" -#: ../../library/sqlite3.rst:1195 +#: ../../library/sqlite3.rst:1196 +msgid "" +"A :class:`Connection` object can be used as a context manager that " +"automatically commits or rolls back open transactions when leaving the body " +"of the context manager. If the body of the :keyword:`with` statement " +"finishes without exceptions, the transaction is committed. If this commit " +"fails, or if the body of the ``with`` statement raises an uncaught " +"exception, the transaction is rolled back." +msgstr "" + +#: ../../library/sqlite3.rst:1205 +msgid "" +"If there is no open transaction upon leaving the body of the ``with`` " +"statement, the context manager is a no-op." +msgstr "" + +#: ../../library/sqlite3.rst:1210 msgid "" -"Connection objects can be used as context managers that automatically commit " -"or rollback transactions. In the event of an exception, the transaction is " -"rolled back; otherwise, the transaction is committed:" +"The context manager neither implicitly opens a new transaction nor closes " +"the connection." msgstr "" -#: ../../library/sqlite3.rst:1204 +#: ../../library/sqlite3.rst:1217 msgid "Footnotes" msgstr "註解" -#: ../../library/sqlite3.rst:1205 +#: ../../library/sqlite3.rst:1218 msgid "" "The sqlite3 module is not built with loadable extension support by default, " "because some platforms (notably macOS) have SQLite libraries which are " diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 6d3d09703f..3b38bc2dba 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-30 00:18+0000\n" +"POT-Creation-Date: 2022-06-20 00:14+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2179,7 +2179,7 @@ msgid "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" #: ../../whatsnew/3.10.rst:1745 -msgid "(Contributed by Jelle Zijlstra in :issue:`21574`.)" +msgid "(Contributed by Jelle Zijlstra in :gh:`87889`.)" msgstr "" #: ../../whatsnew/3.10.rst:1747 From ff7d2cdde02c96887c5010e1c7fe4eb25a8d3ec5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Jun 2022 00:17:25 +0000 Subject: [PATCH 03/11] sync with cpython 2454dbe6 --- using/configure.po | 104 ++++++++++++++++++++++++++++----------------- 1 file changed, 66 insertions(+), 38 deletions(-) diff --git a/using/configure.po b/using/configure.po index e55b7bdadf..6ffdea6dc8 100644 --- a/using/configure.po +++ b/using/configure.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-21 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -894,7 +894,7 @@ msgid "" "headers in a nonstandard directory ````." msgstr "" -#: ../../using/configure.rst:602 ../../using/configure.rst:779 +#: ../../using/configure.rst:602 ../../using/configure.rst:797 msgid "" "Both :envvar:`CPPFLAGS` and :envvar:`LDFLAGS` need to contain the shell's " "value for setup.py to be able to build extension modules using the " @@ -962,173 +962,201 @@ msgid "" "distutils :envvar:`CFLAGS` once Python is installed (:issue:`21121`)." msgstr "" -#: ../../using/configure.rst:659 +#: ../../using/configure.rst:655 +msgid "In particular, :envvar:`CFLAGS` should not contain:" +msgstr "" + +#: ../../using/configure.rst:657 +msgid "" +"the compiler flag `-I` (for setting the search path for include files). The " +"`-I` flags are processed from left to right, and any flags in :envvar:" +"`CFLAGS` would take precedence over user- and package-supplied `-I` flags." +msgstr "" + +#: ../../using/configure.rst:662 +msgid "" +"hardening flags such as `-Werror` because distributions cannot control " +"whether packages installed by users conform to such heightened standards." +msgstr "" + +#: ../../using/configure.rst:670 msgid "Extra C compiler flags." msgstr "" -#: ../../using/configure.rst:663 +#: ../../using/configure.rst:674 msgid "" "Value of :envvar:`CFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:670 +#: ../../using/configure.rst:681 msgid "" "Value of :envvar:`CFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../using/configure.rst:677 +#: ../../using/configure.rst:688 msgid "Base compiler flags." msgstr "" -#: ../../using/configure.rst:681 +#: ../../using/configure.rst:692 msgid "Optimization flags." msgstr "" -#: ../../using/configure.rst:685 +#: ../../using/configure.rst:696 msgid "Strict or non-strict aliasing flags used to compile ``Python/dtoa.c``." msgstr "" -#: ../../using/configure.rst:691 +#: ../../using/configure.rst:702 msgid "Compiler flags used to build a shared library." msgstr "" -#: ../../using/configure.rst:693 +#: ../../using/configure.rst:704 msgid "For example, ``-fPIC`` is used on Linux and on BSD." msgstr "例如說 ``-fPIC`` 被使用於 Linux 與 BSD 上。" -#: ../../using/configure.rst:697 +#: ../../using/configure.rst:708 msgid "Extra C flags added for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:699 +#: ../../using/configure.rst:710 msgid "" "Default: ``$(CCSHARED)`` when :option:`--enable-shared` is used, or an empty " "string otherwise." msgstr "" -#: ../../using/configure.rst:704 +#: ../../using/configure.rst:715 msgid "" "Default: ``$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) " "$(EXTRA_CFLAGS)``." msgstr "" -#: ../../using/configure.rst:708 +#: ../../using/configure.rst:719 msgid "" "Default: ``$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/" "internal``." msgstr "" -#: ../../using/configure.rst:714 +#: ../../using/configure.rst:725 msgid "C flags used for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:716 +#: ../../using/configure.rst:727 msgid "" "Default: ``$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) " "$(CFLAGSFORSHARED)``." msgstr "" -#: ../../using/configure.rst:722 +#: ../../using/configure.rst:733 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE``." msgstr "" -#: ../../using/configure.rst:728 +#: ../../using/configure.rst:739 msgid "" "Compiler flags to build a standard library extension module as a built-in " "module, like the :mod:`posix` module." msgstr "" -#: ../../using/configure.rst:731 +#: ../../using/configure.rst:742 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN``." msgstr "" -#: ../../using/configure.rst:737 +#: ../../using/configure.rst:748 msgid "Purify command. Purify is a memory debugger program." msgstr "" -#: ../../using/configure.rst:739 +#: ../../using/configure.rst:750 msgid "Default: empty string (not used)." msgstr "" -#: ../../using/configure.rst:743 +#: ../../using/configure.rst:754 msgid "Linker flags" msgstr "" -#: ../../using/configure.rst:747 +#: ../../using/configure.rst:758 msgid "" "Linker command used to build programs like ``python`` and ``_testembed``." msgstr "" -#: ../../using/configure.rst:749 +#: ../../using/configure.rst:760 msgid "Default: ``$(PURIFY) $(MAINCC)``." msgstr "" -#: ../../using/configure.rst:753 +#: ../../using/configure.rst:764 msgid "" "Value of :envvar:`LDFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:755 +#: ../../using/configure.rst:766 msgid "" "Avoid assigning :envvar:`CFLAGS`, :envvar:`LDFLAGS`, etc. so users can use " "them on the command line to append to these values without stomping the pre-" "set values." msgstr "" -#: ../../using/configure.rst:763 +#: ../../using/configure.rst:774 msgid "" ":envvar:`LDFLAGS_NODIST` is used in the same manner as :envvar:" "`CFLAGS_NODIST`. Use it when a linker flag should *not* be part of the " "distutils :envvar:`LDFLAGS` once Python is installed (:issue:`35257`)." msgstr "" -#: ../../using/configure.rst:769 +#: ../../using/configure.rst:778 +msgid "In particular, :envvar:`LDFLAGS` should not contain:" +msgstr "" + +#: ../../using/configure.rst:780 +msgid "" +"the compiler flag `-L` (for setting the search path for libraries). The `-L` " +"flags are processed from left to right, and any flags in :envvar:`LDFLAGS` " +"would take precedence over user- and package-supplied `-L` flags." +msgstr "" + +#: ../../using/configure.rst:787 msgid "" "Value of :envvar:`LDFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../using/configure.rst:776 +#: ../../using/configure.rst:794 msgid "" "Linker flags, e.g. ``-L`` if you have libraries in a nonstandard " "directory ````." msgstr "" -#: ../../using/configure.rst:785 +#: ../../using/configure.rst:803 msgid "" "Linker flags to pass libraries to the linker when linking the Python " "executable." msgstr "" -#: ../../using/configure.rst:788 +#: ../../using/configure.rst:806 msgid "Example: ``-lrt``." msgstr "" -#: ../../using/configure.rst:792 +#: ../../using/configure.rst:810 msgid "Command to build a shared library." msgstr "" -#: ../../using/configure.rst:794 +#: ../../using/configure.rst:812 msgid "Default: ``@LDSHARED@ $(PY_LDFLAGS)``." msgstr "" -#: ../../using/configure.rst:798 +#: ../../using/configure.rst:816 msgid "Command to build ``libpython`` shared library." msgstr "" -#: ../../using/configure.rst:800 +#: ../../using/configure.rst:818 msgid "Default: ``@BLDSHARED@ $(PY_CORE_LDFLAGS)``." msgstr "" -#: ../../using/configure.rst:804 +#: ../../using/configure.rst:822 msgid "Default: ``$(CONFIGURE_LDFLAGS) $(LDFLAGS)``." msgstr "" -#: ../../using/configure.rst:808 +#: ../../using/configure.rst:826 msgid "Default: ``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``." msgstr "" -#: ../../using/configure.rst:814 +#: ../../using/configure.rst:832 msgid "Linker flags used for building the interpreter object files." msgstr "" From 301cdc05177084d6921c5fdf76cff52efdf42b54 Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Tue, 21 Jun 2022 11:22:41 +0800 Subject: [PATCH 04/11] fix: resolve fuzzy entries --- library/asyncio-llapi-index.po | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index 29e7624d6f..80804499cb 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -726,18 +726,16 @@ msgstr "" "get_write_buffer_size>`" #: ../../library/asyncio-llapi-index.rst:352 -#, fuzzy msgid "Return the current size of the output buffer." -msgstr "回傳當前協定。" +msgstr "回傳當前輸出緩衝區的大小。" #: ../../library/asyncio-llapi-index.rst:354 -#, fuzzy msgid "" ":meth:`transport.get_write_buffer_limits() `" msgstr "" -":meth:`transport.set_write_buffer_limits() `" +":meth:`transport.get_write_buffer_limits() `" #: ../../library/asyncio-llapi-index.rst:356 msgid "Return high and low water marks for write flow control." From 9058a53e226d30f819f1a12a0aec93dff6711610 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Jun 2022 00:20:01 +0000 Subject: [PATCH 05/11] sync with cpython ad2e9f97 --- faq/library.po | 5 +- faq/programming.po | 7 +- howto/urllib2.po | 16 +- installing/index.po | 7 +- library/datetime.po | 6 +- library/hashlib.po | 6 +- library/html.entities.po | 6 +- library/importlib.metadata.po | 8 +- library/math.po | 4 +- library/os.po | 13 +- library/pathlib.po | 349 +++++------ library/ssl.po | 6 +- library/statistics.po | 10 +- library/sys.po | 335 +++++------ library/unittest.mock.po | 13 +- library/venv.po | 4 +- license.po | 10 +- reference/expressions.po | 4 +- tutorial/controlflow.po | 245 ++++---- tutorial/inputoutput.po | 7 +- using/unix.po | 5 +- using/windows.po | 315 +++++----- whatsnew/2.1.po | 89 +-- whatsnew/2.5.po | 31 +- whatsnew/2.6.po | 8 +- whatsnew/2.7.po | 15 +- whatsnew/3.2.po | 1051 +++++++++++++++++---------------- whatsnew/3.6.po | 141 ++--- whatsnew/3.7.po | 179 +++--- 29 files changed, 1473 insertions(+), 1422 deletions(-) diff --git a/faq/library.po b/faq/library.po index c5914e657d..37ae4d8a24 100644 --- a/faq/library.po +++ b/faq/library.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-10 00:16+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 14:35+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -661,7 +661,8 @@ msgstr "" #: ../../faq/library.rst:672 msgid "" "Cameron Laird maintains a useful set of pages about Python web technologies " -"at http://phaseit.net/claird/comp.lang.python/web_python." +"at https://web.archive.org/web/20210224183619/http://phaseit.net/claird/comp." +"lang.python/web_python." msgstr "" #: ../../faq/library.rst:677 diff --git a/faq/programming.po b/faq/programming.po index c8ad748795..d5042fadf4 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 14:35+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,8 +116,9 @@ msgstr "有沒有工具能夠幫忙找 bug 或執行靜態分析?" #: ../../faq/programming.rst:59 msgid "" -"`Pylint `_ and `Pyflakes `_ do basic checking that will help you catch bugs sooner." +"`Pylint `_ and `Pyflakes " +"`_ do basic checking that will help you " +"catch bugs sooner." msgstr "" #: ../../faq/programming.rst:63 diff --git a/howto/urllib2.po b/howto/urllib2.po index 59e38a4668..8c1c5fca76 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -28,14 +28,17 @@ msgid "Author" msgstr "作者" #: ../../howto/urllib2.rst:7 -msgid "`Michael Foord `_" +#, fuzzy +msgid "`Michael Foord `_" msgstr "`Michael Foord `_" #: ../../howto/urllib2.rst:11 +#, fuzzy msgid "" "There is a French translation of an earlier revision of this HOWTO, " -"available at `urllib2 - Le Manuel manquant `_." +"available at `urllib2 - Le Manuel manquant `_." msgstr "" "這份指南出自於早期版本的法文翻譯 `urllib2 - Le Manuel manquant `_." @@ -51,9 +54,10 @@ msgid "" msgstr "以下這些與Python有關的文章說不定能幫到你::" #: ../../howto/urllib2.rst:25 +#, fuzzy msgid "" -"`Basic Authentication `_" +"`Basic Authentication `_" msgstr "" "`Basic Authentication `_" diff --git a/installing/index.po b/installing/index.po index 7eeb9db4ff..b59ed91153 100644 --- a/installing/index.po +++ b/installing/index.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-02 17:19+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2021-10-03 09:41+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -386,10 +386,11 @@ msgstr "" "::" #: ../../installing/index.rst:216 +#, fuzzy msgid "" "There are also additional resources for `installing pip. `__" +"python.org/en/latest/tutorials/installing-packages/#ensure-pip-setuptools-" +"and-wheel-are-up-to-date>`__" msgstr "" "這裡還有其他關於\\ `安裝 pip `__\\ 的資源。" diff --git a/library/datetime.po b/library/datetime.po index 054df6a8a4..ab4ce95b0c 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-20 00:10+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3143,8 +3143,8 @@ msgstr "" #: ../../library/datetime.rst:2586 msgid "" "See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " -"`_ for a " -"good explanation." +"`_ for a good explanation." msgstr "" #: ../../library/datetime.rst:2590 diff --git a/library/hashlib.po b/library/hashlib.po index f2598b23e4..4c0dd97e57 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-03 00:13+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -684,8 +684,8 @@ msgstr "" #: ../../library/hashlib.rst:629 msgid "" -"(`The Skein Hash Function Family `_, p. 21)" +"(`The Skein Hash Function Family `_, p. 21)" msgstr "" #: ../../library/hashlib.rst:633 diff --git a/library/html.entities.po b/library/html.entities.po index 98367fd01c..4befd713b1 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-12 19:07+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -62,6 +62,6 @@ msgstr "註解" #: ../../library/html.entities.rst:47 msgid "" -"See https://html.spec.whatwg.org/multipage/syntax.html#named-character-" -"references" +"See https://html.spec.whatwg.org/multipage/named-characters.html#named-" +"character-references" msgstr "" diff --git a/library/importlib.metadata.po b/library/importlib.metadata.po index ba287a407d..9002d2f24f 100644 --- a/library/importlib.metadata.po +++ b/library/importlib.metadata.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-14 00:14+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -145,9 +145,9 @@ msgstr "" msgid "" "The ``group`` and ``name`` are arbitrary values defined by the package " "author and usually a client will wish to resolve all entry points for a " -"particular group. Read `the setuptools docs `_ " -"for more information on entry points, their definition, and usage." +"particular group. Read `the setuptools docs `_ for more information on entry points, " +"their definition, and usage." msgstr "" #: ../../library/importlib.metadata.rst:142 diff --git a/library/math.po b/library/math.po index d6f9a1dc8d..e8596fca86 100644 --- a/library/math.po +++ b/library/math.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-03 00:14+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -646,7 +646,7 @@ msgstr "" msgid "" "The :func:`erf` function can be used to compute traditional statistical " "functions such as the `cumulative standard normal distribution `_::" +"wikipedia.org/wiki/Normal_distribution#Cumulative_distribution_functions>`_::" msgstr "" #: ../../library/math.rst:573 diff --git a/library/os.po b/library/os.po index 542ba921d5..da252c26aa 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-07 00:13+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -4654,11 +4654,12 @@ msgstr "" #: ../../library/os.rst:4266 msgid "" -"See the Unix manual page :manpage:`times(2)` and :manpage:`times(3)` manual " -"page on Unix or `the GetProcessTimes MSDN `_ " -"on Windows. On Windows, only :attr:`!user` and :attr:`!system` are known; " -"the other attributes are zero." +"See the Unix manual page :manpage:`times(2)` and `times(3) `_ manual page on Unix or `the " +"GetProcessTimes MSDN `_ on Windows. On " +"Windows, only :attr:`!user` and :attr:`!system` are known; the other " +"attributes are zero." msgstr "" #: ../../library/os.rst:4280 diff --git a/library/pathlib.po b/library/pathlib.po index 4c685a70b7..6035f23999 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-11 00:15+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -170,8 +170,8 @@ msgid "" msgstr "" #: ../../library/pathlib.rst:166 ../../library/pathlib.rst:178 -#: ../../library/pathlib.rst:665 ../../library/pathlib.rst:675 -#: ../../library/pathlib.rst:685 +#: ../../library/pathlib.rst:664 ../../library/pathlib.rst:674 +#: ../../library/pathlib.rst:684 msgid "*pathsegments* is specified similarly to :class:`PurePath`." msgstr "" @@ -288,214 +288,215 @@ msgstr "" #: ../../library/pathlib.rst:330 msgid "" "This behavior conforms to *The Open Group Base Specifications Issue 6*, " -"paragraph `4.11 *Pathname Resolution* `_:" +"paragraph `4.11 Pathname Resolution `_:" msgstr "" -#: ../../library/pathlib.rst:333 +#: ../../library/pathlib.rst:334 msgid "" "*\"A pathname that begins with two successive slashes may be interpreted in " "an implementation-defined manner, although more than two leading slashes " "shall be treated as a single slash.\"*" msgstr "" -#: ../../library/pathlib.rst:341 +#: ../../library/pathlib.rst:340 msgid "The concatenation of the drive and root::" msgstr "" -#: ../../library/pathlib.rst:355 +#: ../../library/pathlib.rst:354 msgid "" "An immutable sequence providing access to the logical ancestors of the path::" msgstr "" -#: ../../library/pathlib.rst:366 +#: ../../library/pathlib.rst:365 msgid "" "The parents sequence now supports :term:`slices ` and negative index " "values." msgstr "" -#: ../../library/pathlib.rst:371 +#: ../../library/pathlib.rst:370 msgid "The logical parent of the path::" msgstr "" -#: ../../library/pathlib.rst:377 +#: ../../library/pathlib.rst:376 msgid "You cannot go past an anchor, or empty path::" msgstr "" -#: ../../library/pathlib.rst:387 +#: ../../library/pathlib.rst:386 msgid "This is a purely lexical operation, hence the following behaviour::" msgstr "" -#: ../../library/pathlib.rst:393 +#: ../../library/pathlib.rst:392 msgid "" "If you want to walk an arbitrary filesystem path upwards, it is recommended " "to first call :meth:`Path.resolve` so as to resolve symlinks and eliminate `" "\"..\"` components." msgstr "" -#: ../../library/pathlib.rst:400 +#: ../../library/pathlib.rst:399 msgid "" "A string representing the final path component, excluding the drive and " "root, if any::" msgstr "" -#: ../../library/pathlib.rst:406 +#: ../../library/pathlib.rst:405 msgid "UNC drive names are not considered::" msgstr "" -#: ../../library/pathlib.rst:416 +#: ../../library/pathlib.rst:415 msgid "The file extension of the final component, if any::" msgstr "" -#: ../../library/pathlib.rst:428 +#: ../../library/pathlib.rst:427 msgid "A list of the path's file extensions::" msgstr "" -#: ../../library/pathlib.rst:440 +#: ../../library/pathlib.rst:439 msgid "The final path component, without its suffix::" msgstr "" -#: ../../library/pathlib.rst:452 +#: ../../library/pathlib.rst:451 msgid "" "Return a string representation of the path with forward slashes (``/``)::" msgstr "" -#: ../../library/pathlib.rst:463 +#: ../../library/pathlib.rst:462 msgid "" "Represent the path as a ``file`` URI. :exc:`ValueError` is raised if the " "path isn't absolute." msgstr "" -#: ../../library/pathlib.rst:476 +#: ../../library/pathlib.rst:475 msgid "" "Return whether the path is absolute or not. A path is considered absolute " "if it has both a root and (if the flavour allows) a drive::" msgstr "" -#: ../../library/pathlib.rst:496 +#: ../../library/pathlib.rst:495 msgid "Return whether or not this path is relative to the *other* path." msgstr "" -#: ../../library/pathlib.rst:509 +#: ../../library/pathlib.rst:508 msgid "" "With :class:`PureWindowsPath`, return ``True`` if the path is considered " "reserved under Windows, ``False`` otherwise. With :class:`PurePosixPath`, " "``False`` is always returned." msgstr "" -#: ../../library/pathlib.rst:518 +#: ../../library/pathlib.rst:517 msgid "" "File system calls on reserved paths can fail mysteriously or have unintended " "effects." msgstr "" -#: ../../library/pathlib.rst:524 +#: ../../library/pathlib.rst:523 msgid "" "Calling this method is equivalent to combining the path with each of the " "*other* arguments in turn::" msgstr "" -#: ../../library/pathlib.rst:539 +#: ../../library/pathlib.rst:538 msgid "" "Match this path against the provided glob-style pattern. Return ``True`` if " "matching is successful, ``False`` otherwise." msgstr "" -#: ../../library/pathlib.rst:542 +#: ../../library/pathlib.rst:541 msgid "" "If *pattern* is relative, the path can be either relative or absolute, and " "matching is done from the right::" msgstr "" -#: ../../library/pathlib.rst:552 +#: ../../library/pathlib.rst:551 msgid "" "If *pattern* is absolute, the path must be absolute, and the whole path must " "match::" msgstr "" -#: ../../library/pathlib.rst:560 +#: ../../library/pathlib.rst:559 msgid "As with other methods, case-sensitivity follows platform defaults::" msgstr "" -#: ../../library/pathlib.rst:570 +#: ../../library/pathlib.rst:569 msgid "" "Compute a version of this path relative to the path represented by *other*. " "If it's impossible, ValueError is raised::" msgstr "" -#: ../../library/pathlib.rst:585 +#: ../../library/pathlib.rst:584 msgid "" "NOTE: This function is part of :class:`PurePath` and works with strings. It " "does not check or access the underlying file structure." msgstr "" -#: ../../library/pathlib.rst:590 +#: ../../library/pathlib.rst:589 msgid "" "Return a new path with the :attr:`name` changed. If the original path " "doesn't have a name, ValueError is raised::" msgstr "" -#: ../../library/pathlib.rst:607 +#: ../../library/pathlib.rst:606 msgid "" "Return a new path with the :attr:`stem` changed. If the original path " "doesn't have a name, ValueError is raised::" msgstr "" -#: ../../library/pathlib.rst:631 +#: ../../library/pathlib.rst:630 msgid "" "Return a new path with the :attr:`suffix` changed. If the original path " "doesn't have a suffix, the new *suffix* is appended instead. If the " "*suffix* is an empty string, the original suffix is removed::" msgstr "" -#: ../../library/pathlib.rst:650 +#: ../../library/pathlib.rst:649 msgid "Concrete paths" msgstr "" -#: ../../library/pathlib.rst:652 +#: ../../library/pathlib.rst:651 msgid "" "Concrete paths are subclasses of the pure path classes. In addition to " "operations provided by the latter, they also provide methods to do system " "calls on path objects. There are three ways to instantiate concrete paths:" msgstr "" -#: ../../library/pathlib.rst:658 +#: ../../library/pathlib.rst:657 msgid "" "A subclass of :class:`PurePath`, this class represents concrete paths of the " "system's path flavour (instantiating it creates either a :class:`PosixPath` " "or a :class:`WindowsPath`)::" msgstr "" -#: ../../library/pathlib.rst:669 +#: ../../library/pathlib.rst:668 msgid "" "A subclass of :class:`Path` and :class:`PurePosixPath`, this class " "represents concrete non-Windows filesystem paths::" msgstr "" -#: ../../library/pathlib.rst:679 +#: ../../library/pathlib.rst:678 msgid "" "A subclass of :class:`Path` and :class:`PureWindowsPath`, this class " "represents concrete Windows filesystem paths::" msgstr "" -#: ../../library/pathlib.rst:687 +#: ../../library/pathlib.rst:686 msgid "" "You can only instantiate the class flavour that corresponds to your system " "(allowing system calls on non-compatible path flavours could lead to bugs or " "failures in your application)::" msgstr "" -#: ../../library/pathlib.rst:707 +#: ../../library/pathlib.rst:706 msgid "Methods" msgstr "" -#: ../../library/pathlib.rst:709 +#: ../../library/pathlib.rst:708 msgid "" "Concrete paths provide the following methods in addition to pure paths " "methods. Many of these methods can raise an :exc:`OSError` if a system call " "fails (for example because the path doesn't exist)." msgstr "" -#: ../../library/pathlib.rst:715 +#: ../../library/pathlib.rst:714 msgid "" ":meth:`~Path.exists()`, :meth:`~Path.is_dir()`, :meth:`~Path.is_file()`, :" "meth:`~Path.is_mount()`, :meth:`~Path.is_symlink()`, :meth:`~Path." @@ -505,116 +506,116 @@ msgid "" "the OS level." msgstr "" -#: ../../library/pathlib.rst:725 +#: ../../library/pathlib.rst:724 msgid "" "Return a new path object representing the current directory (as returned by :" "func:`os.getcwd`)::" msgstr "" -#: ../../library/pathlib.rst:734 +#: ../../library/pathlib.rst:733 msgid "" "Return a new path object representing the user's home directory (as returned " "by :func:`os.path.expanduser` with ``~`` construct). If the home directory " "can't be resolved, :exc:`RuntimeError` is raised." msgstr "" -#: ../../library/pathlib.rst:748 +#: ../../library/pathlib.rst:747 msgid "" "Return a :class:`os.stat_result` object containing information about this " "path, like :func:`os.stat`. The result is looked up at each call to this " "method." msgstr "" -#: ../../library/pathlib.rst:751 +#: ../../library/pathlib.rst:750 msgid "" "This method normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :meth:`~Path.lstat`." msgstr "" -#: ../../library/pathlib.rst:762 ../../library/pathlib.rst:782 +#: ../../library/pathlib.rst:761 ../../library/pathlib.rst:781 msgid "The *follow_symlinks* parameter was added." msgstr "新增 *follow_symlinks* 參數。" -#: ../../library/pathlib.rst:767 +#: ../../library/pathlib.rst:766 msgid "Change the file mode and permissions, like :func:`os.chmod`." msgstr "" -#: ../../library/pathlib.rst:769 +#: ../../library/pathlib.rst:768 msgid "" "This method normally follows symlinks. Some Unix flavours support changing " "permissions on the symlink itself; on these platforms you may add the " "argument ``follow_symlinks=False``, or use :meth:`~Path.lchmod`." msgstr "" -#: ../../library/pathlib.rst:787 +#: ../../library/pathlib.rst:786 msgid "Whether the path points to an existing file or directory::" msgstr "" -#: ../../library/pathlib.rst:799 +#: ../../library/pathlib.rst:798 msgid "" "If the path points to a symlink, :meth:`exists` returns whether the symlink " "*points to* an existing file or directory." msgstr "" -#: ../../library/pathlib.rst:805 +#: ../../library/pathlib.rst:804 msgid "" "Return a new path with expanded ``~`` and ``~user`` constructs, as returned " "by :meth:`os.path.expanduser`. If a home directory can't be resolved, :exc:" "`RuntimeError` is raised." msgstr "" -#: ../../library/pathlib.rst:820 +#: ../../library/pathlib.rst:819 msgid "" "Glob the given relative *pattern* in the directory represented by this path, " "yielding all matching files (of any kind)::" msgstr "" -#: ../../library/pathlib.rst:828 +#: ../../library/pathlib.rst:827 msgid "" "Patterns are the same as for :mod:`fnmatch`, with the addition of \"``**``\" " "which means \"this directory and all subdirectories, recursively\". In " "other words, it enables recursive globbing::" msgstr "" -#: ../../library/pathlib.rst:840 +#: ../../library/pathlib.rst:839 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." msgstr "" -#: ../../library/pathlib.rst:843 +#: ../../library/pathlib.rst:842 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.glob`` with " "arguments ``self``, ``pattern``." msgstr "" -#: ../../library/pathlib.rst:848 +#: ../../library/pathlib.rst:847 msgid "" "Return the name of the group owning the file. :exc:`KeyError` is raised if " "the file's gid isn't found in the system database." msgstr "" -#: ../../library/pathlib.rst:854 +#: ../../library/pathlib.rst:853 msgid "" "Return ``True`` if the path points to a directory (or a symbolic link " "pointing to a directory), ``False`` if it points to another kind of file." msgstr "" -#: ../../library/pathlib.rst:857 ../../library/pathlib.rst:866 -#: ../../library/pathlib.rst:895 ../../library/pathlib.rst:904 -#: ../../library/pathlib.rst:913 ../../library/pathlib.rst:922 +#: ../../library/pathlib.rst:856 ../../library/pathlib.rst:865 +#: ../../library/pathlib.rst:894 ../../library/pathlib.rst:903 +#: ../../library/pathlib.rst:912 ../../library/pathlib.rst:921 msgid "" "``False`` is also returned if the path doesn't exist or is a broken symlink; " "other errors (such as permission errors) are propagated." msgstr "" -#: ../../library/pathlib.rst:863 +#: ../../library/pathlib.rst:862 msgid "" "Return ``True`` if the path points to a regular file (or a symbolic link " "pointing to a regular file), ``False`` if it points to another kind of file." msgstr "" -#: ../../library/pathlib.rst:872 +#: ../../library/pathlib.rst:871 msgid "" "Return ``True`` if the path is a :dfn:`mount point`: a point in a file " "system where a different file system has been mounted. On POSIX, the " @@ -624,49 +625,49 @@ msgid "" "and POSIX variants. Not implemented on Windows." msgstr "" -#: ../../library/pathlib.rst:884 +#: ../../library/pathlib.rst:883 msgid "" "Return ``True`` if the path points to a symbolic link, ``False`` otherwise." msgstr "" -#: ../../library/pathlib.rst:886 +#: ../../library/pathlib.rst:885 msgid "" "``False`` is also returned if the path doesn't exist; other errors (such as " "permission errors) are propagated." msgstr "" -#: ../../library/pathlib.rst:892 +#: ../../library/pathlib.rst:891 msgid "" "Return ``True`` if the path points to a Unix socket (or a symbolic link " "pointing to a Unix socket), ``False`` if it points to another kind of file." msgstr "" -#: ../../library/pathlib.rst:901 +#: ../../library/pathlib.rst:900 msgid "" "Return ``True`` if the path points to a FIFO (or a symbolic link pointing to " "a FIFO), ``False`` if it points to another kind of file." msgstr "" -#: ../../library/pathlib.rst:910 +#: ../../library/pathlib.rst:909 msgid "" "Return ``True`` if the path points to a block device (or a symbolic link " "pointing to a block device), ``False`` if it points to another kind of file." msgstr "" -#: ../../library/pathlib.rst:919 +#: ../../library/pathlib.rst:918 msgid "" "Return ``True`` if the path points to a character device (or a symbolic link " "pointing to a character device), ``False`` if it points to another kind of " "file." msgstr "" -#: ../../library/pathlib.rst:928 +#: ../../library/pathlib.rst:927 msgid "" "When the path points to a directory, yield path objects of the directory " "contents::" msgstr "" -#: ../../library/pathlib.rst:942 +#: ../../library/pathlib.rst:941 msgid "" "The children are yielded in arbitrary order, and the special entries ``'.'`` " "and ``'..'`` are not included. If a file is removed from or added to the " @@ -674,88 +675,88 @@ msgid "" "be included is unspecified." msgstr "" -#: ../../library/pathlib.rst:949 +#: ../../library/pathlib.rst:948 msgid "" "Like :meth:`Path.chmod` but, if the path points to a symbolic link, the " "symbolic link's mode is changed rather than its target's." msgstr "" -#: ../../library/pathlib.rst:955 +#: ../../library/pathlib.rst:954 msgid "" "Like :meth:`Path.stat` but, if the path points to a symbolic link, return " "the symbolic link's information rather than its target's." msgstr "" -#: ../../library/pathlib.rst:961 +#: ../../library/pathlib.rst:960 msgid "" "Create a new directory at this given path. If *mode* is given, it is " "combined with the process' ``umask`` value to determine the file mode and " "access flags. If the path already exists, :exc:`FileExistsError` is raised." msgstr "" -#: ../../library/pathlib.rst:966 +#: ../../library/pathlib.rst:965 msgid "" "If *parents* is true, any missing parents of this path are created as " "needed; they are created with the default permissions without taking *mode* " "into account (mimicking the POSIX ``mkdir -p`` command)." msgstr "" -#: ../../library/pathlib.rst:970 +#: ../../library/pathlib.rst:969 msgid "" "If *parents* is false (the default), a missing parent raises :exc:" "`FileNotFoundError`." msgstr "" -#: ../../library/pathlib.rst:973 +#: ../../library/pathlib.rst:972 msgid "" "If *exist_ok* is false (the default), :exc:`FileExistsError` is raised if " "the target directory already exists." msgstr "" -#: ../../library/pathlib.rst:976 +#: ../../library/pathlib.rst:975 msgid "" "If *exist_ok* is true, :exc:`FileExistsError` exceptions will be ignored " "(same behavior as the POSIX ``mkdir -p`` command), but only if the last path " "component is not an existing non-directory file." msgstr "" -#: ../../library/pathlib.rst:980 +#: ../../library/pathlib.rst:979 msgid "The *exist_ok* parameter was added." msgstr "新增 *exist_ok* 參數。" -#: ../../library/pathlib.rst:986 +#: ../../library/pathlib.rst:985 msgid "" "Open the file pointed to by the path, like the built-in :func:`open` " "function does::" msgstr "" -#: ../../library/pathlib.rst:998 +#: ../../library/pathlib.rst:997 msgid "" "Return the name of the user owning the file. :exc:`KeyError` is raised if " "the file's uid isn't found in the system database." msgstr "" -#: ../../library/pathlib.rst:1004 +#: ../../library/pathlib.rst:1003 msgid "Return the binary contents of the pointed-to file as a bytes object::" msgstr "" -#: ../../library/pathlib.rst:1017 +#: ../../library/pathlib.rst:1016 msgid "Return the decoded contents of the pointed-to file as a string::" msgstr "" -#: ../../library/pathlib.rst:1025 +#: ../../library/pathlib.rst:1024 msgid "" "The file is opened and then closed. The optional parameters have the same " "meaning as in :func:`open`." msgstr "" -#: ../../library/pathlib.rst:1033 +#: ../../library/pathlib.rst:1032 msgid "" "Return the path to which the symbolic link points (as returned by :func:`os." "readlink`)::" msgstr "" -#: ../../library/pathlib.rst:1046 +#: ../../library/pathlib.rst:1045 msgid "" "Rename this file or directory to the given *target*, and return a new Path " "instance pointing to *target*. On Unix, if *target* exists and is a file, " @@ -764,37 +765,37 @@ msgid "" "either a string or another path object::" msgstr "" -#: ../../library/pathlib.rst:1061 ../../library/pathlib.rst:1075 +#: ../../library/pathlib.rst:1060 ../../library/pathlib.rst:1074 msgid "" "The target path may be absolute or relative. Relative paths are interpreted " "relative to the current working directory, *not* the directory of the Path " "object." msgstr "" -#: ../../library/pathlib.rst:1065 ../../library/pathlib.rst:1079 +#: ../../library/pathlib.rst:1064 ../../library/pathlib.rst:1078 msgid "Added return value, return the new Path instance." msgstr "" -#: ../../library/pathlib.rst:1071 +#: ../../library/pathlib.rst:1070 msgid "" "Rename this file or directory to the given *target*, and return a new Path " "instance pointing to *target*. If *target* points to an existing file or " "empty directory, it will be unconditionally replaced." msgstr "" -#: ../../library/pathlib.rst:1085 +#: ../../library/pathlib.rst:1084 msgid "" "Make the path absolute, resolving any symlinks. A new path object is " "returned::" msgstr "" -#: ../../library/pathlib.rst:1094 +#: ../../library/pathlib.rst:1093 msgid "" "\"``..``\" components are also eliminated (this is the only method to do " "so)::" msgstr "" -#: ../../library/pathlib.rst:1100 +#: ../../library/pathlib.rst:1099 msgid "" "If the path doesn't exist and *strict* is ``True``, :exc:`FileNotFoundError` " "is raised. If *strict* is ``False``, the path is resolved as far as " @@ -803,65 +804,65 @@ msgid "" "`RuntimeError` is raised." msgstr "" -#: ../../library/pathlib.rst:1106 +#: ../../library/pathlib.rst:1105 msgid "The *strict* argument (pre-3.6 behavior is strict)." msgstr "" -#: ../../library/pathlib.rst:1111 +#: ../../library/pathlib.rst:1110 msgid "" "This is like calling :func:`Path.glob` with \"``**/``\" added in front of " "the given relative *pattern*::" msgstr "" -#: ../../library/pathlib.rst:1121 +#: ../../library/pathlib.rst:1120 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.rglob`` with " "arguments ``self``, ``pattern``." msgstr "" -#: ../../library/pathlib.rst:1126 +#: ../../library/pathlib.rst:1125 msgid "Remove this directory. The directory must be empty." msgstr "" -#: ../../library/pathlib.rst:1131 +#: ../../library/pathlib.rst:1130 msgid "" "Return whether this path points to the same file as *other_path*, which can " "be either a Path object, or a string. The semantics are similar to :func:" "`os.path.samefile` and :func:`os.path.samestat`." msgstr "" -#: ../../library/pathlib.rst:1135 +#: ../../library/pathlib.rst:1134 msgid "" "An :exc:`OSError` can be raised if either file cannot be accessed for some " "reason." msgstr "" -#: ../../library/pathlib.rst:1152 +#: ../../library/pathlib.rst:1151 msgid "" "Make this path a symbolic link to *target*. Under Windows, " "*target_is_directory* must be true (default ``False``) if the link's target " "is a directory. Under POSIX, *target_is_directory*'s value is ignored." msgstr "" -#: ../../library/pathlib.rst:1168 +#: ../../library/pathlib.rst:1167 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.symlink`'s." msgstr "" -#: ../../library/pathlib.rst:1173 +#: ../../library/pathlib.rst:1172 msgid "Make this path a hard link to the same file as *target*." msgstr "" -#: ../../library/pathlib.rst:1176 +#: ../../library/pathlib.rst:1175 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.link`'s." msgstr "" -#: ../../library/pathlib.rst:1183 +#: ../../library/pathlib.rst:1182 msgid "Make *target* a hard link to this path." msgstr "" -#: ../../library/pathlib.rst:1187 +#: ../../library/pathlib.rst:1186 msgid "" "This function does not make this path a hard link to *target*, despite the " "implication of the function and argument names. The argument order (target, " @@ -869,14 +870,14 @@ msgid "" "hardlink_to`, but matches that of :func:`os.link`." msgstr "" -#: ../../library/pathlib.rst:1196 +#: ../../library/pathlib.rst:1195 msgid "" "This method is deprecated in favor of :meth:`Path.hardlink_to`, as the " "argument order of :meth:`Path.link_to` does not match that of :meth:`Path." "symlink_to`." msgstr "" -#: ../../library/pathlib.rst:1203 +#: ../../library/pathlib.rst:1202 msgid "" "Create a file at this given path. If *mode* is given, it is combined with " "the process' ``umask`` value to determine the file mode and access flags. " @@ -885,65 +886,65 @@ msgid "" "`FileExistsError` is raised." msgstr "" -#: ../../library/pathlib.rst:1212 +#: ../../library/pathlib.rst:1211 msgid "" "Remove this file or symbolic link. If the path points to a directory, use :" "func:`Path.rmdir` instead." msgstr "" -#: ../../library/pathlib.rst:1215 +#: ../../library/pathlib.rst:1214 msgid "" "If *missing_ok* is false (the default), :exc:`FileNotFoundError` is raised " "if the path does not exist." msgstr "" -#: ../../library/pathlib.rst:1218 +#: ../../library/pathlib.rst:1217 msgid "" "If *missing_ok* is true, :exc:`FileNotFoundError` exceptions will be ignored " "(same behavior as the POSIX ``rm -f`` command)." msgstr "" -#: ../../library/pathlib.rst:1221 +#: ../../library/pathlib.rst:1220 msgid "The *missing_ok* parameter was added." msgstr "新增 *missing_ok* 參數。" -#: ../../library/pathlib.rst:1227 +#: ../../library/pathlib.rst:1226 msgid "" "Open the file pointed to in bytes mode, write *data* to it, and close the " "file::" msgstr "" -#: ../../library/pathlib.rst:1236 +#: ../../library/pathlib.rst:1235 msgid "An existing file of the same name is overwritten." msgstr "" -#: ../../library/pathlib.rst:1243 +#: ../../library/pathlib.rst:1242 msgid "" "Open the file pointed to in text mode, write *data* to it, and close the " "file::" msgstr "" -#: ../../library/pathlib.rst:1252 +#: ../../library/pathlib.rst:1251 msgid "" "An existing file of the same name is overwritten. The optional parameters " "have the same meaning as in :func:`open`." msgstr "" -#: ../../library/pathlib.rst:1257 +#: ../../library/pathlib.rst:1256 msgid "The *newline* parameter was added." msgstr "新增 *newline* 參數。" -#: ../../library/pathlib.rst:1261 +#: ../../library/pathlib.rst:1260 msgid "Correspondence to tools in the :mod:`os` module" msgstr "" -#: ../../library/pathlib.rst:1263 +#: ../../library/pathlib.rst:1262 msgid "" "Below is a table mapping various :mod:`os` functions to their corresponding :" "class:`PurePath`/:class:`Path` equivalent." msgstr "" -#: ../../library/pathlib.rst:1268 +#: ../../library/pathlib.rst:1267 msgid "" "Not all pairs of functions/methods below are equivalent. Some of them, " "despite having some overlapping use-cases, have different semantics. They " @@ -951,229 +952,229 @@ msgid "" "relpath` and :meth:`PurePath.relative_to`." msgstr "" -#: ../../library/pathlib.rst:1274 +#: ../../library/pathlib.rst:1273 msgid ":mod:`os` and :mod:`os.path`" msgstr ":mod:`os` 和 :mod:`os.path`" -#: ../../library/pathlib.rst:1274 +#: ../../library/pathlib.rst:1273 msgid ":mod:`pathlib`" msgstr ":mod:`pathlib`" -#: ../../library/pathlib.rst:1276 +#: ../../library/pathlib.rst:1275 msgid ":func:`os.path.abspath`" msgstr ":func:`os.path.abspath`" -#: ../../library/pathlib.rst:1276 +#: ../../library/pathlib.rst:1275 msgid ":meth:`Path.resolve` [#]_" msgstr ":meth:`Path.resolve` [#]_" -#: ../../library/pathlib.rst:1277 +#: ../../library/pathlib.rst:1276 msgid ":func:`os.chmod`" msgstr ":func:`os.chmod`" -#: ../../library/pathlib.rst:1277 +#: ../../library/pathlib.rst:1276 msgid ":meth:`Path.chmod`" msgstr ":meth:`Path.chmod`" -#: ../../library/pathlib.rst:1278 +#: ../../library/pathlib.rst:1277 msgid ":func:`os.mkdir`" msgstr ":func:`os.mkdir`" -#: ../../library/pathlib.rst:1278 ../../library/pathlib.rst:1279 +#: ../../library/pathlib.rst:1277 ../../library/pathlib.rst:1278 msgid ":meth:`Path.mkdir`" msgstr ":meth:`Path.mkdir`" -#: ../../library/pathlib.rst:1279 +#: ../../library/pathlib.rst:1278 msgid ":func:`os.makedirs`" msgstr ":func:`os.makedirs`" -#: ../../library/pathlib.rst:1280 +#: ../../library/pathlib.rst:1279 msgid ":func:`os.rename`" msgstr ":func:`os.rename`" -#: ../../library/pathlib.rst:1280 +#: ../../library/pathlib.rst:1279 msgid ":meth:`Path.rename`" msgstr ":meth:`Path.rename`" -#: ../../library/pathlib.rst:1281 +#: ../../library/pathlib.rst:1280 msgid ":func:`os.replace`" msgstr ":func:`os.replace`" -#: ../../library/pathlib.rst:1281 +#: ../../library/pathlib.rst:1280 msgid ":meth:`Path.replace`" msgstr ":meth:`Path.replace`" -#: ../../library/pathlib.rst:1282 +#: ../../library/pathlib.rst:1281 msgid ":func:`os.rmdir`" msgstr ":func:`os.rmdir`" -#: ../../library/pathlib.rst:1282 +#: ../../library/pathlib.rst:1281 msgid ":meth:`Path.rmdir`" msgstr ":meth:`Path.rmdir`" -#: ../../library/pathlib.rst:1283 +#: ../../library/pathlib.rst:1282 msgid ":func:`os.remove`, :func:`os.unlink`" msgstr ":func:`os.remove`, :func:`os.unlink`" -#: ../../library/pathlib.rst:1283 +#: ../../library/pathlib.rst:1282 msgid ":meth:`Path.unlink`" msgstr ":meth:`Path.unlink`" -#: ../../library/pathlib.rst:1284 +#: ../../library/pathlib.rst:1283 msgid ":func:`os.getcwd`" msgstr ":func:`os.getcwd`" -#: ../../library/pathlib.rst:1284 +#: ../../library/pathlib.rst:1283 msgid ":func:`Path.cwd`" msgstr ":func:`Path.cwd`" -#: ../../library/pathlib.rst:1285 +#: ../../library/pathlib.rst:1284 msgid ":func:`os.path.exists`" msgstr ":func:`os.path.exists`" -#: ../../library/pathlib.rst:1285 +#: ../../library/pathlib.rst:1284 msgid ":meth:`Path.exists`" msgstr ":meth:`Path.exists`" -#: ../../library/pathlib.rst:1286 +#: ../../library/pathlib.rst:1285 msgid ":func:`os.path.expanduser`" msgstr ":func:`os.path.expanduser`" -#: ../../library/pathlib.rst:1286 +#: ../../library/pathlib.rst:1285 msgid ":meth:`Path.expanduser` and :meth:`Path.home`" msgstr ":meth:`Path.expanduser` 和 :meth:`Path.home`" -#: ../../library/pathlib.rst:1288 +#: ../../library/pathlib.rst:1287 msgid ":func:`os.listdir`" msgstr ":func:`os.listdir`" -#: ../../library/pathlib.rst:1288 +#: ../../library/pathlib.rst:1287 msgid ":meth:`Path.iterdir`" msgstr ":meth:`Path.iterdir`" -#: ../../library/pathlib.rst:1289 +#: ../../library/pathlib.rst:1288 msgid ":func:`os.path.isdir`" msgstr ":func:`os.path.isdir`" -#: ../../library/pathlib.rst:1289 +#: ../../library/pathlib.rst:1288 msgid ":meth:`Path.is_dir`" msgstr ":meth:`Path.is_dir`" -#: ../../library/pathlib.rst:1290 +#: ../../library/pathlib.rst:1289 msgid ":func:`os.path.isfile`" msgstr ":func:`os.path.isfile`" -#: ../../library/pathlib.rst:1290 +#: ../../library/pathlib.rst:1289 msgid ":meth:`Path.is_file`" msgstr ":meth:`Path.is_file`" -#: ../../library/pathlib.rst:1291 +#: ../../library/pathlib.rst:1290 msgid ":func:`os.path.islink`" msgstr ":func:`os.path.islink`" -#: ../../library/pathlib.rst:1291 +#: ../../library/pathlib.rst:1290 msgid ":meth:`Path.is_symlink`" msgstr ":meth:`Path.is_symlink`" -#: ../../library/pathlib.rst:1292 +#: ../../library/pathlib.rst:1291 msgid ":func:`os.link`" msgstr ":func:`os.link`" -#: ../../library/pathlib.rst:1292 +#: ../../library/pathlib.rst:1291 msgid ":meth:`Path.hardlink_to`" msgstr ":meth:`Path.hardlink_to`" -#: ../../library/pathlib.rst:1293 +#: ../../library/pathlib.rst:1292 msgid ":func:`os.symlink`" msgstr ":func:`os.symlink`" -#: ../../library/pathlib.rst:1293 +#: ../../library/pathlib.rst:1292 msgid ":meth:`Path.symlink_to`" msgstr ":meth:`Path.symlink_to`" -#: ../../library/pathlib.rst:1294 +#: ../../library/pathlib.rst:1293 msgid ":func:`os.readlink`" msgstr ":func:`os.readlink`" -#: ../../library/pathlib.rst:1294 +#: ../../library/pathlib.rst:1293 msgid ":meth:`Path.readlink`" msgstr ":meth:`Path.readlink`" -#: ../../library/pathlib.rst:1295 +#: ../../library/pathlib.rst:1294 msgid ":func:`os.path.relpath`" msgstr ":func:`os.path.relpath`" -#: ../../library/pathlib.rst:1295 +#: ../../library/pathlib.rst:1294 msgid ":meth:`PurePath.relative_to` [#]_" msgstr ":meth:`PurePath.relative_to` [#]_" -#: ../../library/pathlib.rst:1296 +#: ../../library/pathlib.rst:1295 msgid ":func:`os.stat`" msgstr ":func:`os.stat`" -#: ../../library/pathlib.rst:1296 +#: ../../library/pathlib.rst:1295 msgid ":meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group`" msgstr ":meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group`" -#: ../../library/pathlib.rst:1299 +#: ../../library/pathlib.rst:1298 msgid ":func:`os.path.isabs`" msgstr ":func:`os.path.isabs`" -#: ../../library/pathlib.rst:1299 +#: ../../library/pathlib.rst:1298 msgid ":meth:`PurePath.is_absolute`" msgstr ":meth:`PurePath.is_absolute`" -#: ../../library/pathlib.rst:1300 +#: ../../library/pathlib.rst:1299 msgid ":func:`os.path.join`" msgstr ":func:`os.path.join`" -#: ../../library/pathlib.rst:1300 +#: ../../library/pathlib.rst:1299 msgid ":func:`PurePath.joinpath`" msgstr ":func:`PurePath.joinpath`" -#: ../../library/pathlib.rst:1301 +#: ../../library/pathlib.rst:1300 msgid ":func:`os.path.basename`" msgstr ":func:`os.path.basename`" -#: ../../library/pathlib.rst:1301 +#: ../../library/pathlib.rst:1300 msgid ":data:`PurePath.name`" msgstr ":data:`PurePath.name`" -#: ../../library/pathlib.rst:1302 +#: ../../library/pathlib.rst:1301 msgid ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`" -#: ../../library/pathlib.rst:1302 +#: ../../library/pathlib.rst:1301 msgid ":data:`PurePath.parent`" msgstr ":data:`PurePath.parent`" -#: ../../library/pathlib.rst:1303 +#: ../../library/pathlib.rst:1302 msgid ":func:`os.path.samefile`" msgstr ":func:`os.path.samefile`" -#: ../../library/pathlib.rst:1303 +#: ../../library/pathlib.rst:1302 msgid ":meth:`Path.samefile`" msgstr ":meth:`Path.samefile`" -#: ../../library/pathlib.rst:1304 +#: ../../library/pathlib.rst:1303 msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" -#: ../../library/pathlib.rst:1304 +#: ../../library/pathlib.rst:1303 msgid ":data:`PurePath.suffix`" msgstr ":data:`PurePath.suffix`" -#: ../../library/pathlib.rst:1308 +#: ../../library/pathlib.rst:1307 msgid "Footnotes" msgstr "註解" -#: ../../library/pathlib.rst:1309 +#: ../../library/pathlib.rst:1308 msgid "" ":func:`os.path.abspath` does not resolve symbolic links while :meth:`Path." "resolve` does." msgstr "" -#: ../../library/pathlib.rst:1310 +#: ../../library/pathlib.rst:1309 msgid "" ":meth:`PurePath.relative_to` requires ``self`` to be the subpath of the " "argument, but :func:`os.path.relpath` does not." diff --git a/library/ssl.po b/library/ssl.po index a40bd66db1..010237fae3 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2153,7 +2153,7 @@ msgstr "" msgid "" "Get statistics about the SSL sessions created or managed by this context. A " "dictionary is returned which maps the names of each `piece of information " -"`_ to " +"`_ to " "their numeric values. For example, here is the total number of hits and " "misses in the session cache since the context was created::" msgstr "" @@ -2971,7 +2971,7 @@ msgid "" "`SSLContext.set_ciphers` method. Starting from Python 3.2.3, the ssl module " "disables certain weak ciphers by default, but you may want to further " "restrict the cipher choice. Be sure to read OpenSSL's documentation about " -"the `cipher list format `_. If you want to check which ciphers are enabled " "by a given cipher list, use :meth:`SSLContext.get_ciphers` or the ``openssl " "ciphers`` command on your system." diff --git a/library/statistics.po b/library/statistics.po index 21ce7a0a11..5553a9246b 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-22 00:10+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-07-27 16:57+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -903,9 +903,9 @@ msgstr "" msgid "" "Compute the inverse cumulative distribution function, also known as the " "`quantile function `_ or " -"the `percent-point `_ function. Mathematically, it is written " -"``x : P(X <= x) = p``." +"the `percent-point `_ " +"function. Mathematically, it is written ``x : P(X <= x) = p``." msgstr "" #: ../../library/statistics.rst:777 @@ -1018,7 +1018,7 @@ msgstr "" #: ../../library/statistics.rst:922 msgid "" "Wikipedia has a `nice example of a Naive Bayesian Classifier `_. The " +"wikipedia.org/wiki/Naive_Bayes_classifier#Person_classification>`_. The " "challenge is to predict a person's gender from measurements of normally " "distributed features including height, weight, and foot size." msgstr "" diff --git a/library/sys.po b/library/sys.po index fec423357b..76bbb780a5 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-04 00:14+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -335,7 +335,7 @@ msgid "Integer specifying the handle of the Python DLL." msgstr "" #: ../../library/sys.rst:269 ../../library/sys.rst:808 -#: ../../library/sys.rst:1486 ../../library/sys.rst:1716 +#: ../../library/sys.rst:1487 ../../library/sys.rst:1717 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" @@ -931,7 +931,7 @@ msgid "" "module (``RTLD_xxx`` constants, e.g. :data:`os.RTLD_LAZY`)." msgstr "" -#: ../../library/sys.rst:626 ../../library/sys.rst:1255 +#: ../../library/sys.rst:626 ../../library/sys.rst:1256 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" @@ -1179,7 +1179,7 @@ msgstr "" msgid "See :pep:`525` for more details." msgstr "更多細節請見 :pep:`525`\\ 。" -#: ../../library/sys.rst:830 ../../library/sys.rst:1449 +#: ../../library/sys.rst:830 ../../library/sys.rst:1450 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.)" @@ -1191,7 +1191,7 @@ msgid "" "`set_coroutine_origin_tracking_depth`." msgstr "" -#: ../../library/sys.rst:842 ../../library/sys.rst:1470 +#: ../../library/sys.rst:842 ../../library/sys.rst:1471 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.) Use it only for debugging purposes." @@ -1354,11 +1354,11 @@ msgid "" "representation of integers. The attributes are read only." msgstr "" -#: ../../library/sys.rst:954 ../../library/sys.rst:1601 +#: ../../library/sys.rst:954 ../../library/sys.rst:1602 msgid "Attribute" msgstr "屬性" -#: ../../library/sys.rst:954 ../../library/sys.rst:1601 +#: ../../library/sys.rst:954 ../../library/sys.rst:1602 msgid "Explanation" msgstr "解釋" @@ -1466,35 +1466,36 @@ msgstr "" msgid "" "A list of :term:`meta path finder` objects that have their :meth:`~importlib." "abc.MetaPathFinder.find_spec` methods called to see if one of the objects " -"can find the module to be imported. The :meth:`~importlib.abc.MetaPathFinder." -"find_spec` method is called with at least the absolute name of the module " -"being imported. If the module to be imported is contained in a package, then " -"the parent package's :attr:`__path__` attribute is passed in as a second " -"argument. The method returns a :term:`module spec`, or ``None`` if the " -"module cannot be found." +"can find the module to be imported. By default, it holds entries that " +"implement Python's default import semantics. The :meth:`~importlib.abc." +"MetaPathFinder.find_spec` method is called with at least the absolute name " +"of the module being imported. If the module to be imported is contained in a " +"package, then the parent package's :attr:`__path__` attribute is passed in " +"as a second argument. The method returns a :term:`module spec`, or ``None`` " +"if the module cannot be found." msgstr "" -#: ../../library/sys.rst:1054 +#: ../../library/sys.rst:1055 msgid ":class:`importlib.abc.MetaPathFinder`" msgstr ":class:`importlib.abc.MetaPathFinder`" -#: ../../library/sys.rst:1054 +#: ../../library/sys.rst:1055 msgid "" "The abstract base class defining the interface of finder objects on :data:" "`meta_path`." msgstr "" -#: ../../library/sys.rst:1058 +#: ../../library/sys.rst:1059 msgid ":class:`importlib.machinery.ModuleSpec`" msgstr ":class:`importlib.machinery.ModuleSpec`" -#: ../../library/sys.rst:1057 +#: ../../library/sys.rst:1058 msgid "" "The concrete class which :meth:`~importlib.abc.MetaPathFinder.find_spec` " "should return instances of." msgstr "" -#: ../../library/sys.rst:1063 +#: ../../library/sys.rst:1064 msgid "" ":term:`Module specs ` were introduced in Python 3.4, by :pep:" "`451`. Earlier versions of Python looked for a method called :meth:" @@ -1503,7 +1504,7 @@ msgid "" "MetaPathFinder.find_spec` method." msgstr "" -#: ../../library/sys.rst:1071 +#: ../../library/sys.rst:1072 msgid "" "This is a dictionary that maps module names to modules which have already " "been loaded. This can be manipulated to force reloading of modules and " @@ -1515,24 +1516,24 @@ msgid "" "other threads." msgstr "" -#: ../../library/sys.rst:1083 +#: ../../library/sys.rst:1084 msgid "" "The list of the original command line arguments passed to the Python " "executable." msgstr "" -#: ../../library/sys.rst:1086 +#: ../../library/sys.rst:1087 msgid "See also :data:`sys.argv`." msgstr "另請參閱 :data:`sys.argv`\\ 。" -#: ../../library/sys.rst:1095 +#: ../../library/sys.rst:1096 msgid "" "A list of strings that specifies the search path for modules. Initialized " "from the environment variable :envvar:`PYTHONPATH`, plus an installation-" "dependent default." msgstr "" -#: ../../library/sys.rst:1099 +#: ../../library/sys.rst:1100 msgid "" "As initialized upon program startup, the first item of this list, " "``path[0]``, is the directory containing the script that was used to invoke " @@ -1544,31 +1545,31 @@ msgid "" "`PYTHONPATH`." msgstr "" -#: ../../library/sys.rst:1107 +#: ../../library/sys.rst:1108 msgid "" "A program is free to modify this list for its own purposes. Only strings " "and bytes should be added to :data:`sys.path`; all other data types are " "ignored during import." msgstr "" -#: ../../library/sys.rst:1113 +#: ../../library/sys.rst:1114 msgid "" "Module :mod:`site` This describes how to use .pth files to extend :data:`sys." "path`." msgstr "" -#: ../../library/sys.rst:1119 +#: ../../library/sys.rst:1120 msgid "" "A list of callables that take a path argument to try to create a :term:" "`finder` for the path. If a finder can be created, it is to be returned by " "the callable, else raise :exc:`ImportError`." msgstr "" -#: ../../library/sys.rst:1123 ../../library/sys.rst:1134 +#: ../../library/sys.rst:1124 ../../library/sys.rst:1135 msgid "Originally specified in :pep:`302`." msgstr "" -#: ../../library/sys.rst:1128 +#: ../../library/sys.rst:1129 msgid "" "A dictionary acting as a cache for :term:`finder` objects. The keys are " "paths that have been passed to :data:`sys.path_hooks` and the values are the " @@ -1576,19 +1577,19 @@ msgid "" "is found on :data:`sys.path_hooks` then ``None`` is stored." msgstr "" -#: ../../library/sys.rst:1136 +#: ../../library/sys.rst:1137 msgid "" "``None`` is stored instead of :class:`imp.NullImporter` when no finder is " "found." msgstr "" -#: ../../library/sys.rst:1143 +#: ../../library/sys.rst:1144 msgid "" "This string contains a platform identifier that can be used to append " "platform-specific components to :data:`sys.path`, for instance." msgstr "" -#: ../../library/sys.rst:1146 +#: ../../library/sys.rst:1147 msgid "" "For Unix systems, except on Linux and AIX, this is the lowercased OS name as " "returned by ``uname -s`` with the first part of the version as returned by " @@ -1597,59 +1598,59 @@ msgid "" "version, it is therefore recommended to use the following idiom::" msgstr "" -#: ../../library/sys.rst:1159 +#: ../../library/sys.rst:1160 msgid "For other systems, the values are:" msgstr "" -#: ../../library/sys.rst:1162 +#: ../../library/sys.rst:1163 msgid "System" msgstr "" -#: ../../library/sys.rst:1162 +#: ../../library/sys.rst:1163 msgid "``platform`` value" msgstr "" -#: ../../library/sys.rst:1164 +#: ../../library/sys.rst:1165 msgid "AIX" msgstr "AIX" -#: ../../library/sys.rst:1164 +#: ../../library/sys.rst:1165 msgid "``'aix'``" msgstr "``'aix'``" -#: ../../library/sys.rst:1165 +#: ../../library/sys.rst:1166 msgid "Linux" msgstr "Linux" -#: ../../library/sys.rst:1165 +#: ../../library/sys.rst:1166 msgid "``'linux'``" msgstr "``'linux'``" -#: ../../library/sys.rst:1166 +#: ../../library/sys.rst:1167 msgid "Windows" msgstr "Windows" -#: ../../library/sys.rst:1166 +#: ../../library/sys.rst:1167 msgid "``'win32'``" msgstr "``'win32'``" -#: ../../library/sys.rst:1167 +#: ../../library/sys.rst:1168 msgid "Windows/Cygwin" msgstr "Windows/Cygwin" -#: ../../library/sys.rst:1167 +#: ../../library/sys.rst:1168 msgid "``'cygwin'``" msgstr "``'cygwin'``" -#: ../../library/sys.rst:1168 +#: ../../library/sys.rst:1169 msgid "macOS" msgstr "macOS" -#: ../../library/sys.rst:1168 +#: ../../library/sys.rst:1169 msgid "``'darwin'``" msgstr "``'darwin'``" -#: ../../library/sys.rst:1171 +#: ../../library/sys.rst:1172 msgid "" "On Linux, :attr:`sys.platform` doesn't contain the major version anymore. It " "is always ``'linux'``, instead of ``'linux2'`` or ``'linux3'``. Since older " @@ -1657,7 +1658,7 @@ msgid "" "the ``startswith`` idiom presented above." msgstr "" -#: ../../library/sys.rst:1177 +#: ../../library/sys.rst:1178 msgid "" "On AIX, :attr:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix5'`` or ``'aix7'``. Since older " @@ -1665,57 +1666,57 @@ msgid "" "the ``startswith`` idiom presented above." msgstr "" -#: ../../library/sys.rst:1185 +#: ../../library/sys.rst:1186 msgid "" ":attr:`os.name` has a coarser granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" -#: ../../library/sys.rst:1188 +#: ../../library/sys.rst:1189 msgid "" "The :mod:`platform` module provides detailed checks for the system's " "identity." msgstr "" -#: ../../library/sys.rst:1194 +#: ../../library/sys.rst:1195 msgid "" "Name of the platform-specific library directory. It is used to build the " "path of standard library and the paths of installed extension modules." msgstr "" -#: ../../library/sys.rst:1197 +#: ../../library/sys.rst:1198 msgid "" "It is equal to ``\"lib\"`` on most platforms. On Fedora and SuSE, it is " "equal to ``\"lib64\"`` on 64-bit platforms which gives the following ``sys." "path`` paths (where ``X.Y`` is the Python ``major.minor`` version):" msgstr "" -#: ../../library/sys.rst:1201 +#: ../../library/sys.rst:1202 msgid "" "``/usr/lib64/pythonX.Y/``: Standard library (like ``os.py`` of the :mod:`os` " "module)" msgstr "" -#: ../../library/sys.rst:1203 +#: ../../library/sys.rst:1204 msgid "" "``/usr/lib64/pythonX.Y/lib-dynload/``: C extension modules of the standard " "library (like the :mod:`errno` module, the exact filename is platform " "specific)" msgstr "" -#: ../../library/sys.rst:1206 +#: ../../library/sys.rst:1207 msgid "" "``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not :data:`sys." "platlibdir`): Third-party modules" msgstr "" -#: ../../library/sys.rst:1208 +#: ../../library/sys.rst:1209 msgid "" "``/usr/lib64/pythonX.Y/site-packages/``: C extension modules of third-party " "packages" msgstr "" -#: ../../library/sys.rst:1216 +#: ../../library/sys.rst:1217 msgid "" "A string giving the site-specific directory prefix where the platform " "independent Python files are installed; on Unix, the default is ``'/usr/" @@ -1724,14 +1725,14 @@ msgid "" "paths." msgstr "" -#: ../../library/sys.rst:1222 +#: ../../library/sys.rst:1223 msgid "" "If a :ref:`virtual environment ` is in effect, this value will be " "changed in ``site.py`` to point to the virtual environment. The value for " "the Python installation will still be available, via :data:`base_prefix`." msgstr "" -#: ../../library/sys.rst:1237 +#: ../../library/sys.rst:1238 msgid "" "Strings specifying the primary and secondary prompt of the interpreter. " "These are only defined if the interpreter is in interactive mode. Their " @@ -1741,7 +1742,7 @@ msgid "" "used to implement a dynamic prompt." msgstr "" -#: ../../library/sys.rst:1247 +#: ../../library/sys.rst:1248 msgid "" "Set the flags used by the interpreter for :c:func:`dlopen` calls, such as " "when the interpreter loads extension modules. Among other things, this will " @@ -1752,7 +1753,7 @@ msgid "" "data:`os.RTLD_LAZY`)." msgstr "" -#: ../../library/sys.rst:1263 +#: ../../library/sys.rst:1264 msgid "" "Set the system's profile function, which allows you to implement a Python " "source code profiler in Python. See chapter :ref:`profile` for more " @@ -1767,7 +1768,7 @@ msgid "" "in the profile function will cause itself unset." msgstr "" -#: ../../library/sys.rst:1274 +#: ../../library/sys.rst:1275 msgid "" "Profile functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -1775,71 +1776,71 @@ msgid "" "depends on the event type." msgstr "" -#: ../../library/sys.rst:1279 +#: ../../library/sys.rst:1280 msgid "" "Raises an :ref:`auditing event ` ``sys.setprofile`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:1281 ../../library/sys.rst:1362 +#: ../../library/sys.rst:1282 ../../library/sys.rst:1363 msgid "The events have the following meaning:" msgstr "" -#: ../../library/sys.rst:1285 ../../library/sys.rst:1367 +#: ../../library/sys.rst:1286 ../../library/sys.rst:1368 msgid "``'call'``" msgstr "``'call'``" -#: ../../library/sys.rst:1284 +#: ../../library/sys.rst:1285 msgid "" "A function is called (or some other code block entered). The profile " "function is called; *arg* is ``None``." msgstr "" -#: ../../library/sys.rst:1290 ../../library/sys.rst:1382 +#: ../../library/sys.rst:1291 ../../library/sys.rst:1383 msgid "``'return'``" msgstr "``'return'``" -#: ../../library/sys.rst:1288 +#: ../../library/sys.rst:1289 msgid "" "A function (or other code block) is about to return. The profile function " "is called; *arg* is the value that will be returned, or ``None`` if the " "event is caused by an exception being raised." msgstr "" -#: ../../library/sys.rst:1294 +#: ../../library/sys.rst:1295 msgid "``'c_call'``" msgstr "``'c_call'``" -#: ../../library/sys.rst:1293 +#: ../../library/sys.rst:1294 msgid "" "A C function is about to be called. This may be an extension function or a " "built-in. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1297 +#: ../../library/sys.rst:1298 msgid "``'c_return'``" msgstr "``'c_return'``" -#: ../../library/sys.rst:1297 +#: ../../library/sys.rst:1298 msgid "A C function has returned. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1299 +#: ../../library/sys.rst:1300 msgid "``'c_exception'``" msgstr "``'c_exception'``" -#: ../../library/sys.rst:1300 +#: ../../library/sys.rst:1301 msgid "A C function has raised an exception. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1304 +#: ../../library/sys.rst:1305 msgid "" "Set the maximum depth of the Python interpreter stack to *limit*. This " "limit prevents infinite recursion from causing an overflow of the C stack " "and crashing Python." msgstr "" -#: ../../library/sys.rst:1308 +#: ../../library/sys.rst:1309 msgid "" "The highest possible limit is platform-dependent. A user may need to set " "the limit higher when they have a program that requires deep recursion and a " @@ -1847,19 +1848,19 @@ msgid "" "because a too-high limit can lead to a crash." msgstr "" -#: ../../library/sys.rst:1313 +#: ../../library/sys.rst:1314 msgid "" "If the new limit is too low at the current recursion depth, a :exc:" "`RecursionError` exception is raised." msgstr "" -#: ../../library/sys.rst:1316 +#: ../../library/sys.rst:1317 msgid "" "A :exc:`RecursionError` exception is now raised if the new limit is too low " "at the current recursion depth." msgstr "" -#: ../../library/sys.rst:1323 +#: ../../library/sys.rst:1324 msgid "" "Set the interpreter's thread switch interval (in seconds). This floating-" "point value determines the ideal duration of the \"timeslices\" allocated to " @@ -1870,7 +1871,7 @@ msgid "" "scheduler." msgstr "" -#: ../../library/sys.rst:1340 +#: ../../library/sys.rst:1341 msgid "" "Set the system's trace function, which allows you to implement a Python " "source code debugger in Python. The function is thread-specific; for a " @@ -1879,7 +1880,7 @@ msgid "" "`threading.settrace`." msgstr "" -#: ../../library/sys.rst:1345 +#: ../../library/sys.rst:1346 msgid "" "Trace functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -1887,7 +1888,7 @@ msgid "" "the event type." msgstr "" -#: ../../library/sys.rst:1350 +#: ../../library/sys.rst:1351 msgid "" "The trace function is invoked (with *event* set to ``'call'``) whenever a " "new local scope is entered; it should return a reference to a local trace " @@ -1895,31 +1896,31 @@ msgid "" "traced." msgstr "" -#: ../../library/sys.rst:1355 +#: ../../library/sys.rst:1356 msgid "" "The local trace function should return a reference to itself (or to another " "function for further tracing in that scope), or ``None`` to turn off tracing " "in that scope." msgstr "" -#: ../../library/sys.rst:1359 +#: ../../library/sys.rst:1360 msgid "" "If there is any error occurred in the trace function, it will be unset, just " "like ``settrace(None)`` is called." msgstr "" -#: ../../library/sys.rst:1365 +#: ../../library/sys.rst:1366 msgid "" "A function is called (or some other code block entered). The global trace " "function is called; *arg* is ``None``; the return value specifies the local " "trace function." msgstr "" -#: ../../library/sys.rst:1376 +#: ../../library/sys.rst:1377 msgid "``'line'``" msgstr "``'line'``" -#: ../../library/sys.rst:1370 +#: ../../library/sys.rst:1371 msgid "" "The interpreter is about to execute a new line of code or re-execute the " "condition of a loop. The local trace function is called; *arg* is ``None``; " @@ -1929,7 +1930,7 @@ msgid "" "const:`False` on that frame." msgstr "" -#: ../../library/sys.rst:1379 +#: ../../library/sys.rst:1380 msgid "" "A function (or other code block) is about to return. The local trace " "function is called; *arg* is the value that will be returned, or ``None`` if " @@ -1937,22 +1938,22 @@ msgid "" "return value is ignored." msgstr "" -#: ../../library/sys.rst:1387 +#: ../../library/sys.rst:1388 msgid "``'exception'``" msgstr "``'exception'``" -#: ../../library/sys.rst:1385 +#: ../../library/sys.rst:1386 msgid "" "An exception has occurred. The local trace function is called; *arg* is a " "tuple ``(exception, value, traceback)``; the return value specifies the new " "local trace function." msgstr "" -#: ../../library/sys.rst:1395 +#: ../../library/sys.rst:1396 msgid "``'opcode'``" msgstr "``'opcode'``" -#: ../../library/sys.rst:1390 +#: ../../library/sys.rst:1391 msgid "" "The interpreter is about to execute a new opcode (see :mod:`dis` for opcode " "details). The local trace function is called; *arg* is ``None``; the return " @@ -1961,13 +1962,13 @@ msgid "" "`f_trace_opcodes` to :const:`True` on the frame." msgstr "" -#: ../../library/sys.rst:1397 +#: ../../library/sys.rst:1398 msgid "" "Note that as an exception is propagated down the chain of callers, an " "``'exception'`` event is generated at each level." msgstr "" -#: ../../library/sys.rst:1400 +#: ../../library/sys.rst:1401 msgid "" "For more fine-grained usage, it's possible to set a trace function by " "assigning ``frame.f_trace = tracefunc`` explicitly, rather than relying on " @@ -1981,17 +1982,17 @@ msgid "" "on each frame)." msgstr "" -#: ../../library/sys.rst:1411 +#: ../../library/sys.rst:1412 msgid "For more information on code and frame objects, refer to :ref:`types`." msgstr "" -#: ../../library/sys.rst:1413 +#: ../../library/sys.rst:1414 msgid "" "Raises an :ref:`auditing event ` ``sys.settrace`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:1417 +#: ../../library/sys.rst:1418 msgid "" "The :func:`settrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -1999,13 +2000,13 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../library/sys.rst:1424 +#: ../../library/sys.rst:1425 msgid "" "``'opcode'`` event type added; :attr:`f_trace_lines` and :attr:" "`f_trace_opcodes` attributes added to frames" msgstr "" -#: ../../library/sys.rst:1429 +#: ../../library/sys.rst:1430 msgid "" "Accepts two optional keyword arguments which are callables that accept an :" "term:`asynchronous generator iterator` as an argument. The *firstiter* " @@ -2014,32 +2015,32 @@ msgid "" "about to be garbage collected." msgstr "" -#: ../../library/sys.rst:1435 +#: ../../library/sys.rst:1436 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_firstiter`` with no arguments." msgstr "" -#: ../../library/sys.rst:1437 +#: ../../library/sys.rst:1438 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_finalizer`` with no arguments." msgstr "" -#: ../../library/sys.rst:1439 +#: ../../library/sys.rst:1440 msgid "" "Two auditing events are raised because the underlying API consists of two " "calls, each of which must raise its own event." msgstr "" -#: ../../library/sys.rst:1442 +#: ../../library/sys.rst:1443 msgid "" "See :pep:`525` for more details, and for a reference example of a " "*finalizer* method see the implementation of ``asyncio.Loop." "shutdown_asyncgens`` in :source:`Lib/asyncio/base_events.py`" msgstr "" -#: ../../library/sys.rst:1454 +#: ../../library/sys.rst:1455 msgid "" "Allows enabling or disabling coroutine origin tracking. When enabled, the " "``cr_origin`` attribute on coroutine objects will contain a tuple of " @@ -2048,74 +2049,74 @@ msgid "" "disabled, ``cr_origin`` will be None." msgstr "" -#: ../../library/sys.rst:1461 +#: ../../library/sys.rst:1462 msgid "" "To enable, pass a *depth* value greater than zero; this sets the number of " "frames whose information will be captured. To disable, pass set *depth* to " "zero." msgstr "" -#: ../../library/sys.rst:1465 +#: ../../library/sys.rst:1466 msgid "This setting is thread-specific." msgstr "" -#: ../../library/sys.rst:1475 +#: ../../library/sys.rst:1476 msgid "" "Changes the :term:`filesystem encoding and error handler` to 'mbcs' and " "'replace' respectively, for consistency with versions of Python prior to 3.6." msgstr "" -#: ../../library/sys.rst:1479 +#: ../../library/sys.rst:1480 msgid "" "This is equivalent to defining the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " "environment variable before launching Python." msgstr "" -#: ../../library/sys.rst:1482 +#: ../../library/sys.rst:1483 msgid "" "See also :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors`." msgstr "" -#: ../../library/sys.rst:1487 +#: ../../library/sys.rst:1488 msgid "See :pep:`529` for more details." msgstr "更多細節請見 :pep:`529`\\ 。" -#: ../../library/sys.rst:1494 +#: ../../library/sys.rst:1495 msgid "" ":term:`File objects ` used by the interpreter for standard " "input, output and errors:" msgstr "" -#: ../../library/sys.rst:1497 +#: ../../library/sys.rst:1498 msgid "" "``stdin`` is used for all interactive input (including calls to :func:" "`input`);" msgstr "" -#: ../../library/sys.rst:1499 +#: ../../library/sys.rst:1500 msgid "" "``stdout`` is used for the output of :func:`print` and :term:`expression` " "statements and for the prompts of :func:`input`;" msgstr "" -#: ../../library/sys.rst:1501 +#: ../../library/sys.rst:1502 msgid "The interpreter's own prompts and its error messages go to ``stderr``." msgstr "" -#: ../../library/sys.rst:1503 +#: ../../library/sys.rst:1504 msgid "" "These streams are regular :term:`text files ` like those returned " "by the :func:`open` function. Their parameters are chosen as follows:" msgstr "" -#: ../../library/sys.rst:1507 +#: ../../library/sys.rst:1508 msgid "" "The encoding and error handling are is initialized from :c:member:`PyConfig." "stdio_encoding` and :c:member:`PyConfig.stdio_errors`." msgstr "" -#: ../../library/sys.rst:1510 +#: ../../library/sys.rst:1511 msgid "" "On Windows, UTF-8 is used for the console device. Non-character devices " "such as disk files and pipes use the system locale encoding (i.e. the ANSI " @@ -2126,14 +2127,14 @@ msgid "" "initially attached to a console." msgstr "" -#: ../../library/sys.rst:1519 +#: ../../library/sys.rst:1520 msgid "" "The special behaviour of the console can be overridden by setting the " "environment variable PYTHONLEGACYWINDOWSSTDIO before starting Python. In " "that case, the console codepages are used as for any other character device." msgstr "" -#: ../../library/sys.rst:1524 +#: ../../library/sys.rst:1525 msgid "" "Under all platforms, you can override the character encoding by setting the :" "envvar:`PYTHONIOENCODING` environment variable before starting Python or by " @@ -2142,7 +2143,7 @@ msgid "" "only applies when :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also set." msgstr "" -#: ../../library/sys.rst:1531 +#: ../../library/sys.rst:1532 msgid "" "When interactive, the ``stdout`` stream is line-buffered. Otherwise, it is " "block-buffered like regular text files. The ``stderr`` stream is line-" @@ -2151,19 +2152,19 @@ msgid "" "`PYTHONUNBUFFERED` environment variable." msgstr "" -#: ../../library/sys.rst:1537 +#: ../../library/sys.rst:1538 msgid "" "Non-interactive ``stderr`` is now line-buffered instead of fully buffered." msgstr "" -#: ../../library/sys.rst:1543 +#: ../../library/sys.rst:1544 msgid "" "To write or read binary data from/to the standard streams, use the " "underlying binary :data:`~io.TextIOBase.buffer` object. For example, to " "write bytes to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``." msgstr "" -#: ../../library/sys.rst:1547 +#: ../../library/sys.rst:1548 msgid "" "However, if you are writing a library (and do not control in which context " "its code will be executed), be aware that the standard streams may be " @@ -2171,7 +2172,7 @@ msgid "" "support the :attr:`~io.BufferedIOBase.buffer` attribute." msgstr "" -#: ../../library/sys.rst:1557 +#: ../../library/sys.rst:1558 msgid "" "These objects contain the original values of ``stdin``, ``stderr`` and " "``stdout`` at the start of the program. They are used during finalization, " @@ -2179,7 +2180,7 @@ msgid "" "``sys.std*`` object has been redirected." msgstr "" -#: ../../library/sys.rst:1562 +#: ../../library/sys.rst:1563 msgid "" "It can also be used to restore the actual files to known working file " "objects in case they have been overwritten with a broken object. However, " @@ -2187,7 +2188,7 @@ msgid "" "before replacing it, and restore the saved object." msgstr "" -#: ../../library/sys.rst:1568 +#: ../../library/sys.rst:1569 msgid "" "Under some conditions ``stdin``, ``stdout`` and ``stderr`` as well as the " "original values ``__stdin__``, ``__stdout__`` and ``__stderr__`` can be " @@ -2195,12 +2196,12 @@ msgid "" "to a console and Python apps started with :program:`pythonw`." msgstr "" -#: ../../library/sys.rst:1576 +#: ../../library/sys.rst:1577 msgid "" "A frozenset of strings containing the names of standard library modules." msgstr "" -#: ../../library/sys.rst:1578 +#: ../../library/sys.rst:1579 msgid "" "It is the same on all platforms. Modules which are not available on some " "platforms and modules disabled at Python build are also listed. All module " @@ -2208,7 +2209,7 @@ msgid "" "modules are excluded." msgstr "" -#: ../../library/sys.rst:1583 +#: ../../library/sys.rst:1584 msgid "" "For packages, only the main package is listed: sub-packages and sub-modules " "are not listed. For example, the ``email`` package is listed, but the " @@ -2216,66 +2217,66 @@ msgid "" "listed." msgstr "" -#: ../../library/sys.rst:1588 +#: ../../library/sys.rst:1589 msgid "See also the :attr:`sys.builtin_module_names` list." msgstr "另請參閱 :attr:`sys.builtin_module_names` 清單。" -#: ../../library/sys.rst:1595 +#: ../../library/sys.rst:1596 msgid "" "A :term:`named tuple` holding information about the thread implementation." msgstr "" -#: ../../library/sys.rst:1603 +#: ../../library/sys.rst:1604 msgid ":const:`name`" msgstr ":const:`name`" -#: ../../library/sys.rst:1603 +#: ../../library/sys.rst:1604 msgid "Name of the thread implementation:" msgstr "" -#: ../../library/sys.rst:1605 +#: ../../library/sys.rst:1606 msgid "``'nt'``: Windows threads" msgstr "" -#: ../../library/sys.rst:1606 +#: ../../library/sys.rst:1607 msgid "``'pthread'``: POSIX threads" msgstr "" -#: ../../library/sys.rst:1607 +#: ../../library/sys.rst:1608 msgid "``'solaris'``: Solaris threads" msgstr "" -#: ../../library/sys.rst:1609 +#: ../../library/sys.rst:1610 msgid ":const:`lock`" msgstr ":const:`lock`" -#: ../../library/sys.rst:1609 +#: ../../library/sys.rst:1610 msgid "Name of the lock implementation:" msgstr "" -#: ../../library/sys.rst:1611 +#: ../../library/sys.rst:1612 msgid "``'semaphore'``: a lock uses a semaphore" msgstr "" -#: ../../library/sys.rst:1612 +#: ../../library/sys.rst:1613 msgid "``'mutex+cond'``: a lock uses a mutex and a condition variable" msgstr "" -#: ../../library/sys.rst:1614 +#: ../../library/sys.rst:1615 msgid "``None`` if this information is unknown" msgstr "" -#: ../../library/sys.rst:1616 +#: ../../library/sys.rst:1617 msgid ":const:`version`" msgstr ":const:`version`" -#: ../../library/sys.rst:1616 +#: ../../library/sys.rst:1617 msgid "" "Name and version of the thread library. It is a string, or ``None`` if this " "information is unknown." msgstr "" -#: ../../library/sys.rst:1625 +#: ../../library/sys.rst:1626 msgid "" "When this variable is set to an integer value, it determines the maximum " "number of levels of traceback information printed when an unhandled " @@ -2284,78 +2285,78 @@ msgid "" "are printed." msgstr "" -#: ../../library/sys.rst:1633 +#: ../../library/sys.rst:1634 msgid "Handle an unraisable exception." msgstr "" -#: ../../library/sys.rst:1635 +#: ../../library/sys.rst:1636 msgid "" "Called when an exception has occurred but there is no way for Python to " "handle it. For example, when a destructor raises an exception or during " "garbage collection (:func:`gc.collect`)." msgstr "" -#: ../../library/sys.rst:1639 +#: ../../library/sys.rst:1640 msgid "The *unraisable* argument has the following attributes:" msgstr "" -#: ../../library/sys.rst:1641 +#: ../../library/sys.rst:1642 msgid "*exc_type*: Exception type." msgstr "" -#: ../../library/sys.rst:1642 +#: ../../library/sys.rst:1643 msgid "*exc_value*: Exception value, can be ``None``." msgstr "" -#: ../../library/sys.rst:1643 +#: ../../library/sys.rst:1644 msgid "*exc_traceback*: Exception traceback, can be ``None``." msgstr "" -#: ../../library/sys.rst:1644 +#: ../../library/sys.rst:1645 msgid "*err_msg*: Error message, can be ``None``." msgstr "" -#: ../../library/sys.rst:1645 +#: ../../library/sys.rst:1646 msgid "*object*: Object causing the exception, can be ``None``." msgstr "" -#: ../../library/sys.rst:1647 +#: ../../library/sys.rst:1648 msgid "" "The default hook formats *err_msg* and *object* as: ``f'{err_msg}: {object!" "r}'``; use \"Exception ignored in\" error message if *err_msg* is ``None``." msgstr "" -#: ../../library/sys.rst:1651 +#: ../../library/sys.rst:1652 msgid "" ":func:`sys.unraisablehook` can be overridden to control how unraisable " "exceptions are handled." msgstr "" -#: ../../library/sys.rst:1654 +#: ../../library/sys.rst:1655 msgid "" "Storing *exc_value* using a custom hook can create a reference cycle. It " "should be cleared explicitly to break the reference cycle when the exception " "is no longer needed." msgstr "" -#: ../../library/sys.rst:1658 +#: ../../library/sys.rst:1659 msgid "" "Storing *object* using a custom hook can resurrect it if it is set to an " "object which is being finalized. Avoid storing *object* after the custom " "hook completes to avoid resurrecting objects." msgstr "" -#: ../../library/sys.rst:1662 +#: ../../library/sys.rst:1663 msgid "See also :func:`excepthook` which handles uncaught exceptions." msgstr "" -#: ../../library/sys.rst:1664 +#: ../../library/sys.rst:1665 msgid "" "Raises an :ref:`auditing event ` ``sys.unraisablehook`` with " "arguments ``hook``, ``unraisable``." msgstr "" -#: ../../library/sys.rst:1666 +#: ../../library/sys.rst:1667 msgid "" "Raise an auditing event ``sys.unraisablehook`` with arguments ``hook``, " "``unraisable`` when an exception that cannot be handled occurs. The " @@ -2363,7 +2364,7 @@ msgid "" "hook has been set, ``hook`` may be ``None``." msgstr "" -#: ../../library/sys.rst:1675 +#: ../../library/sys.rst:1676 msgid "" "A string containing the version number of the Python interpreter plus " "additional information on the build number and compiler used. This string " @@ -2372,13 +2373,13 @@ msgid "" "functions provided by the :mod:`platform` module." msgstr "" -#: ../../library/sys.rst:1684 +#: ../../library/sys.rst:1685 msgid "" "The C API version for this interpreter. Programmers may find this useful " "when debugging version conflicts between Python and extension modules." msgstr "" -#: ../../library/sys.rst:1690 +#: ../../library/sys.rst:1691 msgid "" "A tuple containing the five components of the version number: *major*, " "*minor*, *micro*, *releaselevel*, and *serial*. All values except " @@ -2389,18 +2390,18 @@ msgid "" "version_info.major`` and so on." msgstr "" -#: ../../library/sys.rst:1698 +#: ../../library/sys.rst:1699 msgid "Added named component attributes." msgstr "" -#: ../../library/sys.rst:1703 +#: ../../library/sys.rst:1704 msgid "" "This is an implementation detail of the warnings framework; do not modify " "this value. Refer to the :mod:`warnings` module for more information on the " "warnings framework." msgstr "" -#: ../../library/sys.rst:1710 +#: ../../library/sys.rst:1711 msgid "" "The version number used to form registry keys on Windows platforms. This is " "stored as string resource 1000 in the Python DLL. The value is normally the " @@ -2409,25 +2410,25 @@ msgid "" "on the registry keys used by Python." msgstr "" -#: ../../library/sys.rst:1721 +#: ../../library/sys.rst:1722 msgid "" "A dictionary of the various implementation-specific flags passed through " "the :option:`-X` command-line option. Option names are either mapped to " "their values, if given explicitly, or to :const:`True`. Example:" msgstr "" -#: ../../library/sys.rst:1737 +#: ../../library/sys.rst:1738 msgid "" "This is a CPython-specific way of accessing options passed through :option:`-" "X`. Other implementations may export them through other means, or not at " "all." msgstr "" -#: ../../library/sys.rst:1745 +#: ../../library/sys.rst:1746 msgid "Citations" msgstr "" -#: ../../library/sys.rst:1746 +#: ../../library/sys.rst:1747 msgid "" "ISO/IEC 9899:1999. \"Programming languages -- C.\" A public draft of this " "standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/" diff --git a/library/unittest.mock.po b/library/unittest.mock.po index 23abcbdef3..155aaa1f7a 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:14+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1507,8 +1507,9 @@ msgid "" "Both patch_ and patch.object_ correctly patch and restore descriptors: class " "methods, static methods and properties. You should patch these on the " "*class* rather than an instance. They also work with *some* objects that " -"proxy attribute access, like the `django settings object `_." +"proxy attribute access, like the `django settings object `_." msgstr "" #: ../../library/unittest.mock.rst:1951 @@ -1574,7 +1575,8 @@ msgstr "``__dir__``\\ 、\\ ``__format__`` 和 ``__subclasses__``" #: ../../library/unittest.mock.rst:2014 msgid "``__round__``, ``__floor__``, ``__trunc__`` and ``__ceil__``" -msgstr "``__round__``\\ 、\\ ``__floor__``\\ 、\\ ``__trunc__`` 和 ``__ceil__``" +msgstr "" +"``__round__``\\ 、\\ ``__floor__``\\ 、\\ ``__trunc__`` 和 ``__ceil__``" #: ../../library/unittest.mock.rst:2015 msgid "" @@ -1650,7 +1652,8 @@ msgstr "" #: ../../library/unittest.mock.rst:2044 msgid "``__getattr__``, ``__setattr__``, ``__init__`` and ``__new__``" -msgstr "``__getattr__``\\ 、\\ ``__setattr__``\\ 、\\ ``__init__`` 和 ``__new__``" +msgstr "" +"``__getattr__``\\ 、\\ ``__setattr__``\\ 、\\ ``__init__`` 和 ``__new__``" #: ../../library/unittest.mock.rst:2045 msgid "" diff --git a/library/venv.po b/library/venv.po index b76f8824f1..52d4bf32ed 100644 --- a/library/venv.po +++ b/library/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -75,7 +75,7 @@ msgstr "" msgid "" "``pyvenv`` was the recommended tool for creating virtual environments for " "Python 3.3 and 3.4, and is `deprecated in Python 3.6 `_." +"org/dev/whatsnew/3.6.html#id8>`_." msgstr "" #: ../../using/venv-create.inc:22 diff --git a/license.po b/license.po index 2dc0be3bc7..c9c82df708 100644 --- a/license.po +++ b/license.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-19 07:44+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2021-07-04 01:18+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -429,12 +429,14 @@ msgid "strtod and dtoa" msgstr "strtod 與 dtoa" #: ../../license.rst:626 +#, fuzzy msgid "" "The file :file:`Python/dtoa.c`, which supplies C functions dtoa and strtod " "for conversion of C doubles to and from strings, is derived from the file of " -"the same name by David M. Gay, currently available from http://www.netlib." -"org/fp/. The original file, as retrieved on March 16, 2009, contains the " -"following copyright and licensing notice::" +"the same name by David M. Gay, currently available from https://web.archive." +"org/web/20220517033456/http://www.netlib.org/fp/dtoa.c. The original file, " +"as retrieved on March 16, 2009, contains the following copyright and " +"licensing notice::" msgstr "" ":file:`Python/dtoa.c` 檔案提供了 C 的 dtoa 和 strtod 函式,用於將 C 的雙精度" "浮點數和字串互相轉換。該檔案是衍生自 David M. Gay 建立的同名檔案,後者現在可" diff --git a/reference/expressions.po b/reference/expressions.po index 07655223ff..ae3cb478d8 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -629,7 +629,7 @@ msgstr "" #: ../../reference/expressions.rst:571 msgid "" -"For backwards compatability, however, the second signature is supported, " +"For backwards compatibility, however, the second signature is supported, " "following a convention from older versions of Python. The *type* argument " "should be an exception class, and *value* should be an exception instance. " "If the *value* is not provided, the *type* constructor is called to get an " diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index 8139a258df..2c46774af2 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-09 00:12+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2021-06-01 22:43+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -290,33 +290,35 @@ msgid "" "A :keyword:`match` statement takes an expression and compares its value to " "successive patterns given as one or more case blocks. This is superficially " "similar to a switch statement in C, Java or JavaScript (and many other " -"languages), but it can also extract components (sequence elements or object " -"attributes) from the value into variables." +"languages), but it's more similar to pattern matching in languages like Rust " +"or Haskell. Only the first pattern that matches gets executed and it can " +"also extract components (sequence elements or object attributes) from the " +"value into variables." msgstr "" -#: ../../tutorial/controlflow.rst:259 +#: ../../tutorial/controlflow.rst:261 msgid "" "The simplest form compares a subject value against one or more literals::" msgstr "" -#: ../../tutorial/controlflow.rst:272 +#: ../../tutorial/controlflow.rst:274 msgid "" "Note the last block: the \"variable name\" ``_`` acts as a *wildcard* and " "never fails to match. If no case matches, none of the branches is executed." msgstr "" -#: ../../tutorial/controlflow.rst:275 +#: ../../tutorial/controlflow.rst:277 msgid "" "You can combine several literals in a single pattern using ``|`` (\"or\")::" msgstr "" -#: ../../tutorial/controlflow.rst:280 +#: ../../tutorial/controlflow.rst:282 msgid "" "Patterns can look like unpacking assignments, and can be used to bind " "variables::" msgstr "" -#: ../../tutorial/controlflow.rst:296 +#: ../../tutorial/controlflow.rst:298 msgid "" "Study that one carefully! The first pattern has two literals, and can be " "thought of as an extension of the literal pattern shown above. But the next " @@ -326,14 +328,14 @@ msgid "" "point``." msgstr "" -#: ../../tutorial/controlflow.rst:303 +#: ../../tutorial/controlflow.rst:305 msgid "" "If you are using classes to structure your data you can use the class name " "followed by an argument list resembling a constructor, but with the ability " "to capture attributes into variables::" msgstr "" -#: ../../tutorial/controlflow.rst:324 +#: ../../tutorial/controlflow.rst:326 msgid "" "You can use positional parameters with some builtin classes that provide an " "ordering for their attributes (e.g. dataclasses). You can also define a " @@ -343,7 +345,7 @@ msgid "" "attribute to the ``var`` variable)::" msgstr "" -#: ../../tutorial/controlflow.rst:335 +#: ../../tutorial/controlflow.rst:337 msgid "" "A recommended way to read patterns is to look at them as an extended form of " "what you would put on the left of an assignment, to understand which " @@ -354,31 +356,31 @@ msgid "" "assigned to." msgstr "" -#: ../../tutorial/controlflow.rst:342 +#: ../../tutorial/controlflow.rst:344 msgid "" "Patterns can be arbitrarily nested. For example, if we have a short list of " "points, we could match it like this::" msgstr "" -#: ../../tutorial/controlflow.rst:357 +#: ../../tutorial/controlflow.rst:359 msgid "" "We can add an ``if`` clause to a pattern, known as a \"guard\". If the " "guard is false, ``match`` goes on to try the next case block. Note that " "value capture happens before the guard is evaluated::" msgstr "" -#: ../../tutorial/controlflow.rst:367 +#: ../../tutorial/controlflow.rst:369 msgid "Several other key features of this statement:" msgstr "" -#: ../../tutorial/controlflow.rst:369 +#: ../../tutorial/controlflow.rst:371 msgid "" "Like unpacking assignments, tuple and list patterns have exactly the same " "meaning and actually match arbitrary sequences. An important exception is " "that they don't match iterators or strings." msgstr "" -#: ../../tutorial/controlflow.rst:373 +#: ../../tutorial/controlflow.rst:375 msgid "" "Sequence patterns support extended unpacking: ``[x, y, *rest]`` and ``(x, y, " "*rest)`` work similar to unpacking assignments. The name after ``*`` may " @@ -386,7 +388,7 @@ msgid "" "without binding the remaining items." msgstr "" -#: ../../tutorial/controlflow.rst:378 +#: ../../tutorial/controlflow.rst:380 msgid "" "Mapping patterns: ``{\"bandwidth\": b, \"latency\": l}`` captures the ``" "\"bandwidth\"`` and ``\"latency\"`` values from a dictionary. Unlike " @@ -394,39 +396,39 @@ msgid "" "also supported. (But ``**_`` would be redundant, so it is not allowed.)" msgstr "" -#: ../../tutorial/controlflow.rst:383 +#: ../../tutorial/controlflow.rst:385 msgid "Subpatterns may be captured using the ``as`` keyword::" msgstr "" -#: ../../tutorial/controlflow.rst:387 +#: ../../tutorial/controlflow.rst:389 msgid "" "will capture the second element of the input as ``p2`` (as long as the input " "is a sequence of two points)" msgstr "" -#: ../../tutorial/controlflow.rst:390 +#: ../../tutorial/controlflow.rst:392 msgid "" "Most literals are compared by equality, however the singletons ``True``, " "``False`` and ``None`` are compared by identity." msgstr "" -#: ../../tutorial/controlflow.rst:393 +#: ../../tutorial/controlflow.rst:395 msgid "" "Patterns may use named constants. These must be dotted names to prevent " "them from being interpreted as capture variable::" msgstr "" -#: ../../tutorial/controlflow.rst:412 +#: ../../tutorial/controlflow.rst:414 msgid "" "For a more detailed explanation and additional examples, you can look into :" "pep:`636` which is written in a tutorial format." msgstr "" -#: ../../tutorial/controlflow.rst:418 +#: ../../tutorial/controlflow.rst:420 msgid "Defining Functions" msgstr "定義函式 (function)" -#: ../../tutorial/controlflow.rst:420 +#: ../../tutorial/controlflow.rst:422 msgid "" "We can create a function that writes the Fibonacci series to an arbitrary " "boundary::" @@ -435,7 +437,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:440 +#: ../../tutorial/controlflow.rst:442 msgid "" "The keyword :keyword:`def` introduces a function *definition*. It must be " "followed by the function name and the parenthesized list of formal " @@ -445,7 +447,7 @@ msgstr "" "關鍵字 :keyword:`def` 介紹一個函式的\\ *定義*\\ 。它之後必須連著該函式的名稱" "和置於括號之中的一串參數。自下一行起,所有縮排的陳述式成為該函式的主體。" -#: ../../tutorial/controlflow.rst:445 +#: ../../tutorial/controlflow.rst:447 msgid "" "The first statement of the function body can optionally be a string literal; " "this string literal is the function's documentation string, or :dfn:" @@ -461,7 +463,7 @@ msgstr "" "件,或讓使用者能以互動的方式在原始碼中瀏覽文件。在原始碼中加入 docstring 是個" "好慣例,應該養成這樣的習慣。" -#: ../../tutorial/controlflow.rst:452 +#: ../../tutorial/controlflow.rst:454 msgid "" "The *execution* of a function introduces a new symbol table used for the " "local variables of the function. More precisely, all variable assignments " @@ -482,7 +484,7 @@ msgstr "" "域變數是在 :keyword:`global` 陳述式中被定義,或外層函式變數在 :keyword:" "`nonlocal` 陳述式中被定義)。" -#: ../../tutorial/controlflow.rst:463 +#: ../../tutorial/controlflow.rst:465 msgid "" "The actual parameters (arguments) to a function call are introduced in the " "local symbol table of the called function when it is called; thus, arguments " @@ -497,7 +499,7 @@ msgstr "" "函式呼叫別的函式或遞迴呼叫它自己時,在被呼叫的函式中會建立一個新的區域符號" "表。" -#: ../../tutorial/controlflow.rst:470 +#: ../../tutorial/controlflow.rst:472 msgid "" "A function definition associates the function name with the function object " "in the current symbol table. The interpreter recognizes the object pointed " @@ -510,7 +512,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:481 +#: ../../tutorial/controlflow.rst:483 msgid "" "Coming from other languages, you might object that ``fib`` is not a function " "but a procedure since it doesn't return a value. In fact, even functions " @@ -527,7 +529,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:492 +#: ../../tutorial/controlflow.rst:494 msgid "" "It is simple to write a function that returns a list of the numbers of the " "Fibonacci series, instead of printing it::" @@ -536,11 +538,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:508 +#: ../../tutorial/controlflow.rst:510 msgid "This example, as usual, demonstrates some new Python features:" msgstr "這個例子一樣示範了一些新的 Python 特性:" -#: ../../tutorial/controlflow.rst:510 +#: ../../tutorial/controlflow.rst:512 msgid "" "The :keyword:`return` statement returns with a value from a function. :" "keyword:`!return` without an expression argument returns ``None``. Falling " @@ -550,7 +552,7 @@ msgstr "" "不外加一個運算式作為引數時會回傳 ``None``\\ 。一個函式執行到結束也會回傳 " "``None``\\ 。" -#: ../../tutorial/controlflow.rst:514 +#: ../../tutorial/controlflow.rst:516 msgid "" "The statement ``result.append(a)`` calls a *method* of the list object " "``result``. A method is a function that 'belongs' to an object and is named " @@ -572,22 +574,22 @@ msgstr "" "method 定義在 list 物件中;它會在該 list 的末端加入一個新的元素。這個例子等同" "於 ``result = result + [a]``\\ ,但更有效率。" -#: ../../tutorial/controlflow.rst:529 +#: ../../tutorial/controlflow.rst:531 msgid "More on Defining Functions" msgstr "深入了解函式定義" -#: ../../tutorial/controlflow.rst:531 +#: ../../tutorial/controlflow.rst:533 msgid "" "It is also possible to define functions with a variable number of arguments. " "There are three forms, which can be combined." msgstr "" "定義函式時使用的引數 (argument) 數量是可變的。總共有三種可以組合使用的形式。" -#: ../../tutorial/controlflow.rst:538 +#: ../../tutorial/controlflow.rst:540 msgid "Default Argument Values" msgstr "預設引數值" -#: ../../tutorial/controlflow.rst:540 +#: ../../tutorial/controlflow.rst:542 msgid "" "The most useful form is to specify a default value for one or more " "arguments. This creates a function that can be called with fewer arguments " @@ -598,22 +600,22 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:556 +#: ../../tutorial/controlflow.rst:558 msgid "This function can be called in several ways:" msgstr "該函式可以用以下幾種方式被呼叫:" -#: ../../tutorial/controlflow.rst:558 +#: ../../tutorial/controlflow.rst:560 msgid "" "giving only the mandatory argument: ``ask_ok('Do you really want to quit?')``" msgstr "只給必要引數:\\ ``ask_ok('Do you really want to quit?')``" -#: ../../tutorial/controlflow.rst:560 +#: ../../tutorial/controlflow.rst:562 msgid "" "giving one of the optional arguments: ``ask_ok('OK to overwrite the file?', " "2)``" msgstr "給予一個選擇性引數:\\ ``ask_ok('OK to overwrite the file?', 2)``" -#: ../../tutorial/controlflow.rst:562 +#: ../../tutorial/controlflow.rst:564 msgid "" "or even giving all arguments: ``ask_ok('OK to overwrite the file?', 2, 'Come " "on, only yes or no!')``" @@ -621,14 +623,14 @@ msgstr "" "給予所有引數:\\ ``ask_ok('OK to overwrite the file?', 2, 'Come on, only yes " "or no!')``" -#: ../../tutorial/controlflow.rst:565 +#: ../../tutorial/controlflow.rst:567 msgid "" "This example also introduces the :keyword:`in` keyword. This tests whether " "or not a sequence contains a certain value." msgstr "" "此例也使用了關鍵字 :keyword:`in`\\ ,用於測試序列中是否包含某個特定值。" -#: ../../tutorial/controlflow.rst:568 +#: ../../tutorial/controlflow.rst:570 msgid "" "The default values are evaluated at the point of function definition in the " "*defining* scope, so that ::" @@ -637,11 +639,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:579 +#: ../../tutorial/controlflow.rst:581 msgid "will print ``5``." msgstr "將會輸出 ``5``\\ 。" -#: ../../tutorial/controlflow.rst:581 +#: ../../tutorial/controlflow.rst:583 msgid "" "**Important warning:** The default value is evaluated only once. This makes " "a difference when the default is a mutable object such as a list, " @@ -654,24 +656,24 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:594 +#: ../../tutorial/controlflow.rst:596 msgid "This will print ::" msgstr "" "將會輸出:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:600 +#: ../../tutorial/controlflow.rst:602 msgid "" "If you don't want the default to be shared between subsequent calls, you can " "write the function like this instead::" msgstr "如果不想在後續呼叫之間共用預設值,應以如下方式編寫函式:" -#: ../../tutorial/controlflow.rst:613 +#: ../../tutorial/controlflow.rst:615 msgid "Keyword Arguments" msgstr "關鍵字引數" -#: ../../tutorial/controlflow.rst:615 +#: ../../tutorial/controlflow.rst:617 msgid "" "Functions can also be called using :term:`keyword arguments ` of the form ``kwarg=value``. For instance, the following " @@ -682,7 +684,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:624 +#: ../../tutorial/controlflow.rst:626 msgid "" "accepts one required argument (``voltage``) and three optional arguments " "(``state``, ``action``, and ``type``). This function can be called in any " @@ -693,14 +695,14 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:635 +#: ../../tutorial/controlflow.rst:637 msgid "but all the following calls would be invalid::" msgstr "" "但以下呼叫方式都無效:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:642 +#: ../../tutorial/controlflow.rst:644 msgid "" "In a function call, keyword arguments must follow positional arguments. All " "the keyword arguments passed must match one of the arguments accepted by the " @@ -718,7 +720,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:658 +#: ../../tutorial/controlflow.rst:660 msgid "" "When a final formal parameter of the form ``**name`` is present, it receives " "a dictionary (see :ref:`typesmapping`) containing all keyword arguments " @@ -736,31 +738,31 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:675 +#: ../../tutorial/controlflow.rst:677 msgid "It could be called like this::" msgstr "" "它可以被如此呼叫:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:683 +#: ../../tutorial/controlflow.rst:685 msgid "and of course it would print:" msgstr "" "輸出結果如下:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:696 +#: ../../tutorial/controlflow.rst:698 msgid "" "Note that the order in which the keyword arguments are printed is guaranteed " "to match the order in which they were provided in the function call." msgstr "注意,關鍵字引數的輸出順序與呼叫函式時被提供的順序必定一致。" -#: ../../tutorial/controlflow.rst:700 +#: ../../tutorial/controlflow.rst:702 msgid "Special parameters" msgstr "特殊參數" -#: ../../tutorial/controlflow.rst:702 +#: ../../tutorial/controlflow.rst:704 msgid "" "By default, arguments may be passed to a Python function either by position " "or explicitly by keyword. For readability and performance, it makes sense to " @@ -772,11 +774,11 @@ msgstr "" "及效能,限制引數的傳遞方式是合理的,如此,開發者只需查看函式定義,即可確定各" "項目是按位置,按位置或關鍵字,還是按關鍵字傳遞。" -#: ../../tutorial/controlflow.rst:708 +#: ../../tutorial/controlflow.rst:710 msgid "A function definition may look like:" msgstr "函式定義可能如以下樣式:" -#: ../../tutorial/controlflow.rst:719 +#: ../../tutorial/controlflow.rst:721 msgid "" "where ``/`` and ``*`` are optional. If used, these symbols indicate the kind " "of parameter by how the arguments may be passed to the function: positional-" @@ -787,22 +789,22 @@ msgstr "" "類:僅限位置、位置或關鍵字、僅限關鍵字。關鍵字參數也稱為附名參數 (named " "parameters)。" -#: ../../tutorial/controlflow.rst:726 +#: ../../tutorial/controlflow.rst:728 msgid "Positional-or-Keyword Arguments" msgstr "位置或關鍵字引數 (Positional-or-Keyword Arguments)" -#: ../../tutorial/controlflow.rst:728 +#: ../../tutorial/controlflow.rst:730 msgid "" "If ``/`` and ``*`` are not present in the function definition, arguments may " "be passed to a function by position or by keyword." msgstr "" "若函式定義中未使用 ``/`` 和 ``*`` 時,引數可以按位置或關鍵字傳遞給函式。" -#: ../../tutorial/controlflow.rst:733 +#: ../../tutorial/controlflow.rst:735 msgid "Positional-Only Parameters" msgstr "僅限位置參數 (Positional-Only Parameters)" -#: ../../tutorial/controlflow.rst:735 +#: ../../tutorial/controlflow.rst:737 msgid "" "Looking at this in a bit more detail, it is possible to mark certain " "parameters as *positional-only*. If *positional-only*, the parameters' order " @@ -817,17 +819,17 @@ msgstr "" "``\\ (斜線)之前。\\ ``/`` 用於在邏輯上分開僅限位置參數與其餘參數。如果函式" "定義中沒有 ``/``\\ ,則表示沒有任何僅限位置參數。" -#: ../../tutorial/controlflow.rst:743 +#: ../../tutorial/controlflow.rst:745 msgid "" "Parameters following the ``/`` may be *positional-or-keyword* or *keyword-" "only*." msgstr "``/`` 後面的參數可以是\\ *位置或關鍵字*\\ 或\\ *僅限關鍵字*\\ 參數。" -#: ../../tutorial/controlflow.rst:747 +#: ../../tutorial/controlflow.rst:749 msgid "Keyword-Only Arguments" msgstr "僅限關鍵字引數 (Keyword-Only Arguments)" -#: ../../tutorial/controlflow.rst:749 +#: ../../tutorial/controlflow.rst:751 msgid "" "To mark parameters as *keyword-only*, indicating the parameters must be " "passed by keyword argument, place an ``*`` in the arguments list just before " @@ -836,11 +838,11 @@ msgstr "" "要把參數標記為\\ *僅限關鍵字*\\ ,表明參數必須以關鍵字引數傳遞,必須在引數列" "表中第一個\\ *僅限關鍵字*\\ 參數前放上 ``*``\\ 。" -#: ../../tutorial/controlflow.rst:755 +#: ../../tutorial/controlflow.rst:757 msgid "Function Examples" msgstr "函式範例" -#: ../../tutorial/controlflow.rst:757 +#: ../../tutorial/controlflow.rst:759 msgid "" "Consider the following example function definitions paying close attention " "to the markers ``/`` and ``*``::" @@ -849,7 +851,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:773 +#: ../../tutorial/controlflow.rst:775 msgid "" "The first function definition, ``standard_arg``, the most familiar form, " "places no restrictions on the calling convention and arguments may be passed " @@ -860,7 +862,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:783 +#: ../../tutorial/controlflow.rst:785 msgid "" "The second function ``pos_only_arg`` is restricted to only use positional " "parameters as there is a ``/`` in the function definition::" @@ -869,7 +871,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:794 +#: ../../tutorial/controlflow.rst:796 msgid "" "The third function ``kwd_only_args`` only allows keyword arguments as " "indicated by a ``*`` in the function definition::" @@ -878,7 +880,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:805 +#: ../../tutorial/controlflow.rst:807 msgid "" "And the last uses all three calling conventions in the same function " "definition::" @@ -887,7 +889,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:825 +#: ../../tutorial/controlflow.rst:827 msgid "" "Finally, consider this function definition which has a potential collision " "between the positional argument ``name`` and ``**kwds`` which has ``name`` " @@ -898,7 +900,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:830 +#: ../../tutorial/controlflow.rst:832 msgid "" "There is no possible call that will make it return ``True`` as the keyword " "``'name'`` will always bind to the first parameter. For example::" @@ -908,7 +910,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:839 +#: ../../tutorial/controlflow.rst:841 msgid "" "But using ``/`` (positional only arguments), it is possible since it allows " "``name`` as a positional argument and ``'name'`` as a key in the keyword " @@ -919,17 +921,17 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:846 +#: ../../tutorial/controlflow.rst:848 msgid "" "In other words, the names of positional-only parameters can be used in " "``**kwds`` without ambiguity." msgstr "換句話說,僅限位置參數的名稱可以在 ``**kwds`` 中使用,而不產生歧義。" -#: ../../tutorial/controlflow.rst:851 +#: ../../tutorial/controlflow.rst:853 msgid "Recap" msgstr "回顧" -#: ../../tutorial/controlflow.rst:853 +#: ../../tutorial/controlflow.rst:855 msgid "" "The use case will determine which parameters to use in the function " "definition::" @@ -938,11 +940,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:857 +#: ../../tutorial/controlflow.rst:859 msgid "As guidance:" msgstr "說明:" -#: ../../tutorial/controlflow.rst:859 +#: ../../tutorial/controlflow.rst:861 msgid "" "Use positional-only if you want the name of the parameters to not be " "available to the user. This is useful when parameter names have no real " @@ -954,7 +956,7 @@ msgstr "" "想控制引數在函式呼叫的排列順序,或同時使用位置參數和任意關鍵字時,這種方式很" "有用。" -#: ../../tutorial/controlflow.rst:864 +#: ../../tutorial/controlflow.rst:866 msgid "" "Use keyword-only when names have meaning and the function definition is more " "understandable by being explicit with names or you want to prevent users " @@ -963,7 +965,7 @@ msgstr "" "當參數名稱有意義,且明確的名稱可讓函式定義更易理解,或是你不希望使用者依賴引" "數被傳遞時的位置時,請使用僅限關鍵字。" -#: ../../tutorial/controlflow.rst:867 +#: ../../tutorial/controlflow.rst:869 msgid "" "For an API, use positional-only to prevent breaking API changes if the " "parameter's name is modified in the future." @@ -971,11 +973,11 @@ msgstr "" "對於應用程式介面 (API),使用僅限位置,以防止未來參數名稱被修改時造成 API 的中" "斷性變更。" -#: ../../tutorial/controlflow.rst:873 +#: ../../tutorial/controlflow.rst:875 msgid "Arbitrary Argument Lists" msgstr "任意引數列表 (Arbitrary Argument Lists)" -#: ../../tutorial/controlflow.rst:878 +#: ../../tutorial/controlflow.rst:880 msgid "" "Finally, the least frequently used option is to specify that a function can " "be called with an arbitrary number of arguments. These arguments will be " @@ -988,7 +990,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:887 +#: ../../tutorial/controlflow.rst:889 msgid "" "Normally, these *variadic* arguments will be last in the list of formal " "parameters, because they scoop up all remaining input arguments that are " @@ -996,18 +998,17 @@ msgid "" "``*args`` parameter are 'keyword-only' arguments, meaning that they can only " "be used as keywords rather than positional arguments. ::" msgstr "" -"通常,這些 *variadic*\\ (可變的)引數會出現在參數列表的最末端,這樣它們就" -"可以把所有傳遞給函式的剩餘輸入引數都撈起來。出現在 ``*args`` 參數後面的任何參" -"數必須是「僅限關鍵字」引數,意即它們只能作為關鍵字引數,而不能用作位置引" -"數。\n" +"通常,這些 *variadic*\\ (可變的)引數會出現在參數列表的最末端,這樣它們就可" +"以把所有傳遞給函式的剩餘輸入引數都撈起來。出現在 ``*args`` 參數後面的任何參數" +"必須是「僅限關鍵字」引數,意即它們只能作為關鍵字引數,而不能用作位置引數。\n" "\n" "::" -#: ../../tutorial/controlflow.rst:904 +#: ../../tutorial/controlflow.rst:906 msgid "Unpacking Argument Lists" msgstr "拆解引數列表(Unpacking Argument Lists)" -#: ../../tutorial/controlflow.rst:906 +#: ../../tutorial/controlflow.rst:908 msgid "" "The reverse situation occurs when the arguments are already in a list or " "tuple but need to be unpacked for a function call requiring separate " @@ -1023,7 +1024,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:922 +#: ../../tutorial/controlflow.rst:924 msgid "" "In the same fashion, dictionaries can deliver keyword arguments with the " "``**``\\ -operator::" @@ -1032,11 +1033,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:938 +#: ../../tutorial/controlflow.rst:940 msgid "Lambda Expressions" msgstr "Lambda 運算式" -#: ../../tutorial/controlflow.rst:940 +#: ../../tutorial/controlflow.rst:942 msgid "" "Small anonymous functions can be created with the :keyword:`lambda` keyword. " "This function returns the sum of its two arguments: ``lambda a, b: a+b``. " @@ -1053,7 +1054,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:957 +#: ../../tutorial/controlflow.rst:959 msgid "" "The above example uses a lambda expression to return a function. Another " "use is to pass a small function as an argument::" @@ -1063,17 +1064,17 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:969 +#: ../../tutorial/controlflow.rst:971 msgid "Documentation Strings" msgstr "說明文件字串 (Documentation Strings)" -#: ../../tutorial/controlflow.rst:976 +#: ../../tutorial/controlflow.rst:978 msgid "" "Here are some conventions about the content and formatting of documentation " "strings." msgstr "以下是關於說明文件字串內容和格式的慣例。" -#: ../../tutorial/controlflow.rst:979 +#: ../../tutorial/controlflow.rst:981 msgid "" "The first line should always be a short, concise summary of the object's " "purpose. For brevity, it should not explicitly state the object's name or " @@ -1085,7 +1086,7 @@ msgstr "" "的名稱或型別,因為有其他方法可以達到相同目的(除非該名稱剛好是一個描述函式運" "算的動詞)。這一行應以大寫字母開頭,以句號結尾。" -#: ../../tutorial/controlflow.rst:985 +#: ../../tutorial/controlflow.rst:987 msgid "" "If there are more lines in the documentation string, the second line should " "be blank, visually separating the summary from the rest of the description. " @@ -1095,7 +1096,7 @@ msgstr "" "文件字串為多行時,第二行應為空白行,在視覺上將摘要與其餘描述分開。後面幾行可" "包含一或多個段落,描述此物件的呼叫慣例、副作用等。" -#: ../../tutorial/controlflow.rst:990 +#: ../../tutorial/controlflow.rst:992 msgid "" "The Python parser does not strip indentation from multi-line string literals " "in Python, so tools that process documentation have to strip indentation if " @@ -1117,18 +1118,18 @@ msgstr "" "出現了,這些行的全部前導空白字元都應被去除。展開 tab 鍵後(通常為八個空格)," "應測試空白字元量是否等價。" -#: ../../tutorial/controlflow.rst:1002 +#: ../../tutorial/controlflow.rst:1004 msgid "Here is an example of a multi-line docstring::" msgstr "" "下面是多行說明字串的一個範例:\n" "\n" "::" -#: ../../tutorial/controlflow.rst:1020 +#: ../../tutorial/controlflow.rst:1022 msgid "Function Annotations" msgstr "函式註釋 (Function Annotations)" -#: ../../tutorial/controlflow.rst:1028 +#: ../../tutorial/controlflow.rst:1030 msgid "" ":ref:`Function annotations ` are completely optional metadata " "information about the types used by user-defined functions (see :pep:`3107` " @@ -1137,7 +1138,7 @@ msgstr "" ":ref:`函式註釋 `\\ 是選擇性的元資料(metadata)資訊,描述使用者定義" "函式所使用的型別(更多資訊詳見 :pep:`3107` 和 :pep:`484`\\ )。" -#: ../../tutorial/controlflow.rst:1032 +#: ../../tutorial/controlflow.rst:1034 msgid "" ":term:`Annotations ` are stored in the :attr:" "`__annotations__` attribute of the function as a dictionary and have no " @@ -1157,11 +1158,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/controlflow.rst:1054 +#: ../../tutorial/controlflow.rst:1056 msgid "Intermezzo: Coding Style" msgstr "間奏曲:程式碼風格 (Coding Style)" -#: ../../tutorial/controlflow.rst:1059 +#: ../../tutorial/controlflow.rst:1061 msgid "" "Now that you are about to write longer, more complex pieces of Python, it is " "a good time to talk about *coding style*. Most languages can be written (or " @@ -1174,7 +1175,7 @@ msgstr "" "式比其他的更具可讀性。能讓其他人輕鬆閱讀你的程式碼永遠是一個好主意,而使用優" "良的編碼樣式對此有極大的幫助。" -#: ../../tutorial/controlflow.rst:1065 +#: ../../tutorial/controlflow.rst:1067 msgid "" "For Python, :pep:`8` has emerged as the style guide that most projects " "adhere to; it promotes a very readable and eye-pleasing coding style. Every " @@ -1184,11 +1185,11 @@ msgstr "" "對於 Python,大多數的專案都遵循 :pep:`8` 的樣式指南;它推行的編碼樣式相當可讀" "且賞心悅目。每個 Python 開發者都應該花點時間研讀;這裡是該指南的核心重點:" -#: ../../tutorial/controlflow.rst:1070 +#: ../../tutorial/controlflow.rst:1072 msgid "Use 4-space indentation, and no tabs." msgstr "用 4 個空格縮排,不要用 tab 鍵。" -#: ../../tutorial/controlflow.rst:1072 +#: ../../tutorial/controlflow.rst:1074 msgid "" "4 spaces are a good compromise between small indentation (allows greater " "nesting depth) and large indentation (easier to read). Tabs introduce " @@ -1197,11 +1198,11 @@ msgstr "" "4 個空格是小縮排(容許更大的巢套深度)和大縮排(較易閱讀)之間的折衷方案。" "Tab 鍵會造成混亂,最好別用。" -#: ../../tutorial/controlflow.rst:1076 +#: ../../tutorial/controlflow.rst:1078 msgid "Wrap lines so that they don't exceed 79 characters." msgstr "換行,使一行不超過 79 個字元。" -#: ../../tutorial/controlflow.rst:1078 +#: ../../tutorial/controlflow.rst:1080 msgid "" "This helps users with small displays and makes it possible to have several " "code files side-by-side on larger displays." @@ -1209,21 +1210,21 @@ msgstr "" "換行能讓使用小顯示器的使用者方便閱讀,也可以在較大顯示器上並排陳列多個程式碼" "檔案。" -#: ../../tutorial/controlflow.rst:1081 +#: ../../tutorial/controlflow.rst:1083 msgid "" "Use blank lines to separate functions and classes, and larger blocks of code " "inside functions." msgstr "用空行分隔函式和 class(類別),及函式內較大塊的程式碼。" -#: ../../tutorial/controlflow.rst:1084 +#: ../../tutorial/controlflow.rst:1086 msgid "When possible, put comments on a line of their own." msgstr "如果可以,把註解放在單獨一行。" -#: ../../tutorial/controlflow.rst:1086 +#: ../../tutorial/controlflow.rst:1088 msgid "Use docstrings." msgstr "使用說明字串。" -#: ../../tutorial/controlflow.rst:1088 +#: ../../tutorial/controlflow.rst:1090 msgid "" "Use spaces around operators and after commas, but not directly inside " "bracketing constructs: ``a = f(1, 2) + g(3, 4)``." @@ -1231,7 +1232,7 @@ msgstr "" "運算子前後、逗號後要加空格,但不要直接放在括號內側:\\ ``a = f(1, 2) + g(3, " "4)``\\ 。" -#: ../../tutorial/controlflow.rst:1091 +#: ../../tutorial/controlflow.rst:1093 msgid "" "Name your classes and functions consistently; the convention is to use " "``UpperCamelCase`` for classes and ``lowercase_with_underscores`` for " @@ -1243,7 +1244,7 @@ msgstr "" "底線)。永遠用 ``self`` 作為 method 第一個引數的名稱(關於 class 和 method," "詳見 :ref:`tut-firstclasses`\\ )。" -#: ../../tutorial/controlflow.rst:1096 +#: ../../tutorial/controlflow.rst:1098 msgid "" "Don't use fancy encodings if your code is meant to be used in international " "environments. Python's default, UTF-8, or even plain ASCII work best in any " @@ -1252,7 +1253,7 @@ msgstr "" "若程式碼是為了用於國際環境時,不要用花俏的編碼。Python 預設的 UTF-8 或甚至普" "通的 ASCII,就可以勝任各種情況。" -#: ../../tutorial/controlflow.rst:1100 +#: ../../tutorial/controlflow.rst:1102 msgid "" "Likewise, don't use non-ASCII characters in identifiers if there is only the " "slightest chance people speaking a different language will read or maintain " @@ -1261,11 +1262,11 @@ msgstr "" "同樣地,若不同語言使用者閱讀或維護程式碼的可能性微乎其微,就不要在命名時使用" "非 ASCII 字元。" -#: ../../tutorial/controlflow.rst:1106 +#: ../../tutorial/controlflow.rst:1108 msgid "Footnotes" msgstr "註解" -#: ../../tutorial/controlflow.rst:1107 +#: ../../tutorial/controlflow.rst:1109 msgid "" "Actually, *call by object reference* would be a better description, since if " "a mutable object is passed, the caller will see any changes the callee makes " diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index a3f48b2b2b..92c9233ac3 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2022-06-07 17:05+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -246,9 +246,10 @@ msgstr "" "::" #: ../../tutorial/inputoutput.rst:182 +#, fuzzy msgid "" -"This could also be done by passing the table as keyword arguments with the " -"'**' notation. ::" +"This could also be done by passing the ``table`` dictionary as keyword " +"arguments with the ``**`` notation. ::" msgstr "" "用 '**' 符號,把 table 當作關鍵字引數來傳遞,也有一樣的結果。\n" "\n" diff --git a/using/unix.po b/using/unix.po index 23c70a59ba..5780721060 100644 --- a/using/unix.po +++ b/using/unix.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2022-06-11 14:28+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -130,11 +130,12 @@ msgid "Building Python" msgstr "建置 Python" #: ../../using/unix.rst:69 +#, fuzzy msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " "either the latest release's source or just grab a fresh `clone `_. (If you want to " +"devguide.python.org/setup/#get-the-source-code>`_. (If you want to " "contribute patches, you will need a clone.)" msgstr "" "如果你想自己編譯 CPython,首先要做的是獲取\\ `原始碼 \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -871,37 +871,44 @@ msgid "" "``conda`` package manager." msgstr "" -#: ../../using/windows.rst:501 -msgid "`Canopy `_" +#: ../../using/windows.rst:503 +#, fuzzy +msgid "`Enthought Deployment Manager `_" msgstr "`Canopy `_" #: ../../using/windows.rst:500 +msgid "\"The Next Generation Python Environment and Package Manager\"." +msgstr "" + +#: ../../using/windows.rst:502 msgid "" -"A \"comprehensive Python analysis environment\" with editors and other " -"development tools." +"Previously Enthought provided Canopy, but it `reached end of life in 2016 " +"`_." msgstr "" -#: ../../using/windows.rst:505 +#: ../../using/windows.rst:507 msgid "`WinPython `_" msgstr "`WinPython `_" -#: ../../using/windows.rst:504 +#: ../../using/windows.rst:506 msgid "" "Windows-specific distribution with prebuilt scientific packages and tools " "for building packages." msgstr "" -#: ../../using/windows.rst:507 +#: ../../using/windows.rst:509 msgid "" "Note that these packages may not include the latest versions of Python or " "other libraries, and are not maintained or supported by the core Python team." msgstr "" -#: ../../using/windows.rst:513 +#: ../../using/windows.rst:515 msgid "Configuring Python" msgstr "設定 Python" -#: ../../using/windows.rst:515 +#: ../../using/windows.rst:517 msgid "" "To run Python conveniently from a command prompt, you might consider " "changing some default environment variables in Windows. While the installer " @@ -910,29 +917,29 @@ msgid "" "use multiple versions of Python, consider using the :ref:`launcher`." msgstr "" -#: ../../using/windows.rst:525 +#: ../../using/windows.rst:527 msgid "Excursus: Setting environment variables" msgstr "" -#: ../../using/windows.rst:527 +#: ../../using/windows.rst:529 msgid "" "Windows allows environment variables to be configured permanently at both " "the User level and the System level, or temporarily in a command prompt." msgstr "" -#: ../../using/windows.rst:530 +#: ../../using/windows.rst:532 msgid "" "To temporarily set environment variables, open Command Prompt and use the :" "command:`set` command:" msgstr "" -#: ../../using/windows.rst:539 +#: ../../using/windows.rst:541 msgid "" "These changes will apply to any further commands executed in that console, " "and will be inherited by any applications started from the console." msgstr "" -#: ../../using/windows.rst:542 +#: ../../using/windows.rst:544 msgid "" "Including the variable name within percent signs will expand to the existing " "value, allowing you to add your new value at either the start or the end. " @@ -941,7 +948,7 @@ msgid "" "launched." msgstr "" -#: ../../using/windows.rst:548 +#: ../../using/windows.rst:550 msgid "" "To permanently modify the default environment variables, click Start and " "search for 'edit environment variables', or open System properties, :" @@ -951,20 +958,20 @@ msgid "" "your machine (i.e. Administrator rights)." msgstr "" -#: ../../using/windows.rst:557 +#: ../../using/windows.rst:559 msgid "" "Windows will concatenate User variables *after* System variables, which may " "cause unexpected results when modifying :envvar:`PATH`." msgstr "" -#: ../../using/windows.rst:560 +#: ../../using/windows.rst:562 msgid "" "The :envvar:`PYTHONPATH` variable is used by all versions of Python, so you " "should not permanently configure it unless the listed paths only include " "code that is compatible with all of your installed Python versions." msgstr "" -#: ../../using/windows.rst:568 +#: ../../using/windows.rst:570 msgid "" "https://docs.microsoft.com/en-us/windows/win32/procthread/environment-" "variables" @@ -972,11 +979,11 @@ msgstr "" "https://docs.microsoft.com/en-us/windows/win32/procthread/environment-" "variables" -#: ../../using/windows.rst:568 +#: ../../using/windows.rst:570 msgid "Overview of environment variables on Windows" msgstr "Windows 上的環境變數概要" -#: ../../using/windows.rst:571 +#: ../../using/windows.rst:573 msgid "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/set_1" @@ -984,11 +991,11 @@ msgstr "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/set_1" -#: ../../using/windows.rst:571 +#: ../../using/windows.rst:573 msgid "The ``set`` command, for temporarily modifying environment variables" msgstr "" -#: ../../using/windows.rst:573 +#: ../../using/windows.rst:575 msgid "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/setx" @@ -996,22 +1003,22 @@ msgstr "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/setx" -#: ../../using/windows.rst:574 +#: ../../using/windows.rst:576 msgid "The ``setx`` command, for permanently modifying environment variables" msgstr "" -#: ../../using/windows.rst:580 +#: ../../using/windows.rst:582 msgid "Finding the Python executable" msgstr "" -#: ../../using/windows.rst:584 +#: ../../using/windows.rst:586 msgid "" "Besides using the automatically created start menu entry for the Python " "interpreter, you might want to start Python in the command prompt. The " "installer has an option to set that up for you." msgstr "" -#: ../../using/windows.rst:588 +#: ../../using/windows.rst:590 msgid "" "On the first page of the installer, an option labelled \"Add Python to PATH" "\" may be selected to have the installer add the install location into the :" @@ -1022,7 +1029,7 @@ msgid "" "documentation." msgstr "" -#: ../../using/windows.rst:595 +#: ../../using/windows.rst:597 msgid "" "If you don't enable this option at install time, you can always re-run the " "installer, select Modify, and enable it. Alternatively, you can manually " @@ -1033,24 +1040,24 @@ msgid "" "entries already existed)::" msgstr "" -#: ../../using/windows.rst:608 +#: ../../using/windows.rst:610 msgid "UTF-8 mode" msgstr "" -#: ../../using/windows.rst:612 +#: ../../using/windows.rst:614 msgid "" "Windows still uses legacy encodings for the system encoding (the ANSI Code " "Page). Python uses it for the default encoding of text files (e.g. :func:" "`locale.getpreferredencoding`)." msgstr "" -#: ../../using/windows.rst:616 +#: ../../using/windows.rst:618 msgid "" "This may cause issues because UTF-8 is widely used on the internet and most " "Unix systems, including WSL (Windows Subsystem for Linux)." msgstr "" -#: ../../using/windows.rst:619 +#: ../../using/windows.rst:621 msgid "" "You can use the :ref:`Python UTF-8 Mode ` to change the default " "text encoding to UTF-8. You can enable the :ref:`Python UTF-8 Mode ` is enabled, you can still use " "the system encoding (the ANSI Code Page) via the \"mbcs\" codec." msgstr "" -#: ../../using/windows.rst:628 +#: ../../using/windows.rst:630 msgid "" "Note that adding ``PYTHONUTF8=1`` to the default environment variables will " "affect all Python 3.7+ applications on your system. If you have any Python " @@ -1074,27 +1081,27 @@ msgid "" "utf8`` command line option." msgstr "" -#: ../../using/windows.rst:635 +#: ../../using/windows.rst:637 msgid "" "Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows " "for:" msgstr "" -#: ../../using/windows.rst:638 +#: ../../using/windows.rst:640 msgid "Console I/O including standard I/O (see :pep:`528` for details)." msgstr "" -#: ../../using/windows.rst:639 +#: ../../using/windows.rst:641 msgid "" "The :term:`filesystem encoding ` " "(see :pep:`529` for details)." msgstr "" -#: ../../using/windows.rst:646 +#: ../../using/windows.rst:648 msgid "Python Launcher for Windows" msgstr "" -#: ../../using/windows.rst:650 +#: ../../using/windows.rst:652 msgid "" "The Python launcher for Windows is a utility which aids in locating and " "executing of different Python versions. It allows scripts (or the command-" @@ -1102,7 +1109,7 @@ msgid "" "locate and execute that version." msgstr "" -#: ../../using/windows.rst:655 +#: ../../using/windows.rst:657 msgid "" "Unlike the :envvar:`PATH` variable, the launcher will correctly select the " "most appropriate version of Python. It will prefer per-user installations " @@ -1110,19 +1117,19 @@ msgid "" "most recently installed version." msgstr "" -#: ../../using/windows.rst:660 +#: ../../using/windows.rst:662 msgid "The launcher was originally specified in :pep:`397`." msgstr "" -#: ../../using/windows.rst:663 +#: ../../using/windows.rst:665 msgid "Getting started" msgstr "開始" -#: ../../using/windows.rst:666 +#: ../../using/windows.rst:668 msgid "From the command-line" msgstr "" -#: ../../using/windows.rst:670 +#: ../../using/windows.rst:672 msgid "" "System-wide installations of Python 3.3 and later will put the launcher on " "your :envvar:`PATH`. The launcher is compatible with all available versions " @@ -1130,54 +1137,54 @@ msgid "" "the launcher is available, execute the following command in Command Prompt::" msgstr "" -#: ../../using/windows.rst:677 +#: ../../using/windows.rst:679 msgid "" "You should find that the latest version of Python you have installed is " "started - it can be exited as normal, and any additional command-line " "arguments specified will be sent directly to Python." msgstr "" -#: ../../using/windows.rst:681 +#: ../../using/windows.rst:683 msgid "" "If you have multiple versions of Python installed (e.g., 3.7 and |version|) " "you will have noticed that Python |version| was started - to launch Python " "3.7, try the command::" msgstr "" -#: ../../using/windows.rst:687 +#: ../../using/windows.rst:689 msgid "" "If you want the latest version of Python 2 you have installed, try the " "command::" msgstr "" -#: ../../using/windows.rst:692 +#: ../../using/windows.rst:694 msgid "You should find the latest version of Python 3.x starts." msgstr "" -#: ../../using/windows.rst:694 +#: ../../using/windows.rst:696 msgid "" "If you see the following error, you do not have the launcher installed::" msgstr "" -#: ../../using/windows.rst:699 +#: ../../using/windows.rst:701 msgid "" "Per-user installations of Python do not add the launcher to :envvar:`PATH` " "unless the option was selected on installation." msgstr "" -#: ../../using/windows.rst:702 +#: ../../using/windows.rst:704 msgid "The command::" msgstr "" -#: ../../using/windows.rst:706 +#: ../../using/windows.rst:708 msgid "displays the currently installed version(s) of Python." msgstr "" -#: ../../using/windows.rst:709 +#: ../../using/windows.rst:711 msgid "Virtual environments" msgstr "虛擬環境(Virtual environment)" -#: ../../using/windows.rst:713 +#: ../../using/windows.rst:715 msgid "" "If the launcher is run with no explicit Python version specification, and a " "virtual environment (created with the standard library :mod:`venv` module or " @@ -1187,27 +1194,27 @@ msgid "" "specify the global Python version." msgstr "" -#: ../../using/windows.rst:721 +#: ../../using/windows.rst:723 msgid "From a script" msgstr "" -#: ../../using/windows.rst:723 +#: ../../using/windows.rst:725 msgid "" "Let's create a test Python script - create a file called ``hello.py`` with " "the following contents" msgstr "" -#: ../../using/windows.rst:732 +#: ../../using/windows.rst:734 msgid "From the directory in which hello.py lives, execute the command::" msgstr "" -#: ../../using/windows.rst:736 +#: ../../using/windows.rst:738 msgid "" "You should notice the version number of your latest Python 2.x installation " "is printed. Now try changing the first line to be:" msgstr "" -#: ../../using/windows.rst:743 +#: ../../using/windows.rst:745 msgid "" "Re-executing the command should now print the latest Python 3.x information. " "As with the above command-line examples, you can specify a more explicit " @@ -1216,7 +1223,7 @@ msgid "" "information printed." msgstr "" -#: ../../using/windows.rst:749 +#: ../../using/windows.rst:751 msgid "" "Note that unlike interactive use, a bare \"python\" will use the latest " "version of Python 2.x that you have installed. This is for backward " @@ -1224,11 +1231,11 @@ msgid "" "typically refers to Python 2." msgstr "" -#: ../../using/windows.rst:755 +#: ../../using/windows.rst:757 msgid "From file associations" msgstr "從檔案關聯" -#: ../../using/windows.rst:757 +#: ../../using/windows.rst:759 msgid "" "The launcher should have been associated with Python files (i.e. ``.py``, ``." "pyw``, ``.pyc`` files) when it was installed. This means that when you " @@ -1237,17 +1244,17 @@ msgid "" "have the script specify the version which should be used." msgstr "" -#: ../../using/windows.rst:763 +#: ../../using/windows.rst:765 msgid "" "The key benefit of this is that a single launcher can support multiple " "Python versions at the same time depending on the contents of the first line." msgstr "" -#: ../../using/windows.rst:767 +#: ../../using/windows.rst:769 msgid "Shebang Lines" msgstr "" -#: ../../using/windows.rst:769 +#: ../../using/windows.rst:771 msgid "" "If the first line of a script file starts with ``#!``, it is known as a " "\"shebang\" line. Linux and other Unix like operating systems have native " @@ -1257,34 +1264,34 @@ msgid "" "demonstrate their use." msgstr "" -#: ../../using/windows.rst:776 +#: ../../using/windows.rst:778 msgid "" "To allow shebang lines in Python scripts to be portable between Unix and " "Windows, this launcher supports a number of 'virtual' commands to specify " "which interpreter to use. The supported virtual commands are:" msgstr "" -#: ../../using/windows.rst:780 +#: ../../using/windows.rst:782 msgid "``/usr/bin/env python``" msgstr "``/usr/bin/env python``" -#: ../../using/windows.rst:781 +#: ../../using/windows.rst:783 msgid "``/usr/bin/python``" msgstr "``/usr/bin/python``" -#: ../../using/windows.rst:782 +#: ../../using/windows.rst:784 msgid "``/usr/local/bin/python``" msgstr "``/usr/local/bin/python``" -#: ../../using/windows.rst:783 +#: ../../using/windows.rst:785 msgid "``python``" msgstr "``python``" -#: ../../using/windows.rst:785 +#: ../../using/windows.rst:787 msgid "For example, if the first line of your script starts with" msgstr "" -#: ../../using/windows.rst:791 +#: ../../using/windows.rst:793 msgid "" "The default Python will be located and used. As many Python scripts written " "to work on Unix will already have this line, you should find these scripts " @@ -1293,7 +1300,7 @@ msgid "" "of the shebang lines starting with ``/usr``." msgstr "" -#: ../../using/windows.rst:797 +#: ../../using/windows.rst:799 msgid "" "Any of the above virtual commands can be suffixed with an explicit version " "(either just the major version, or the major and minor version). Furthermore " @@ -1302,14 +1309,14 @@ msgid "" "python 3.7." msgstr "" -#: ../../using/windows.rst:805 +#: ../../using/windows.rst:807 msgid "" "Beginning with python launcher 3.7 it is possible to request 64-bit version " "by the \"-64\" suffix. Furthermore it is possible to specify a major and " "architecture without minor (i.e. ``/usr/bin/python3-64``)." msgstr "" -#: ../../using/windows.rst:809 +#: ../../using/windows.rst:811 msgid "" "The ``/usr/bin/env`` form of shebang line has one further special property. " "Before looking for installed Python interpreters, this form will search the " @@ -1318,29 +1325,29 @@ msgid "" "search." msgstr "" -#: ../../using/windows.rst:815 +#: ../../using/windows.rst:817 msgid "Arguments in shebang lines" msgstr "" -#: ../../using/windows.rst:817 +#: ../../using/windows.rst:819 msgid "" "The shebang lines can also specify additional options to be passed to the " "Python interpreter. For example, if you have a shebang line:" msgstr "" -#: ../../using/windows.rst:824 +#: ../../using/windows.rst:826 msgid "Then Python will be started with the ``-v`` option" msgstr "" -#: ../../using/windows.rst:827 +#: ../../using/windows.rst:829 msgid "Customization" msgstr "" -#: ../../using/windows.rst:830 +#: ../../using/windows.rst:832 msgid "Customization via INI files" msgstr "" -#: ../../using/windows.rst:832 +#: ../../using/windows.rst:834 msgid "" "Two .ini files will be searched by the launcher - ``py.ini`` in the current " "user's \"application data\" directory (i.e. the directory returned by " @@ -1350,7 +1357,7 @@ msgid "" "launcher (i.e. py.exe) and for the 'windows' version (i.e. pyw.exe)." msgstr "" -#: ../../using/windows.rst:839 +#: ../../using/windows.rst:841 msgid "" "Customization specified in the \"application directory\" will have " "precedence over the one next to the executable, so a user, who may not have " @@ -1358,11 +1365,11 @@ msgid "" "that global .ini file." msgstr "" -#: ../../using/windows.rst:844 +#: ../../using/windows.rst:846 msgid "Customizing default Python versions" msgstr "" -#: ../../using/windows.rst:846 +#: ../../using/windows.rst:848 msgid "" "In some cases, a version qualifier can be included in a command to dictate " "which version of Python will be used by the command. A version qualifier " @@ -1372,13 +1379,13 @@ msgid "" "\"-32\" or \"-64\"." msgstr "" -#: ../../using/windows.rst:852 +#: ../../using/windows.rst:854 msgid "" "For example, a shebang line of ``#!python`` has no version qualifier, while " "``#!python3`` has a version qualifier which specifies only a major version." msgstr "" -#: ../../using/windows.rst:855 +#: ../../using/windows.rst:857 msgid "" "If no version qualifiers are found in a command, the environment variable :" "envvar:`PY_PYTHON` can be set to specify the default version qualifier. If " @@ -1388,7 +1395,7 @@ msgid "" "launcher included with Python 3.7 or newer.)" msgstr "" -#: ../../using/windows.rst:862 +#: ../../using/windows.rst:864 msgid "" "If no minor version qualifiers are found, the environment variable " "``PY_PYTHON{major}`` (where ``{major}`` is the current major version " @@ -1399,7 +1406,7 @@ msgid "" "version in that family." msgstr "" -#: ../../using/windows.rst:870 +#: ../../using/windows.rst:872 msgid "" "On 64-bit Windows with both 32-bit and 64-bit implementations of the same " "(major.minor) Python version installed, the 64-bit version will always be " @@ -1413,30 +1420,30 @@ msgid "" "suffix can be used on a version specifier to change this behaviour." msgstr "" -#: ../../using/windows.rst:881 +#: ../../using/windows.rst:883 msgid "Examples:" msgstr "範例:" -#: ../../using/windows.rst:883 +#: ../../using/windows.rst:885 msgid "" "If no relevant options are set, the commands ``python`` and ``python2`` will " "use the latest Python 2.x version installed and the command ``python3`` will " "use the latest Python 3.x installed." msgstr "" -#: ../../using/windows.rst:887 +#: ../../using/windows.rst:889 msgid "" "The command ``python3.7`` will not consult any options at all as the " "versions are fully specified." msgstr "" -#: ../../using/windows.rst:890 +#: ../../using/windows.rst:892 msgid "" "If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " "the latest installed Python 3 version." msgstr "" -#: ../../using/windows.rst:893 +#: ../../using/windows.rst:895 msgid "" "If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit " "implementation of 3.7 whereas the command ``python3`` will use the latest " @@ -1444,13 +1451,13 @@ msgid "" "specified.)" msgstr "" -#: ../../using/windows.rst:898 +#: ../../using/windows.rst:900 msgid "" "If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands ``python`` and " "``python3`` will both use specifically 3.7" msgstr "" -#: ../../using/windows.rst:901 +#: ../../using/windows.rst:903 msgid "" "In addition to environment variables, the same settings can be configured in " "the .INI file used by the launcher. The section in the INI file is called " @@ -1460,25 +1467,25 @@ msgid "" "will override things specified in the INI file." msgstr "" -#: ../../using/windows.rst:908 +#: ../../using/windows.rst:910 msgid "For example:" msgstr "" -#: ../../using/windows.rst:910 +#: ../../using/windows.rst:912 msgid "Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:" msgstr "" -#: ../../using/windows.rst:917 +#: ../../using/windows.rst:919 msgid "" "Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file " "containing:" msgstr "" -#: ../../using/windows.rst:927 +#: ../../using/windows.rst:929 msgid "Diagnostics" msgstr "" -#: ../../using/windows.rst:929 +#: ../../using/windows.rst:931 msgid "" "If an environment variable ``PYLAUNCH_DEBUG`` is set (to any value), the " "launcher will print diagnostic information to stderr (i.e. to the console). " @@ -1488,11 +1495,11 @@ msgid "" "target Python." msgstr "" -#: ../../using/windows.rst:941 +#: ../../using/windows.rst:943 msgid "Finding modules" msgstr "" -#: ../../using/windows.rst:943 +#: ../../using/windows.rst:945 msgid "" "Python usually stores its library (and thereby your site-packages folder) in " "the installation directory. So, if you had installed Python to :file:`C:\\" @@ -1501,7 +1508,7 @@ msgid "" "\\\\site-packages\\\\`." msgstr "" -#: ../../using/windows.rst:949 +#: ../../using/windows.rst:951 msgid "" "To completely override :data:`sys.path`, create a ``._pth`` file with the " "same name as the DLL (``python37._pth``) or the executable (``python._pth``) " @@ -1510,7 +1517,7 @@ msgid "" "allows paths to be restricted for any program loading the runtime if desired." msgstr "" -#: ../../using/windows.rst:955 +#: ../../using/windows.rst:957 msgid "" "When the file exists, all registry and environment variables are ignored, " "isolated mode is enabled, and :mod:`site` is not imported unless one line in " @@ -1520,25 +1527,25 @@ msgid "" "arbitrary code cannot be specified." msgstr "" -#: ../../using/windows.rst:962 +#: ../../using/windows.rst:964 msgid "" "Note that ``.pth`` files (without leading underscore) will be processed " "normally by the :mod:`site` module when ``import site`` has been specified." msgstr "" -#: ../../using/windows.rst:965 +#: ../../using/windows.rst:967 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../using/windows.rst:968 +#: ../../using/windows.rst:970 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../using/windows.rst:971 +#: ../../using/windows.rst:973 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -1546,7 +1553,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../using/windows.rst:976 +#: ../../using/windows.rst:978 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -1556,7 +1563,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../using/windows.rst:983 +#: ../../using/windows.rst:985 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -1567,31 +1574,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../using/windows.rst:991 +#: ../../using/windows.rst:993 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../using/windows.rst:995 +#: ../../using/windows.rst:997 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../using/windows.rst:998 +#: ../../using/windows.rst:1000 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../using/windows.rst:1002 +#: ../../using/windows.rst:1004 msgid "The end result of all this is:" msgstr "最終這所有的結果為:" -#: ../../using/windows.rst:1004 +#: ../../using/windows.rst:1006 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -1599,7 +1606,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../using/windows.rst:1009 +#: ../../using/windows.rst:1011 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -1607,20 +1614,20 @@ msgid "" "always read." msgstr "" -#: ../../using/windows.rst:1013 +#: ../../using/windows.rst:1015 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../using/windows.rst:1017 +#: ../../using/windows.rst:1019 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../using/windows.rst:1020 +#: ../../using/windows.rst:1022 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -1628,20 +1635,20 @@ msgid "" "listed." msgstr "" -#: ../../using/windows.rst:1025 +#: ../../using/windows.rst:1027 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly call :c:func:`Py_SetPath` or (at least) :c:func:" "`Py_SetProgramName` before :c:func:`Py_Initialize`." msgstr "" -#: ../../using/windows.rst:1029 +#: ../../using/windows.rst:1031 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../using/windows.rst:1032 +#: ../../using/windows.rst:1034 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -1650,7 +1657,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../using/windows.rst:1038 +#: ../../using/windows.rst:1040 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -1660,19 +1667,19 @@ msgid "" "packages." msgstr "" -#: ../../using/windows.rst:1047 +#: ../../using/windows.rst:1049 msgid "" "Adds ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../using/windows.rst:1049 +#: ../../using/windows.rst:1051 msgid "" "Adds ``pythonXX.zip`` as a potential landmark when directly adjacent to the " "executable." msgstr "" -#: ../../using/windows.rst:1055 +#: ../../using/windows.rst:1057 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -1680,89 +1687,89 @@ msgid "" "explicitly added to :attr:`sys.meta_path` in the future." msgstr "" -#: ../../using/windows.rst:1061 +#: ../../using/windows.rst:1063 msgid "Additional modules" msgstr "" -#: ../../using/windows.rst:1063 +#: ../../using/windows.rst:1065 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../using/windows.rst:1067 +#: ../../using/windows.rst:1069 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../using/windows.rst:1071 +#: ../../using/windows.rst:1073 msgid "PyWin32" msgstr "PyWin32" -#: ../../using/windows.rst:1073 +#: ../../using/windows.rst:1075 msgid "" "The `PyWin32 `_ module by Mark Hammond is " "a collection of modules for advanced Windows-specific support. This " "includes utilities for:" msgstr "" -#: ../../using/windows.rst:1077 +#: ../../using/windows.rst:1079 msgid "" "`Component Object Model `_ (COM)" msgstr "" -#: ../../using/windows.rst:1080 +#: ../../using/windows.rst:1082 msgid "Win32 API calls" msgstr "" -#: ../../using/windows.rst:1081 +#: ../../using/windows.rst:1083 msgid "Registry" msgstr "登錄檔(Registry)" -#: ../../using/windows.rst:1082 +#: ../../using/windows.rst:1084 msgid "Event log" msgstr "事件日誌(Event log)" -#: ../../using/windows.rst:1083 +#: ../../using/windows.rst:1085 msgid "" "`Microsoft Foundation Classes `_ (MFC) user interfaces" msgstr "" -#: ../../using/windows.rst:1087 +#: ../../using/windows.rst:1089 msgid "" "`PythonWin `_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1094 +#: ../../using/windows.rst:1096 msgid "" "`Win32 How Do I...? `_" msgstr "" "`Win32 How Do I...? `_" -#: ../../using/windows.rst:1094 +#: ../../using/windows.rst:1096 msgid "by Tim Golden" msgstr "由 Tim Golden 所著" -#: ../../using/windows.rst:1096 +#: ../../using/windows.rst:1098 #, fuzzy msgid "`Python and COM `_" msgstr "`Python and COM `_" -#: ../../using/windows.rst:1097 +#: ../../using/windows.rst:1099 msgid "by David and Paul Boddie" msgstr "由 David 與 Paul Boddie 所著" -#: ../../using/windows.rst:1101 +#: ../../using/windows.rst:1103 msgid "cx_Freeze" msgstr "cx_Freeze" -#: ../../using/windows.rst:1103 +#: ../../using/windows.rst:1105 msgid "" "`cx_Freeze `_ is a :mod:" "`distutils` extension (see :ref:`extending-distutils`) which wraps Python " @@ -1771,60 +1778,60 @@ msgid "" "users to install Python." msgstr "" -#: ../../using/windows.rst:1111 +#: ../../using/windows.rst:1113 msgid "Compiling Python on Windows" msgstr "編譯 Python 在 Windows" -#: ../../using/windows.rst:1113 +#: ../../using/windows.rst:1115 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " "either the latest release's source or just grab a fresh `checkout `_." +"devguide.python.org/setup/#get-the-source-code>`_." msgstr "" -#: ../../using/windows.rst:1118 +#: ../../using/windows.rst:1120 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../using/windows.rst:1122 +#: ../../using/windows.rst:1124 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../using/windows.rst:1124 +#: ../../using/windows.rst:1126 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" -#: ../../using/windows.rst:1128 +#: ../../using/windows.rst:1130 msgid "Other Platforms" msgstr "其他平台" -#: ../../using/windows.rst:1130 +#: ../../using/windows.rst:1132 msgid "" "With ongoing development of Python, some platforms that used to be supported " "earlier are no longer supported (due to the lack of users or developers). " "Check :pep:`11` for details on all unsupported platforms." msgstr "" -#: ../../using/windows.rst:1134 +#: ../../using/windows.rst:1136 msgid "" "`Windows CE `_ is `no longer supported " "`__ since Python 3 (if it " "ever was)." msgstr "" -#: ../../using/windows.rst:1137 +#: ../../using/windows.rst:1139 msgid "" "The `Cygwin `_ installer offers to install the `Python " "interpreter `__ as well" msgstr "" -#: ../../using/windows.rst:1141 +#: ../../using/windows.rst:1143 msgid "" "See `Python for Windows `_ for " "detailed information about platforms with pre-compiled installers." diff --git a/whatsnew/2.1.po b/whatsnew/2.1.po index cbff59087f..286d07c3f0 100644 --- a/whatsnew/2.1.po +++ b/whatsnew/2.1.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -477,7 +477,7 @@ msgstr "" msgid ":pep:`229` - Using Distutils to Build Python" msgstr "" -#: ../../whatsnew/2.1.rst:336 ../../whatsnew/2.1.rst:571 +#: ../../whatsnew/2.1.rst:336 ../../whatsnew/2.1.rst:574 msgid "Written and implemented by A.M. Kuchling." msgstr "" @@ -686,11 +686,14 @@ msgstr "" msgid "" "A common complaint from Python users is that there's no single catalog of " "all the Python modules in existence. T. Middleton's Vaults of Parnassus at " -"http://www.vex.net/parnassus/ are the largest catalog of Python modules, but " -"registering software at the Vaults is optional, and many people don't bother." +"``www.vex.net/parnassus/`` (retired in February 2009, `available in the " +"Internet Archive Wayback Machine `_) was the largest catalog of Python modules, " +"but registering software at the Vaults is optional, and many people did not " +"bother." msgstr "" -#: ../../whatsnew/2.1.rst:548 +#: ../../whatsnew/2.1.rst:551 msgid "" "As a first small step toward fixing the problem, Python software packaged " "using the Distutils :command:`sdist` command will include a file named :file:" @@ -706,7 +709,7 @@ msgid "" "would automatically upload your package to a catalog server." msgstr "" -#: ../../whatsnew/2.1.rst:561 +#: ../../whatsnew/2.1.rst:564 msgid "" "You can start creating packages containing :file:`PKG-INFO` even if you're " "not using Python 2.1, since a new release of the Distutils will be made for " @@ -716,25 +719,25 @@ msgid "" "python.org/community/sigs/current/distutils-sig/." msgstr "" -#: ../../whatsnew/2.1.rst:571 +#: ../../whatsnew/2.1.rst:574 msgid ":pep:`241` - Metadata for Python Software Packages" msgstr "" -#: ../../whatsnew/2.1.rst:574 +#: ../../whatsnew/2.1.rst:577 msgid ":pep:`243` - Module Repository Upload Mechanism" msgstr "" -#: ../../whatsnew/2.1.rst:574 +#: ../../whatsnew/2.1.rst:577 msgid "" "Written by Sean Reifschneider, this draft PEP describes a proposed mechanism " "for uploading Python packages to a central server." msgstr "" -#: ../../whatsnew/2.1.rst:581 +#: ../../whatsnew/2.1.rst:584 msgid "New and Improved Modules" msgstr "" -#: ../../whatsnew/2.1.rst:583 +#: ../../whatsnew/2.1.rst:586 msgid "" "Ka-Ping Yee contributed two new modules: :mod:`inspect.py`, a module for " "getting information about live Python code, and :mod:`pydoc.py`, a module " @@ -744,13 +747,13 @@ msgid "" "name. For example, ``pydoc xml.dom`` displays the following::" msgstr "" -#: ../../whatsnew/2.1.rst:605 +#: ../../whatsnew/2.1.rst:608 msgid "" ":file:`pydoc` also includes a Tk-based interactive help browser. :file:" "`pydoc` quickly becomes addictive; try it out!" msgstr "" -#: ../../whatsnew/2.1.rst:608 +#: ../../whatsnew/2.1.rst:611 msgid "" "Two different modules for unit testing were added to the standard library. " "The :mod:`doctest` module, contributed by Tim Peters, provides a testing " @@ -761,7 +764,7 @@ msgid "" "sourceforge.net/ for more information about PyUnit." msgstr "" -#: ../../whatsnew/2.1.rst:616 +#: ../../whatsnew/2.1.rst:619 msgid "" "The :mod:`difflib` module contains a class, :class:`SequenceMatcher`, which " "compares two sequences and computes the changes required to transform one " @@ -771,7 +774,7 @@ msgid "" "script." msgstr "" -#: ../../whatsnew/2.1.rst:622 +#: ../../whatsnew/2.1.rst:625 msgid "" ":mod:`curses.panel`, a wrapper for the panel library, part of ncurses and of " "SYSV curses, was contributed by Thomas Gellekum. The panel library provides " @@ -780,7 +783,7 @@ msgid "" "overlap and which sections are visible." msgstr "" -#: ../../whatsnew/2.1.rst:628 +#: ../../whatsnew/2.1.rst:631 msgid "" "The PyXML package has gone through a few releases since Python 2.0, and " "Python 2.1 includes an updated version of the :mod:`xml` package. Some of " @@ -789,7 +792,7 @@ msgid "" "Python, and various bugfixes for SAX, DOM, and the :mod:`minidom` module." msgstr "" -#: ../../whatsnew/2.1.rst:634 +#: ../../whatsnew/2.1.rst:637 msgid "" "Ping also contributed another hook for handling uncaught exceptions. :func:" "`sys.excepthook` can be set to a callable object. When an exception isn't " @@ -801,7 +804,7 @@ msgid "" "each frame." msgstr "" -#: ../../whatsnew/2.1.rst:642 +#: ../../whatsnew/2.1.rst:645 msgid "" "Various functions in the :mod:`time` module, such as :func:`asctime` and :" "func:`localtime`, require a floating point argument containing the time in " @@ -813,11 +816,11 @@ msgid "" "``time.asctime(time.localtime(time.time()))`` that was previously required." msgstr "" -#: ../../whatsnew/2.1.rst:651 +#: ../../whatsnew/2.1.rst:654 msgid "This change was proposed and implemented by Thomas Wouters." msgstr "" -#: ../../whatsnew/2.1.rst:653 +#: ../../whatsnew/2.1.rst:656 msgid "" "The :mod:`ftplib` module now defaults to retrieving files in passive mode, " "because passive mode is more likely to work from behind a firewall. This " @@ -829,20 +832,20 @@ msgid "" "``set_pasv(0)`` on FTP objects to disable passive mode." msgstr "" -#: ../../whatsnew/2.1.rst:662 +#: ../../whatsnew/2.1.rst:665 msgid "" "Support for raw socket access has been added to the :mod:`socket` module, " "contributed by Grant Edwards." msgstr "" -#: ../../whatsnew/2.1.rst:665 +#: ../../whatsnew/2.1.rst:668 msgid "" "The :mod:`pstats` module now contains a simple interactive statistics " "browser for displaying timing profiles for Python programs, invoked when the " "module is run as a script. Contributed by Eric S. Raymond." msgstr "" -#: ../../whatsnew/2.1.rst:669 +#: ../../whatsnew/2.1.rst:672 msgid "" "A new implementation-dependent function, ``sys._getframe([depth])``, has " "been added to return a given frame object from the current call stack. :func:" @@ -852,18 +855,18 @@ msgid "" "_getframe(1)`` returns the caller's frame object." msgstr "" -#: ../../whatsnew/2.1.rst:676 +#: ../../whatsnew/2.1.rst:679 msgid "" "This function is only present in CPython, not in Jython or the .NET " "implementation. Use it for debugging, and resist the temptation to put it " "into production code." msgstr "" -#: ../../whatsnew/2.1.rst:684 +#: ../../whatsnew/2.1.rst:687 msgid "Other Changes and Fixes" msgstr "" -#: ../../whatsnew/2.1.rst:686 +#: ../../whatsnew/2.1.rst:689 msgid "" "There were relatively few smaller changes made in Python 2.1 due to the " "shorter release cycle. A search through the CVS change logs turns up 117 " @@ -871,7 +874,7 @@ msgid "" "underestimates. Some of the more notable changes are:" msgstr "" -#: ../../whatsnew/2.1.rst:691 +#: ../../whatsnew/2.1.rst:694 msgid "" "A specialized object allocator is now optionally available, that should be " "faster than the system :func:`malloc` and have less memory overhead. The " @@ -882,7 +885,7 @@ msgid "" "details." msgstr "" -#: ../../whatsnew/2.1.rst:698 +#: ../../whatsnew/2.1.rst:701 msgid "" "Authors of C extension modules should test their code with the object " "allocator enabled, because some incorrect code may break, causing core dumps " @@ -898,11 +901,11 @@ msgid "" "doubtless there are more third-party modules that will have the same problem." msgstr "" -#: ../../whatsnew/2.1.rst:711 +#: ../../whatsnew/2.1.rst:714 msgid "The object allocator was contributed by Vladimir Marangozov." msgstr "" -#: ../../whatsnew/2.1.rst:713 +#: ../../whatsnew/2.1.rst:716 msgid "" "The speed of line-oriented file I/O has been improved because people often " "complain about its lack of speed, and because it's often been used as a " @@ -914,7 +917,7 @@ msgid "" "this change, motivated by a discussion in comp.lang.python." msgstr "" -#: ../../whatsnew/2.1.rst:722 +#: ../../whatsnew/2.1.rst:725 msgid "" "A new module and method for file objects was also added, contributed by Jeff " "Epler. The new method, :meth:`xreadlines`, is similar to the existing :func:" @@ -924,14 +927,14 @@ msgid "" "`readlines` method does. You'd use it like this::" msgstr "" -#: ../../whatsnew/2.1.rst:733 +#: ../../whatsnew/2.1.rst:736 msgid "" "For a fuller discussion of the line I/O changes, see the python-dev summary " "for January 1--15, 2001 at https://mail.python.org/pipermail/python-dev/2001-" "January/." msgstr "" -#: ../../whatsnew/2.1.rst:736 +#: ../../whatsnew/2.1.rst:739 msgid "" "A new method, :meth:`popitem`, was added to dictionaries to enable " "destructively iterating through the contents of a dictionary; this can be " @@ -942,7 +945,7 @@ msgid "" "suggestion and preliminary patch by Moshe Zadka." msgstr "" -#: ../../whatsnew/2.1.rst:744 +#: ../../whatsnew/2.1.rst:747 msgid "" "Modules can now control which names are imported when ``from module import " "*`` is used, by defining an ``__all__`` attribute containing a list of names " @@ -952,14 +955,14 @@ msgid "" "the public names in ``__all__``::" msgstr "" -#: ../../whatsnew/2.1.rst:754 +#: ../../whatsnew/2.1.rst:757 msgid "" "A stricter version of this patch was first suggested and implemented by Ben " "Wolfson, but after some python-dev discussion, a weaker final version was " "checked in." msgstr "" -#: ../../whatsnew/2.1.rst:758 +#: ../../whatsnew/2.1.rst:761 msgid "" "Applying :func:`repr` to strings previously used octal escapes for non-" "printable characters; for example, a newline was ``'\\012'``. This was a " @@ -969,14 +972,14 @@ msgid "" "characters, and implemented this new formatting." msgstr "" -#: ../../whatsnew/2.1.rst:765 +#: ../../whatsnew/2.1.rst:768 msgid "" "Syntax errors detected at compile-time can now raise exceptions containing " "the filename and line number of the error, a pleasant side effect of the " "compiler reorganization done by Jeremy Hylton." msgstr "" -#: ../../whatsnew/2.1.rst:769 +#: ../../whatsnew/2.1.rst:772 msgid "" "C extensions which import other modules have been changed to use :func:" "`PyImport_ImportModule`, which means that they will use any import hooks " @@ -984,31 +987,31 @@ msgid "" "extensions that need to import some other module from C code." msgstr "" -#: ../../whatsnew/2.1.rst:774 +#: ../../whatsnew/2.1.rst:777 msgid "" "The size of the Unicode character database was shrunk by another 340K thanks " "to Fredrik Lundh." msgstr "" -#: ../../whatsnew/2.1.rst:777 +#: ../../whatsnew/2.1.rst:780 msgid "" "Some new ports were contributed: MacOS X (by Steven Majewski), Cygwin (by " "Jason Tishler); RISCOS (by Dietmar Schwertberger); Unixware 7 (by Billy G. " "Allie)." msgstr "" -#: ../../whatsnew/2.1.rst:781 +#: ../../whatsnew/2.1.rst:784 msgid "" "And there's the usual list of minor bugfixes, minor memory leaks, docstring " "edits, and other tweaks, too lengthy to be worth itemizing; see the CVS logs " "for the full details if you want them." msgstr "" -#: ../../whatsnew/2.1.rst:789 +#: ../../whatsnew/2.1.rst:792 msgid "Acknowledgements" msgstr "致謝" -#: ../../whatsnew/2.1.rst:791 +#: ../../whatsnew/2.1.rst:794 msgid "" "The author would like to thank the following people for offering suggestions " "on various drafts of this article: Graeme Cross, David Goodger, Jay Graves, " diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 63ad781b52..47097fc402 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-30 00:18+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -656,8 +656,10 @@ msgid "The Wikipedia entry for coroutines." msgstr "" #: ../../whatsnew/2.5.rst:554 -msgid "http://www.sidhe.org/~dan/blog/archives/000178.html" -msgstr "http://www.sidhe.org/~dan/blog/archives/000178.html" +msgid "" +"https://web.archive.org/web/20160321211320/http://www.sidhe.org/~dan/blog/" +"archives/000178.html" +msgstr "" #: ../../whatsnew/2.5.rst:555 msgid "" @@ -2049,11 +2051,13 @@ msgid "" msgstr "" #: ../../whatsnew/2.5.rst:1750 -msgid "http://starship.python.net/crew/theller/ctypes/" -msgstr "http://starship.python.net/crew/theller/ctypes/" +msgid "" +"https://web.archive.org/web/20180410025338/http://starship.python.net/crew/" +"theller/ctypes/" +msgstr "" #: ../../whatsnew/2.5.rst:1750 -msgid "The ctypes web page, with a tutorial, reference, and FAQ." +msgid "The pre-stdlib ctypes web page, with a tutorial, reference, and FAQ." msgstr "" #: ../../whatsnew/2.5.rst:1752 @@ -2436,8 +2440,10 @@ msgid "" msgstr "" #: ../../whatsnew/2.5.rst:2069 -msgid "http://www.wsgi.org" -msgstr "http://www.wsgi.org" +msgid "" +"https://web.archive.org/web/20160331090247/http://wsgi.readthedocs.org/en/" +"latest/" +msgstr "" #: ../../whatsnew/2.5.rst:2069 msgid "A central web site for WSGI-related resources." @@ -2737,5 +2743,14 @@ msgid "" "Wouters." msgstr "" +#~ msgid "http://www.sidhe.org/~dan/blog/archives/000178.html" +#~ msgstr "http://www.sidhe.org/~dan/blog/archives/000178.html" + +#~ msgid "http://starship.python.net/crew/theller/ctypes/" +#~ msgstr "http://starship.python.net/crew/theller/ctypes/" + +#~ msgid "http://www.wsgi.org" +#~ msgstr "http://www.wsgi.org" + #~ msgid "http://effbot.org/zone/element-index.htm" #~ msgstr "http://effbot.org/zone/element-index.htm" diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index df62ffac0d..0e59a3653c 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-30 00:18+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -189,9 +189,9 @@ msgid "" "Hosting of the Python bug tracker is kindly provided by `Upfront Systems " "`__ of Stellenbosch, South Africa. Martin " "von Löwis put a lot of effort into importing existing bugs and patches from " -"SourceForge; his scripts for this import operation are at http://svn.python." -"org/view/tracker/importer/ and may be useful to other projects wishing to " -"move from SourceForge to Roundup." +"SourceForge; his scripts for this import operation are at ``http://svn." +"python.org/view/tracker/importer/`` and may be useful to other projects " +"wishing to move from SourceForge to Roundup." msgstr "" #: ../../whatsnew/2.6.rst:185 diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 4a004882c8..039d91e9e7 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1724,8 +1724,8 @@ msgid "" "The :func:`ssl.wrap_socket` constructor function now takes a *ciphers* " "argument that's a string listing the encryption algorithms to be allowed; " "the format of the string is described `in the OpenSSL documentation `__. " -"(Added by Antoine Pitrou; :issue:`8322`.)" +"www.openssl.org/docs/man1.0.2/man1/ciphers.html>`__. (Added by Antoine " +"Pitrou; :issue:`8322`.)" msgstr "" #: ../../whatsnew/2.7.rst:1551 @@ -2334,8 +2334,10 @@ msgid "" msgstr "" #: ../../whatsnew/2.7.rst:2005 -msgid "http://www.voidspace.org.uk/python/articles/unittest2.shtml" -msgstr "http://www.voidspace.org.uk/python/articles/unittest2.shtml" +msgid "" +"https://web.archive.org/web/20210619163128/http://www.voidspace.org.uk/" +"python/articles/unittest2.shtml" +msgstr "" #: ../../whatsnew/2.7.rst:2005 msgid "" @@ -3314,3 +3316,6 @@ msgid "" "Nick Coghlan, Philip Jenvey, Ryan Lovett, R. David Murray, Hugh Secker-" "Walker." msgstr "" + +#~ msgid "http://www.voidspace.org.uk/python/articles/unittest2.shtml" +#~ msgstr "http://www.voidspace.org.uk/python/articles/unittest2.shtml" diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index 12d8613b19..65a4e97825 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-30 00:18+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -35,19 +35,18 @@ msgid "" "This article explains the new features in Python 3.2 as compared to 3.1. " "Python 3.2 was released on February 20, 2011. It focuses on a few highlights " "and gives a few examples. For full details, see the `Misc/NEWS `_ file." +"github.com/python/cpython/blob/v3.2.6/Misc/NEWS>`_ file." msgstr "" -#: ../../whatsnew/3.2.rst:60 +#: ../../whatsnew/3.2.rst:59 msgid ":pep:`392` - Python 3.2 Release Schedule" msgstr "" -#: ../../whatsnew/3.2.rst:64 +#: ../../whatsnew/3.2.rst:63 msgid "PEP 384: Defining a Stable ABI" msgstr "" -#: ../../whatsnew/3.2.rst:66 +#: ../../whatsnew/3.2.rst:65 msgid "" "In the past, extension modules built for one Python version were often not " "usable with other Python versions. Particularly on Windows, every feature " @@ -56,7 +55,7 @@ msgid "" "interpreter internals that extension modules could use." msgstr "" -#: ../../whatsnew/3.2.rst:72 +#: ../../whatsnew/3.2.rst:71 msgid "" "With Python 3.2, an alternative approach becomes available: extension " "modules which restrict themselves to a limited API (by defining " @@ -68,19 +67,19 @@ msgid "" "every feature release." msgstr "" -#: ../../whatsnew/3.2.rst:83 +#: ../../whatsnew/3.2.rst:82 msgid ":pep:`384` - Defining a Stable ABI" msgstr "" -#: ../../whatsnew/3.2.rst:84 +#: ../../whatsnew/3.2.rst:83 msgid "PEP written by Martin von Löwis." msgstr "由 Martin von Löwis 撰寫 PEP。" -#: ../../whatsnew/3.2.rst:88 +#: ../../whatsnew/3.2.rst:87 msgid "PEP 389: Argparse Command Line Parsing Module" msgstr "" -#: ../../whatsnew/3.2.rst:90 +#: ../../whatsnew/3.2.rst:89 msgid "" "A new module for command line parsing, :mod:`argparse`, was introduced to " "overcome the limitations of :mod:`optparse` which did not provide support " @@ -88,7 +87,7 @@ msgid "" "and other common patterns of specifying and validating options." msgstr "" -#: ../../whatsnew/3.2.rst:95 +#: ../../whatsnew/3.2.rst:94 msgid "" "This module has already had widespread success in the community as a third-" "party module. Being more fully featured than its predecessor, the :mod:" @@ -97,46 +96,46 @@ msgid "" "amount of legacy code that depends on it." msgstr "" -#: ../../whatsnew/3.2.rst:101 +#: ../../whatsnew/3.2.rst:100 msgid "" "Here's an annotated example parser showing features like limiting results to " "a set of choices, specifying a *metavar* in the help screen, validating that " "one or more positional arguments is present, and making a required option::" msgstr "" -#: ../../whatsnew/3.2.rst:120 +#: ../../whatsnew/3.2.rst:119 msgid "Example of calling the parser on a command string::" msgstr "" -#: ../../whatsnew/3.2.rst:131 +#: ../../whatsnew/3.2.rst:130 msgid "Example of the parser's automatically generated help::" msgstr "" -#: ../../whatsnew/3.2.rst:150 +#: ../../whatsnew/3.2.rst:149 msgid "" "An especially nice :mod:`argparse` feature is the ability to define " "subparsers, each with their own argument patterns and help displays::" msgstr "" -#: ../../whatsnew/3.2.rst:176 +#: ../../whatsnew/3.2.rst:175 msgid ":pep:`389` - New Command Line Parsing Module" msgstr "" -#: ../../whatsnew/3.2.rst:176 +#: ../../whatsnew/3.2.rst:175 msgid "PEP written by Steven Bethard." msgstr "由 Steven Bethard 撰寫 PEP。" -#: ../../whatsnew/3.2.rst:178 +#: ../../whatsnew/3.2.rst:177 msgid "" ":ref:`upgrading-optparse-code` for details on the differences from :mod:" "`optparse`." msgstr "" -#: ../../whatsnew/3.2.rst:182 +#: ../../whatsnew/3.2.rst:181 msgid "PEP 391: Dictionary Based Configuration for Logging" msgstr "" -#: ../../whatsnew/3.2.rst:184 +#: ../../whatsnew/3.2.rst:183 msgid "" "The :mod:`logging` module provided two kinds of configuration, one style " "with function calls for each option or another style driven by an external " @@ -146,7 +145,7 @@ msgid "" "logger options from a command line." msgstr "" -#: ../../whatsnew/3.2.rst:191 +#: ../../whatsnew/3.2.rst:190 msgid "" "To support a more flexible style, the module now offers :func:`logging." "config.dictConfig` for specifying logging configuration with plain Python " @@ -155,25 +154,25 @@ msgid "" "dictionary::" msgstr "" -#: ../../whatsnew/3.2.rst:215 +#: ../../whatsnew/3.2.rst:214 msgid "" "If that dictionary is stored in a file called :file:`conf.json`, it can be " "loaded and called with code like this::" msgstr "" -#: ../../whatsnew/3.2.rst:230 +#: ../../whatsnew/3.2.rst:229 msgid ":pep:`391` - Dictionary Based Configuration for Logging" msgstr "" -#: ../../whatsnew/3.2.rst:231 +#: ../../whatsnew/3.2.rst:230 msgid "PEP written by Vinay Sajip." msgstr "由 Vinay Sajip 撰寫 PEP。" -#: ../../whatsnew/3.2.rst:235 +#: ../../whatsnew/3.2.rst:234 msgid "PEP 3148: The ``concurrent.futures`` module" msgstr "" -#: ../../whatsnew/3.2.rst:237 +#: ../../whatsnew/3.2.rst:236 msgid "" "Code for creating and managing concurrency is being collected in a new top-" "level namespace, *concurrent*. Its first member is a *futures* package " @@ -181,7 +180,7 @@ msgid "" "processes." msgstr "" -#: ../../whatsnew/3.2.rst:241 +#: ../../whatsnew/3.2.rst:240 msgid "" "The design for :mod:`concurrent.futures` was inspired by the *java.util." "concurrent* package. In that model, a running call and its result are " @@ -191,7 +190,7 @@ msgid "" "adding callbacks, and access to results or exceptions." msgstr "" -#: ../../whatsnew/3.2.rst:248 +#: ../../whatsnew/3.2.rst:247 msgid "" "The primary offering of the new module is a pair of executor classes for " "launching and managing calls. The goal of the executors is to make it " @@ -201,7 +200,7 @@ msgid "" "processes, or remote procedure calls." msgstr "" -#: ../../whatsnew/3.2.rst:255 +#: ../../whatsnew/3.2.rst:254 msgid "" "Ideally, each application should share a single executor across multiple " "components so that process and thread limits can be centrally managed. This " @@ -209,7 +208,7 @@ msgid "" "competing strategy for resource management." msgstr "" -#: ../../whatsnew/3.2.rst:260 +#: ../../whatsnew/3.2.rst:259 msgid "" "Both classes share a common interface with three methods: :meth:`~concurrent." "futures.Executor.submit` for scheduling a callable and returning a :class:" @@ -221,38 +220,38 @@ msgid "" "futures are done executing." msgstr "" -#: ../../whatsnew/3.2.rst:269 +#: ../../whatsnew/3.2.rst:268 msgid "" "A simple of example of :class:`~concurrent.futures.ThreadPoolExecutor` is a " "launch of four parallel threads for copying files::" msgstr "" -#: ../../whatsnew/3.2.rst:282 +#: ../../whatsnew/3.2.rst:281 msgid ":pep:`3148` - Futures -- Execute Computations Asynchronously" msgstr "" -#: ../../whatsnew/3.2.rst:282 +#: ../../whatsnew/3.2.rst:281 msgid "PEP written by Brian Quinlan." msgstr "由 Brian Quinlan 撰寫 PEP。" -#: ../../whatsnew/3.2.rst:284 +#: ../../whatsnew/3.2.rst:283 msgid "" ":ref:`Code for Threaded Parallel URL reads`, an " "example using threads to fetch multiple web pages in parallel." msgstr "" -#: ../../whatsnew/3.2.rst:287 +#: ../../whatsnew/3.2.rst:286 msgid "" ":ref:`Code for computing prime numbers in parallel`, an example demonstrating :class:`~concurrent.futures." "ProcessPoolExecutor`." msgstr "" -#: ../../whatsnew/3.2.rst:293 +#: ../../whatsnew/3.2.rst:292 msgid "PEP 3147: PYC Repository Directories" msgstr "" -#: ../../whatsnew/3.2.rst:295 +#: ../../whatsnew/3.2.rst:294 msgid "" "Python's scheme for caching bytecode in *.pyc* files did not work well in " "environments with multiple Python interpreters. If one interpreter " @@ -261,7 +260,7 @@ msgid "" "caching." msgstr "" -#: ../../whatsnew/3.2.rst:300 +#: ../../whatsnew/3.2.rst:299 msgid "" "The issue of \"pyc fights\" has become more pronounced as it has become " "commonplace for Linux distributions to ship with multiple versions of " @@ -269,7 +268,7 @@ msgid "" "Swallow." msgstr "" -#: ../../whatsnew/3.2.rst:304 +#: ../../whatsnew/3.2.rst:303 msgid "" "To solve this problem, Python's import machinery has been extended to use " "distinct filenames for each interpreter. Instead of Python 3.2 and Python " @@ -280,32 +279,32 @@ msgid "" "\"__pycache__\" directory stored under the package directory." msgstr "" -#: ../../whatsnew/3.2.rst:312 +#: ../../whatsnew/3.2.rst:311 msgid "" "Aside from the filenames and target directories, the new scheme has a few " "aspects that are visible to the programmer:" msgstr "" -#: ../../whatsnew/3.2.rst:315 +#: ../../whatsnew/3.2.rst:314 msgid "" "Imported modules now have a :attr:`__cached__` attribute which stores the " "name of the actual file that was imported:" msgstr "" -#: ../../whatsnew/3.2.rst:322 +#: ../../whatsnew/3.2.rst:321 msgid "" "The tag that is unique to each interpreter is accessible from the :mod:`imp` " "module:" msgstr "" -#: ../../whatsnew/3.2.rst:329 +#: ../../whatsnew/3.2.rst:328 msgid "" "Scripts that try to deduce source filename from the imported file now need " "to be smarter. It is no longer sufficient to simply strip the \"c\" from a " "\".pyc\" filename. Instead, use the new functions in the :mod:`imp` module:" msgstr "" -#: ../../whatsnew/3.2.rst:338 +#: ../../whatsnew/3.2.rst:337 msgid "" "The :mod:`py_compile` and :mod:`compileall` modules have been updated to " "reflect the new naming convention and target directory. The command-line " @@ -314,7 +313,7 @@ msgid "" "be written to their legacy location rather than *__pycache__*." msgstr "" -#: ../../whatsnew/3.2.rst:345 +#: ../../whatsnew/3.2.rst:344 msgid "" "The :mod:`importlib.abc` module has been updated with new :term:`abstract " "base classes ` for loading bytecode files. The " @@ -323,26 +322,26 @@ msgid "" "compatible are included with the documentation)." msgstr "" -#: ../../whatsnew/3.2.rst:353 +#: ../../whatsnew/3.2.rst:352 msgid ":pep:`3147` - PYC Repository Directories" msgstr "" -#: ../../whatsnew/3.2.rst:354 ../../whatsnew/3.2.rst:385 +#: ../../whatsnew/3.2.rst:353 ../../whatsnew/3.2.rst:384 msgid "PEP written by Barry Warsaw." msgstr "由 Barry Warsaw 撰寫 PEP。" -#: ../../whatsnew/3.2.rst:358 +#: ../../whatsnew/3.2.rst:357 msgid "PEP 3149: ABI Version Tagged .so Files" msgstr "" -#: ../../whatsnew/3.2.rst:360 +#: ../../whatsnew/3.2.rst:359 msgid "" "The PYC repository directory allows multiple bytecode cache files to be co-" "located. This PEP implements a similar mechanism for shared object files by " "giving them a common directory and distinct names for each version." msgstr "" -#: ../../whatsnew/3.2.rst:364 +#: ../../whatsnew/3.2.rst:363 msgid "" "The common directory is \"pyshared\" and the file names are made distinct by " "identifying the Python implementation (such as CPython, PyPy, Jython, etc.), " @@ -352,21 +351,21 @@ msgid "" "installed::" msgstr "" -#: ../../whatsnew/3.2.rst:373 +#: ../../whatsnew/3.2.rst:372 msgid "" "In Python itself, the tags are accessible from functions in the :mod:" "`sysconfig` module::" msgstr "" -#: ../../whatsnew/3.2.rst:384 +#: ../../whatsnew/3.2.rst:383 msgid ":pep:`3149` - ABI Version Tagged .so Files" msgstr "" -#: ../../whatsnew/3.2.rst:389 +#: ../../whatsnew/3.2.rst:388 msgid "PEP 3333: Python Web Server Gateway Interface v1.0.1" msgstr "" -#: ../../whatsnew/3.2.rst:391 +#: ../../whatsnew/3.2.rst:390 msgid "" "This informational PEP clarifies how bytes/text issues are to be handled by " "the WSGI protocol. The challenge is that string handling in Python 3 is " @@ -374,14 +373,14 @@ msgid "" "protocol is itself bytes oriented." msgstr "" -#: ../../whatsnew/3.2.rst:396 +#: ../../whatsnew/3.2.rst:395 msgid "" "The PEP differentiates so-called *native strings* that are used for request/" "response headers and metadata versus *byte strings* which are used for the " "bodies of requests and responses." msgstr "" -#: ../../whatsnew/3.2.rst:400 +#: ../../whatsnew/3.2.rst:399 msgid "" "The *native strings* are always of type :class:`str` but are restricted to " "code points between *U+0000* through *U+00FF* which are translatable to " @@ -392,18 +391,18 @@ msgid "" "use :rfc:`2047` MIME encoding." msgstr "" -#: ../../whatsnew/3.2.rst:408 +#: ../../whatsnew/3.2.rst:407 msgid "" "For developers porting WSGI applications from Python 2, here are the salient " "points:" msgstr "" -#: ../../whatsnew/3.2.rst:411 +#: ../../whatsnew/3.2.rst:410 msgid "" "If the app already used strings for headers in Python 2, no change is needed." msgstr "" -#: ../../whatsnew/3.2.rst:413 +#: ../../whatsnew/3.2.rst:412 msgid "" "If instead, the app encoded output headers or decoded input headers, then " "the headers will need to be re-encoded to Latin-1. For example, an output " @@ -411,14 +410,14 @@ msgid "" "from bytes to native strings using ``h.encode('utf-8').decode('latin-1')``." msgstr "" -#: ../../whatsnew/3.2.rst:418 +#: ../../whatsnew/3.2.rst:417 msgid "" "Values yielded by an application or sent using the :meth:`write` method must " "be byte strings. The :func:`start_response` function and environ must use " "native strings. The two cannot be mixed." msgstr "" -#: ../../whatsnew/3.2.rst:422 +#: ../../whatsnew/3.2.rst:421 msgid "" "For server implementers writing CGI-to-WSGI pathways or other CGI-style " "protocols, the users must to be able access the environment using native " @@ -429,23 +428,23 @@ msgid "" "dictionary." msgstr "" -#: ../../whatsnew/3.2.rst:431 +#: ../../whatsnew/3.2.rst:430 msgid ":pep:`3333` - Python Web Server Gateway Interface v1.0.1" msgstr "" -#: ../../whatsnew/3.2.rst:432 +#: ../../whatsnew/3.2.rst:431 msgid "PEP written by Phillip Eby." msgstr "由 Phillip Eby 撰寫 PEP。" -#: ../../whatsnew/3.2.rst:436 +#: ../../whatsnew/3.2.rst:435 msgid "Other Language Changes" msgstr "" -#: ../../whatsnew/3.2.rst:438 +#: ../../whatsnew/3.2.rst:437 msgid "Some smaller changes made to the core Python language are:" msgstr "" -#: ../../whatsnew/3.2.rst:440 +#: ../../whatsnew/3.2.rst:439 msgid "" "String formatting for :func:`format` and :meth:`str.format` gained new " "capabilities for the format character **#**. Previously, for integers in " @@ -455,12 +454,12 @@ msgid "" "digits follow it." msgstr "" -#: ../../whatsnew/3.2.rst:452 +#: ../../whatsnew/3.2.rst:451 msgid "" "(Suggested by Mark Dickinson and implemented by Eric Smith in :issue:`7094`.)" msgstr "" -#: ../../whatsnew/3.2.rst:454 +#: ../../whatsnew/3.2.rst:453 msgid "" "There is also a new :meth:`str.format_map` method that extends the " "capabilities of the existing :meth:`str.format` method by accepting " @@ -472,13 +471,13 @@ msgid "" "meth:`__missing__` method for unknown keys::" msgstr "" -#: ../../whatsnew/3.2.rst:481 +#: ../../whatsnew/3.2.rst:480 msgid "" "(Suggested by Raymond Hettinger and implemented by Eric Smith in :issue:" "`6081`.)" msgstr "" -#: ../../whatsnew/3.2.rst:484 +#: ../../whatsnew/3.2.rst:483 msgid "" "The interpreter can now be started with a quiet option, ``-q``, to prevent " "the copyright and version information from being displayed in the " @@ -486,11 +485,11 @@ msgid "" "flags` attribute:" msgstr "" -#: ../../whatsnew/3.2.rst:496 +#: ../../whatsnew/3.2.rst:495 msgid "(Contributed by Marcin Wojdyr in :issue:`1772833`)." msgstr "" -#: ../../whatsnew/3.2.rst:498 +#: ../../whatsnew/3.2.rst:497 msgid "" "The :func:`hasattr` function works by calling :func:`getattr` and detecting " "whether an exception is raised. This technique allows it to detect methods " @@ -501,12 +500,12 @@ msgid "" "exceptions pass through::" msgstr "" -#: ../../whatsnew/3.2.rst:517 +#: ../../whatsnew/3.2.rst:516 msgid "" "(Discovered by Yury Selivanov and fixed by Benjamin Peterson; :issue:`9666`.)" msgstr "" -#: ../../whatsnew/3.2.rst:519 +#: ../../whatsnew/3.2.rst:518 msgid "" "The :func:`str` of a float or complex number is now the same as its :func:" "`repr`. Previously, the :func:`str` form was shorter but that just caused " @@ -514,11 +513,11 @@ msgid "" "`repr` is displayed by default:" msgstr "" -#: ../../whatsnew/3.2.rst:530 +#: ../../whatsnew/3.2.rst:529 msgid "(Proposed and implemented by Mark Dickinson; :issue:`9337`.)" msgstr "" -#: ../../whatsnew/3.2.rst:532 +#: ../../whatsnew/3.2.rst:531 msgid "" ":class:`memoryview` objects now have a :meth:`~memoryview.release()` method " "and they also now support the context management protocol. This allows " @@ -526,28 +525,28 @@ msgid "" "from the original object." msgstr "" -#: ../../whatsnew/3.2.rst:541 +#: ../../whatsnew/3.2.rst:540 msgid "(Added by Antoine Pitrou; :issue:`9757`.)" msgstr "" -#: ../../whatsnew/3.2.rst:543 +#: ../../whatsnew/3.2.rst:542 msgid "" "Previously it was illegal to delete a name from the local namespace if it " "occurs as a free variable in a nested block::" msgstr "" -#: ../../whatsnew/3.2.rst:552 +#: ../../whatsnew/3.2.rst:551 msgid "" "This is now allowed. Remember that the target of an :keyword:`except` " "clause is cleared, so this code which used to work with Python 2.6, raised " "a :exc:`SyntaxError` with Python 3.1 and now works again::" msgstr "" -#: ../../whatsnew/3.2.rst:565 +#: ../../whatsnew/3.2.rst:564 msgid "(See :issue:`4617`.)" msgstr "(請見 :issue:`4617`\\ 。)" -#: ../../whatsnew/3.2.rst:567 +#: ../../whatsnew/3.2.rst:566 msgid "" "The internal :c:type:`structsequence` tool now creates subclasses of tuple. " "This means that C structures like those returned by :func:`os.stat`, :func:" @@ -557,25 +556,25 @@ msgid "" "as their pure Python counterparts:" msgstr "" -#: ../../whatsnew/3.2.rst:580 +#: ../../whatsnew/3.2.rst:579 msgid "" "(Suggested by Arfrever Frehtes Taifersar Arahesis and implemented by " "Benjamin Peterson in :issue:`8413`.)" msgstr "" -#: ../../whatsnew/3.2.rst:583 +#: ../../whatsnew/3.2.rst:582 msgid "" "Warnings are now easier to control using the :envvar:`PYTHONWARNINGS` " "environment variable as an alternative to using ``-W`` at the command line:" msgstr "" -#: ../../whatsnew/3.2.rst:590 +#: ../../whatsnew/3.2.rst:589 msgid "" "(Suggested by Barry Warsaw and implemented by Philip Jenvey in :issue:" "`7301`.)" msgstr "" -#: ../../whatsnew/3.2.rst:592 +#: ../../whatsnew/3.2.rst:591 msgid "" "A new warning category, :exc:`ResourceWarning`, has been added. It is " "emitted when potential issues with resource consumption or cleanup are " @@ -584,7 +583,7 @@ msgid "" "command line." msgstr "" -#: ../../whatsnew/3.2.rst:598 +#: ../../whatsnew/3.2.rst:597 msgid "" "A :exc:`ResourceWarning` is issued at interpreter shutdown if the :data:`gc." "garbage` list isn't empty, and if :attr:`gc.DEBUG_UNCOLLECTABLE` is set, all " @@ -592,7 +591,7 @@ msgid "" "aware that their code contains object finalization issues." msgstr "" -#: ../../whatsnew/3.2.rst:603 +#: ../../whatsnew/3.2.rst:602 msgid "" "A :exc:`ResourceWarning` is also issued when a :term:`file object` is " "destroyed without having been explicitly closed. While the deallocator for " @@ -602,13 +601,13 @@ msgid "" "enabling the warning from the command line:" msgstr "" -#: ../../whatsnew/3.2.rst:617 +#: ../../whatsnew/3.2.rst:616 msgid "" "(Added by Antoine Pitrou and Georg Brandl in :issue:`10093` and :issue:" "`477863`.)" msgstr "" -#: ../../whatsnew/3.2.rst:619 +#: ../../whatsnew/3.2.rst:618 msgid "" ":class:`range` objects now support *index* and *count* methods. This is part " "of an effort to make more objects fully implement the :class:`collections." @@ -618,45 +617,45 @@ msgid "" "This makes *range* more interoperable with lists::" msgstr "" -#: ../../whatsnew/3.2.rst:635 +#: ../../whatsnew/3.2.rst:634 msgid "" "(Contributed by Daniel Stutzbach in :issue:`9213`, by Alexander Belopolsky " "in :issue:`2690`, and by Nick Coghlan in :issue:`10889`.)" msgstr "" -#: ../../whatsnew/3.2.rst:638 +#: ../../whatsnew/3.2.rst:637 msgid "" "The :func:`callable` builtin function from Py2.x was resurrected. It " "provides a concise, readable alternative to using an :term:`abstract base " "class` in an expression like ``isinstance(x, collections.Callable)``:" msgstr "" -#: ../../whatsnew/3.2.rst:647 +#: ../../whatsnew/3.2.rst:646 msgid "(See :issue:`10518`.)" msgstr "(請見 :issue:`10518`\\ 。)" -#: ../../whatsnew/3.2.rst:649 +#: ../../whatsnew/3.2.rst:648 msgid "" "Python's import mechanism can now load modules installed in directories with " "non-ASCII characters in the path name. This solved an aggravating problem " "with home directories for users with non-ASCII characters in their usernames." msgstr "" -#: ../../whatsnew/3.2.rst:653 +#: ../../whatsnew/3.2.rst:652 msgid "(Required extensive work by Victor Stinner in :issue:`9425`.)" msgstr "" -#: ../../whatsnew/3.2.rst:657 +#: ../../whatsnew/3.2.rst:656 msgid "New, Improved, and Deprecated Modules" msgstr "" -#: ../../whatsnew/3.2.rst:659 +#: ../../whatsnew/3.2.rst:658 msgid "" "Python's standard library has undergone significant maintenance efforts and " "quality improvements." msgstr "" -#: ../../whatsnew/3.2.rst:662 +#: ../../whatsnew/3.2.rst:661 msgid "" "The biggest news for Python 3.2 is that the :mod:`email` package, :mod:" "`mailbox` module, and :mod:`nntplib` modules now work correctly with the " @@ -664,7 +663,7 @@ msgid "" "of messages with mixed encodings." msgstr "" -#: ../../whatsnew/3.2.rst:667 +#: ../../whatsnew/3.2.rst:666 msgid "" "Throughout the standard library, there has been more careful attention to " "encodings and text versus bytes issues. In particular, interactions with " @@ -672,23 +671,23 @@ msgid "" "the Windows MBCS encoding, locale-aware encodings, or UTF-8." msgstr "" -#: ../../whatsnew/3.2.rst:672 +#: ../../whatsnew/3.2.rst:671 msgid "" "Another significant win is the addition of substantially better support for " "*SSL* connections and security certificates." msgstr "" -#: ../../whatsnew/3.2.rst:675 +#: ../../whatsnew/3.2.rst:674 msgid "" "In addition, more classes now implement a :term:`context manager` to support " "convenient and reliable resource clean-up using a :keyword:`with` statement." msgstr "" -#: ../../whatsnew/3.2.rst:679 +#: ../../whatsnew/3.2.rst:678 msgid "email" msgstr "email" -#: ../../whatsnew/3.2.rst:681 +#: ../../whatsnew/3.2.rst:680 msgid "" "The usability of the :mod:`email` package in Python 3 has been mostly fixed " "by the extensive efforts of R. David Murray. The problem was that emails " @@ -698,7 +697,7 @@ msgid "" "messages in bytes format." msgstr "" -#: ../../whatsnew/3.2.rst:688 +#: ../../whatsnew/3.2.rst:687 msgid "" "New functions :func:`~email.message_from_bytes` and :func:`~email." "message_from_binary_file`, and new classes :class:`~email.parser." @@ -706,7 +705,7 @@ msgid "" "data to be parsed into model objects." msgstr "" -#: ../../whatsnew/3.2.rst:693 +#: ../../whatsnew/3.2.rst:692 msgid "" "Given bytes input to the model, :meth:`~email.message.Message.get_payload` " "will by default decode a message body that has a :mailheader:`Content-" @@ -714,20 +713,20 @@ msgid "" "and return the resulting string." msgstr "" -#: ../../whatsnew/3.2.rst:698 +#: ../../whatsnew/3.2.rst:697 msgid "" "Given bytes input to the model, :class:`~email.generator.Generator` will " "convert message bodies that have a :mailheader:`Content-Transfer-Encoding` " "of *8bit* to instead have a *7bit* :mailheader:`Content-Transfer-Encoding`." msgstr "" -#: ../../whatsnew/3.2.rst:702 +#: ../../whatsnew/3.2.rst:701 msgid "" "Headers with unencoded non-ASCII bytes are deemed to be :rfc:`2047`\\ -" "encoded using the *unknown-8bit* character set." msgstr "" -#: ../../whatsnew/3.2.rst:705 +#: ../../whatsnew/3.2.rst:704 msgid "" "A new class :class:`~email.generator.BytesGenerator` produces bytes as " "output, preserving any unchanged non-ASCII data that was present in the " @@ -735,7 +734,7 @@ msgid "" "`Content-Transfer-Encoding` of *8bit*." msgstr "" -#: ../../whatsnew/3.2.rst:710 +#: ../../whatsnew/3.2.rst:709 msgid "" "The :mod:`smtplib` :class:`~smtplib.SMTP` class now accepts a byte string " "for the *msg* argument to the :meth:`~smtplib.SMTP.sendmail` method, and a " @@ -744,126 +743,126 @@ msgid "" "*to_addrs* addresses directly from the object." msgstr "" -#: ../../whatsnew/3.2.rst:716 +#: ../../whatsnew/3.2.rst:715 msgid "" "(Proposed and implemented by R. David Murray, :issue:`4661` and :issue:" "`10321`.)" msgstr "" -#: ../../whatsnew/3.2.rst:719 +#: ../../whatsnew/3.2.rst:718 msgid "elementtree" msgstr "elementtree" -#: ../../whatsnew/3.2.rst:721 +#: ../../whatsnew/3.2.rst:720 msgid "" "The :mod:`xml.etree.ElementTree` package and its :mod:`xml.etree." "cElementTree` counterpart have been updated to version 1.3." msgstr "" -#: ../../whatsnew/3.2.rst:724 +#: ../../whatsnew/3.2.rst:723 msgid "Several new and useful functions and methods have been added:" msgstr "" -#: ../../whatsnew/3.2.rst:726 +#: ../../whatsnew/3.2.rst:725 msgid "" ":func:`xml.etree.ElementTree.fromstringlist` which builds an XML document " "from a sequence of fragments" msgstr "" -#: ../../whatsnew/3.2.rst:728 +#: ../../whatsnew/3.2.rst:727 msgid "" ":func:`xml.etree.ElementTree.register_namespace` for registering a global " "namespace prefix" msgstr "" -#: ../../whatsnew/3.2.rst:730 +#: ../../whatsnew/3.2.rst:729 msgid "" ":func:`xml.etree.ElementTree.tostringlist` for string representation " "including all sublists" msgstr "" -#: ../../whatsnew/3.2.rst:732 +#: ../../whatsnew/3.2.rst:731 msgid "" ":meth:`xml.etree.ElementTree.Element.extend` for appending a sequence of " "zero or more elements" msgstr "" -#: ../../whatsnew/3.2.rst:734 +#: ../../whatsnew/3.2.rst:733 msgid "" ":meth:`xml.etree.ElementTree.Element.iterfind` searches an element and " "subelements" msgstr "" -#: ../../whatsnew/3.2.rst:736 +#: ../../whatsnew/3.2.rst:735 msgid "" ":meth:`xml.etree.ElementTree.Element.itertext` creates a text iterator over " "an element and its subelements" msgstr "" -#: ../../whatsnew/3.2.rst:738 +#: ../../whatsnew/3.2.rst:737 msgid "" ":meth:`xml.etree.ElementTree.TreeBuilder.end` closes the current element" msgstr "" -#: ../../whatsnew/3.2.rst:739 +#: ../../whatsnew/3.2.rst:738 msgid "" ":meth:`xml.etree.ElementTree.TreeBuilder.doctype` handles a doctype " "declaration" msgstr "" -#: ../../whatsnew/3.2.rst:742 +#: ../../whatsnew/3.2.rst:741 msgid "Two methods have been deprecated:" msgstr "" -#: ../../whatsnew/3.2.rst:744 +#: ../../whatsnew/3.2.rst:743 msgid ":meth:`xml.etree.ElementTree.getchildren` use ``list(elem)`` instead." msgstr "" -#: ../../whatsnew/3.2.rst:745 +#: ../../whatsnew/3.2.rst:744 msgid ":meth:`xml.etree.ElementTree.getiterator` use ``Element.iter`` instead." msgstr "" -#: ../../whatsnew/3.2.rst:747 +#: ../../whatsnew/3.2.rst:746 msgid "" "For details of the update, see `Introducing ElementTree `_ on " "Fredrik Lundh's website." msgstr "" -#: ../../whatsnew/3.2.rst:751 +#: ../../whatsnew/3.2.rst:750 msgid "(Contributed by Florent Xicluna and Fredrik Lundh, :issue:`6472`.)" msgstr "" -#: ../../whatsnew/3.2.rst:754 +#: ../../whatsnew/3.2.rst:753 msgid "functools" msgstr "functools" -#: ../../whatsnew/3.2.rst:756 +#: ../../whatsnew/3.2.rst:755 msgid "" "The :mod:`functools` module includes a new decorator for caching function " "calls. :func:`functools.lru_cache` can save repeated queries to an external " "resource whenever the results are expected to be the same." msgstr "" -#: ../../whatsnew/3.2.rst:760 +#: ../../whatsnew/3.2.rst:759 msgid "" "For example, adding a caching decorator to a database query function can " "save database accesses for popular searches:" msgstr "" -#: ../../whatsnew/3.2.rst:773 +#: ../../whatsnew/3.2.rst:772 msgid "" "To help with choosing an effective cache size, the wrapped function is " "instrumented for tracking cache statistics:" msgstr "" -#: ../../whatsnew/3.2.rst:779 +#: ../../whatsnew/3.2.rst:778 msgid "" "If the phonelist table gets updated, the outdated contents of the cache can " "be cleared with:" msgstr "" -#: ../../whatsnew/3.2.rst:784 +#: ../../whatsnew/3.2.rst:783 msgid "" "(Contributed by Raymond Hettinger and incorporating design ideas from Jim " "Baker, Miki Tebeka, and Nick Coghlan; see `recipe 498245 `_\\, :issue:`10586`, and :issue:`10593`.)" msgstr "" -#: ../../whatsnew/3.2.rst:790 +#: ../../whatsnew/3.2.rst:789 msgid "" "The :func:`functools.wraps` decorator now adds a :attr:`__wrapped__` " "attribute pointing to the original callable function. This allows wrapped " @@ -880,84 +879,84 @@ msgid "" "attr:`__doc__` which might not be defined for the wrapped callable." msgstr "" -#: ../../whatsnew/3.2.rst:796 +#: ../../whatsnew/3.2.rst:795 msgid "" "In the above example, the cache can be removed by recovering the original " "function:" msgstr "" -#: ../../whatsnew/3.2.rst:801 +#: ../../whatsnew/3.2.rst:800 msgid "" "(By Nick Coghlan and Terrence Cole; :issue:`9567`, :issue:`3445`, and :issue:" "`8814`.)" msgstr "" -#: ../../whatsnew/3.2.rst:804 +#: ../../whatsnew/3.2.rst:803 msgid "" "To help write classes with rich comparison methods, a new decorator :func:" "`functools.total_ordering` will use existing equality and inequality methods " "to fill in the remaining methods." msgstr "" -#: ../../whatsnew/3.2.rst:808 +#: ../../whatsnew/3.2.rst:807 msgid "" "For example, supplying *__eq__* and *__lt__* will enable :func:`~functools." "total_ordering` to fill-in *__le__*, *__gt__* and *__ge__*::" msgstr "" -#: ../../whatsnew/3.2.rst:821 +#: ../../whatsnew/3.2.rst:820 msgid "" "With the *total_ordering* decorator, the remaining comparison methods are " "filled in automatically." msgstr "" -#: ../../whatsnew/3.2.rst:824 ../../whatsnew/3.2.rst:836 -#: ../../whatsnew/3.2.rst:880 ../../whatsnew/3.2.rst:901 -#: ../../whatsnew/3.2.rst:915 ../../whatsnew/3.2.rst:1785 -#: ../../whatsnew/3.2.rst:1830 +#: ../../whatsnew/3.2.rst:823 ../../whatsnew/3.2.rst:835 +#: ../../whatsnew/3.2.rst:879 ../../whatsnew/3.2.rst:900 +#: ../../whatsnew/3.2.rst:914 ../../whatsnew/3.2.rst:1784 +#: ../../whatsnew/3.2.rst:1829 msgid "(Contributed by Raymond Hettinger.)" msgstr "" -#: ../../whatsnew/3.2.rst:826 +#: ../../whatsnew/3.2.rst:825 msgid "" "To aid in porting programs from Python 2, the :func:`functools.cmp_to_key` " "function converts an old-style comparison function to modern :term:`key " "function`:" msgstr "" -#: ../../whatsnew/3.2.rst:833 +#: ../../whatsnew/3.2.rst:832 msgid "" "For sorting examples and a brief sorting tutorial, see the `Sorting HowTo " "`_ tutorial." msgstr "" -#: ../../whatsnew/3.2.rst:839 +#: ../../whatsnew/3.2.rst:838 msgid "itertools" msgstr "itertools" -#: ../../whatsnew/3.2.rst:841 +#: ../../whatsnew/3.2.rst:840 msgid "" "The :mod:`itertools` module has a new :func:`~itertools.accumulate` function " "modeled on APL's *scan* operator and Numpy's *accumulate* function:" msgstr "" -#: ../../whatsnew/3.2.rst:852 +#: ../../whatsnew/3.2.rst:851 msgid "" "For an example using :func:`~itertools.accumulate`, see the :ref:`examples " "for the random module `." msgstr "" -#: ../../whatsnew/3.2.rst:855 +#: ../../whatsnew/3.2.rst:854 msgid "" "(Contributed by Raymond Hettinger and incorporating design suggestions from " "Mark Dickinson.)" msgstr "" -#: ../../whatsnew/3.2.rst:859 +#: ../../whatsnew/3.2.rst:858 msgid "collections" msgstr "collections" -#: ../../whatsnew/3.2.rst:861 +#: ../../whatsnew/3.2.rst:860 msgid "" "The :class:`collections.Counter` class now has two forms of in-place " "subtraction, the existing *-=* operator for `saturating subtraction `_ which is defined for only two threads." msgstr "" -#: ../../whatsnew/3.2.rst:930 +#: ../../whatsnew/3.2.rst:929 msgid "" "Implemented as a two-phase cyclic barrier, :class:`~threading.Barrier` " "objects are suitable for use in loops. The separate *filling* and " @@ -1024,11 +1023,11 @@ msgid "" "resets after each cycle." msgstr "" -#: ../../whatsnew/3.2.rst:935 +#: ../../whatsnew/3.2.rst:934 msgid "Example of using barriers::" msgstr "" -#: ../../whatsnew/3.2.rst:949 +#: ../../whatsnew/3.2.rst:948 msgid "" "In this example, the barrier enforces a rule that votes cannot be counted at " "any polling site until all polls are closed. Notice how a solution with a " @@ -1037,7 +1036,7 @@ msgid "" "barrier point is crossed." msgstr "" -#: ../../whatsnew/3.2.rst:955 +#: ../../whatsnew/3.2.rst:954 msgid "" "If any of the predecessor tasks can hang or be delayed, a barrier can be " "created with an optional *timeout* parameter. Then if the timeout period " @@ -1046,14 +1045,14 @@ msgid "" "exception is raised::" msgstr "" -#: ../../whatsnew/3.2.rst:971 +#: ../../whatsnew/3.2.rst:970 msgid "" "In this example, the barrier enforces a more robust rule. If some election " "sites do not finish before midnight, the barrier times-out and the ballots " "are sealed and deposited in a queue for later handling." msgstr "" -#: ../../whatsnew/3.2.rst:975 +#: ../../whatsnew/3.2.rst:974 msgid "" "See `Barrier Synchronization Patterns `_ for more examples " @@ -1063,17 +1062,17 @@ msgid "" "*section 3.6*." msgstr "" -#: ../../whatsnew/3.2.rst:981 +#: ../../whatsnew/3.2.rst:980 msgid "" "(Contributed by Kristján Valur Jónsson with an API review by Jeffrey Yasskin " "in :issue:`8777`.)" msgstr "" -#: ../../whatsnew/3.2.rst:985 +#: ../../whatsnew/3.2.rst:984 msgid "datetime and time" msgstr "datetime 和 time" -#: ../../whatsnew/3.2.rst:987 +#: ../../whatsnew/3.2.rst:986 msgid "" "The :mod:`datetime` module has a new type :class:`~datetime.timezone` that " "implements the :class:`~datetime.tzinfo` interface by returning a fixed UTC " @@ -1081,20 +1080,20 @@ msgid "" "datetime objects::" msgstr "" -#: ../../whatsnew/3.2.rst:1000 +#: ../../whatsnew/3.2.rst:999 msgid "" "Also, :class:`~datetime.timedelta` objects can now be multiplied by :class:" "`float` and divided by :class:`float` and :class:`int` objects. And :class:" "`~datetime.timedelta` objects can now divide one another." msgstr "" -#: ../../whatsnew/3.2.rst:1004 +#: ../../whatsnew/3.2.rst:1003 msgid "" "The :meth:`datetime.date.strftime` method is no longer restricted to years " "after 1900. The new supported year range is from 1000 to 9999 inclusive." msgstr "" -#: ../../whatsnew/3.2.rst:1007 +#: ../../whatsnew/3.2.rst:1006 msgid "" "Whenever a two-digit year is used in a time tuple, the interpretation has " "been governed by :attr:`time.accept2dyear`. The default is ``True`` which " @@ -1102,7 +1101,7 @@ msgid "" "POSIX rules governing the ``%y`` strptime format." msgstr "" -#: ../../whatsnew/3.2.rst:1012 +#: ../../whatsnew/3.2.rst:1011 msgid "" "Starting with Py3.2, use of the century guessing heuristic will emit a :exc:" "`DeprecationWarning`. Instead, it is recommended that :attr:`time." @@ -1110,7 +1109,7 @@ msgid "" "without guesswork::" msgstr "" -#: ../../whatsnew/3.2.rst:1031 +#: ../../whatsnew/3.2.rst:1030 msgid "" "Several functions now have significantly expanded date ranges. When :attr:" "`time.accept2dyear` is false, the :func:`time.asctime` function will accept " @@ -1119,45 +1118,45 @@ msgid "" "corresponding operating system functions." msgstr "" -#: ../../whatsnew/3.2.rst:1037 +#: ../../whatsnew/3.2.rst:1036 msgid "" "(Contributed by Alexander Belopolsky and Victor Stinner in :issue:" "`1289118`, :issue:`5094`, :issue:`6641`, :issue:`2706`, :issue:`1777412`, :" "issue:`8013`, and :issue:`10827`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1044 +#: ../../whatsnew/3.2.rst:1043 msgid "math" msgstr "math" -#: ../../whatsnew/3.2.rst:1046 +#: ../../whatsnew/3.2.rst:1045 msgid "" "The :mod:`math` module has been updated with six new functions inspired by " "the C99 standard." msgstr "" -#: ../../whatsnew/3.2.rst:1049 +#: ../../whatsnew/3.2.rst:1048 msgid "" "The :func:`~math.isfinite` function provides a reliable and fast way to " "detect special values. It returns ``True`` for regular numbers and " "``False`` for *Nan* or *Infinity*:" msgstr "" -#: ../../whatsnew/3.2.rst:1057 +#: ../../whatsnew/3.2.rst:1056 msgid "" "The :func:`~math.expm1` function computes ``e**x-1`` for small values of *x* " "without incurring the loss of precision that usually accompanies the " "subtraction of nearly equal quantities:" msgstr "" -#: ../../whatsnew/3.2.rst:1065 +#: ../../whatsnew/3.2.rst:1064 msgid "" "The :func:`~math.erf` function computes a probability integral or `Gaussian " "error function `_. The " "complementary error function, :func:`~math.erfc`, is ``1 - erf(x)``:" msgstr "" -#: ../../whatsnew/3.2.rst:1080 +#: ../../whatsnew/3.2.rst:1079 msgid "" "The :func:`~math.gamma` function is a continuous extension of the factorial " "function. See https://en.wikipedia.org/wiki/Gamma_function for details. " @@ -1166,36 +1165,36 @@ msgid "" "computing the natural logarithm of the gamma function:" msgstr "" -#: ../../whatsnew/3.2.rst:1092 +#: ../../whatsnew/3.2.rst:1091 msgid "(Contributed by Mark Dickinson.)" msgstr "" -#: ../../whatsnew/3.2.rst:1095 +#: ../../whatsnew/3.2.rst:1094 msgid "abc" msgstr "abc" -#: ../../whatsnew/3.2.rst:1097 +#: ../../whatsnew/3.2.rst:1096 msgid "" "The :mod:`abc` module now supports :func:`~abc.abstractclassmethod` and :" "func:`~abc.abstractstaticmethod`." msgstr "" -#: ../../whatsnew/3.2.rst:1100 +#: ../../whatsnew/3.2.rst:1099 msgid "" "These tools make it possible to define an :term:`abstract base class` that " "requires a particular :func:`classmethod` or :func:`staticmethod` to be " "implemented::" msgstr "" -#: ../../whatsnew/3.2.rst:1112 +#: ../../whatsnew/3.2.rst:1111 msgid "(Patch submitted by Daniel Urban; :issue:`5867`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1115 +#: ../../whatsnew/3.2.rst:1114 msgid "io" msgstr "io" -#: ../../whatsnew/3.2.rst:1117 +#: ../../whatsnew/3.2.rst:1116 msgid "" "The :class:`io.BytesIO` has a new method, :meth:`~io.BytesIO.getbuffer`, " "which provides functionality similar to :func:`memoryview`. It creates an " @@ -1203,15 +1202,15 @@ msgid "" "and support for slice notation are well-suited to in-place editing::" msgstr "" -#: ../../whatsnew/3.2.rst:1143 +#: ../../whatsnew/3.2.rst:1142 msgid "(Contributed by Antoine Pitrou in :issue:`5506`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1146 +#: ../../whatsnew/3.2.rst:1145 msgid "reprlib" msgstr "reprlib" -#: ../../whatsnew/3.2.rst:1148 +#: ../../whatsnew/3.2.rst:1147 msgid "" "When writing a :meth:`__repr__` method for a custom container, it is easy to " "forget to handle the case where a member refers back to the container " @@ -1220,28 +1219,28 @@ msgid "" "representation string." msgstr "" -#: ../../whatsnew/3.2.rst:1154 +#: ../../whatsnew/3.2.rst:1153 msgid "" "To help write such :meth:`__repr__` methods, the :mod:`reprlib` module has a " "new decorator, :func:`~reprlib.recursive_repr`, for detecting recursive " "calls to :meth:`__repr__` and substituting a placeholder string instead::" msgstr "" -#: ../../whatsnew/3.2.rst:1169 +#: ../../whatsnew/3.2.rst:1168 msgid "(Contributed by Raymond Hettinger in :issue:`9826` and :issue:`9840`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1172 +#: ../../whatsnew/3.2.rst:1171 msgid "logging" msgstr "logging" -#: ../../whatsnew/3.2.rst:1174 +#: ../../whatsnew/3.2.rst:1173 msgid "" "In addition to dictionary-based configuration described above, the :mod:" "`logging` package has many other improvements." msgstr "" -#: ../../whatsnew/3.2.rst:1177 +#: ../../whatsnew/3.2.rst:1176 msgid "" "The logging documentation has been augmented by a :ref:`basic tutorial " "`\\, an :ref:`advanced tutorial ` for zipfiles, uncompressed tarfiles, " @@ -1666,7 +1665,7 @@ msgid "" "tarfiles or custom formats)." msgstr "" -#: ../../whatsnew/3.2.rst:1558 +#: ../../whatsnew/3.2.rst:1557 msgid "" "The principal functions are :func:`~shutil.make_archive` and :func:`~shutil." "unpack_archive`. By default, both operate on the current directory (which " @@ -1675,23 +1674,23 @@ msgid "" "non-destructive (the original files are left unchanged)." msgstr "" -#: ../../whatsnew/3.2.rst:1592 +#: ../../whatsnew/3.2.rst:1591 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.2.rst:1594 +#: ../../whatsnew/3.2.rst:1593 msgid "" "The :mod:`sqlite3` module was updated to pysqlite version 2.6.0. It has two " "new capabilities." msgstr "" -#: ../../whatsnew/3.2.rst:1596 +#: ../../whatsnew/3.2.rst:1595 msgid "" "The :attr:`sqlite3.Connection.in_transit` attribute is true if there is an " "active transaction for uncommitted changes." msgstr "" -#: ../../whatsnew/3.2.rst:1599 +#: ../../whatsnew/3.2.rst:1598 msgid "" "The :meth:`sqlite3.Connection.enable_load_extension` and :meth:`sqlite3." "Connection.load_extension` methods allows you to load SQLite extensions from " @@ -1699,30 +1698,30 @@ msgid "" "distributed with SQLite." msgstr "" -#: ../../whatsnew/3.2.rst:1604 +#: ../../whatsnew/3.2.rst:1603 msgid "(Contributed by R. David Murray and Shashwat Anand; :issue:`8845`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1607 +#: ../../whatsnew/3.2.rst:1606 msgid "html" msgstr "html" -#: ../../whatsnew/3.2.rst:1609 +#: ../../whatsnew/3.2.rst:1608 msgid "" "A new :mod:`html` module was introduced with only a single function, :func:" "`~html.escape`, which is used for escaping reserved characters from HTML " "markup:" msgstr "" -#: ../../whatsnew/3.2.rst:1618 +#: ../../whatsnew/3.2.rst:1617 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.2.rst:1620 +#: ../../whatsnew/3.2.rst:1619 msgid "The :mod:`socket` module has two new improvements." msgstr "" -#: ../../whatsnew/3.2.rst:1622 +#: ../../whatsnew/3.2.rst:1621 msgid "" "Socket objects now have a :meth:`~socket.socket.detach()` method which puts " "the socket into closed state without actually closing the underlying file " @@ -1730,24 +1729,24 @@ msgid "" "Antoine Pitrou; :issue:`8524`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1627 +#: ../../whatsnew/3.2.rst:1626 msgid "" ":func:`socket.create_connection` now supports the context management " "protocol to unconditionally consume :exc:`socket.error` exceptions and to " "close the socket when done. (Contributed by Giampaolo Rodolà; :issue:`9794`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1633 +#: ../../whatsnew/3.2.rst:1632 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.2.rst:1635 +#: ../../whatsnew/3.2.rst:1634 msgid "" "The :mod:`ssl` module added a number of features to satisfy common " "requirements for secure (encrypted, authenticated) internet connections:" msgstr "" -#: ../../whatsnew/3.2.rst:1638 +#: ../../whatsnew/3.2.rst:1637 msgid "" "A new class, :class:`~ssl.SSLContext`, serves as a container for persistent " "SSL data, such as protocol settings, certificates, private keys, and various " @@ -1755,22 +1754,22 @@ msgid "" "creating an SSL socket from an SSL context." msgstr "" -#: ../../whatsnew/3.2.rst:1643 +#: ../../whatsnew/3.2.rst:1642 msgid "" "A new function, :func:`ssl.match_hostname`, supports server identity " "verification for higher-level protocols by implementing the rules of HTTPS " "(from :rfc:`2818`) which are also suitable for other protocols." msgstr "" -#: ../../whatsnew/3.2.rst:1647 +#: ../../whatsnew/3.2.rst:1646 msgid "" "The :func:`ssl.wrap_socket` constructor function now takes a *ciphers* " "argument. The *ciphers* string lists the allowed encryption algorithms " "using the format described in the `OpenSSL documentation `__." +"openssl.org/docs/man1.0.2/man1/ciphers.html#CIPHER-LIST-FORMAT>`__." msgstr "" -#: ../../whatsnew/3.2.rst:1652 +#: ../../whatsnew/3.2.rst:1651 msgid "" "When linked against recent versions of OpenSSL, the :mod:`ssl` module now " "supports the Server Name Indication extension to the TLS protocol, allowing " @@ -1779,20 +1778,20 @@ msgid "" "the *server_hostname* argument to :meth:`ssl.SSLContext.wrap_socket`." msgstr "" -#: ../../whatsnew/3.2.rst:1658 +#: ../../whatsnew/3.2.rst:1657 msgid "" "Various options have been added to the :mod:`ssl` module, such as :data:" "`~ssl.OP_NO_SSLv2` which disables the insecure and obsolete SSLv2 protocol." msgstr "" -#: ../../whatsnew/3.2.rst:1662 +#: ../../whatsnew/3.2.rst:1661 msgid "" "The extension now loads all the OpenSSL ciphers and digest algorithms. If " "some SSL certificates cannot be verified, they are reported as an \"unknown " "algorithm\" error." msgstr "" -#: ../../whatsnew/3.2.rst:1666 +#: ../../whatsnew/3.2.rst:1665 msgid "" "The version of OpenSSL being used is now accessible using the module " "attributes :data:`ssl.OPENSSL_VERSION` (a string), :data:`ssl." @@ -1800,17 +1799,17 @@ msgid "" "(an integer)." msgstr "" -#: ../../whatsnew/3.2.rst:1671 +#: ../../whatsnew/3.2.rst:1670 msgid "" "(Contributed by Antoine Pitrou in :issue:`8850`, :issue:`1589`, :issue:" "`8322`, :issue:`5639`, :issue:`4870`, :issue:`8484`, and :issue:`8321`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1675 +#: ../../whatsnew/3.2.rst:1674 msgid "nntp" msgstr "nntp" -#: ../../whatsnew/3.2.rst:1677 +#: ../../whatsnew/3.2.rst:1676 msgid "" "The :mod:`nntplib` module has a revamped implementation with better bytes " "and text semantics as well as more practical APIs. These improvements break " @@ -1818,24 +1817,24 @@ msgid "" "dysfunctional in itself." msgstr "" -#: ../../whatsnew/3.2.rst:1682 +#: ../../whatsnew/3.2.rst:1681 msgid "" "Support for secure connections through both implicit (using :class:`nntplib." "NNTP_SSL`) and explicit (using :meth:`nntplib.NNTP.starttls`) TLS has also " "been added." msgstr "" -#: ../../whatsnew/3.2.rst:1686 +#: ../../whatsnew/3.2.rst:1685 msgid "" "(Contributed by Antoine Pitrou in :issue:`9360` and Andrew Vant in :issue:" "`1926`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1689 +#: ../../whatsnew/3.2.rst:1688 msgid "certificates" msgstr "certificates" -#: ../../whatsnew/3.2.rst:1691 +#: ../../whatsnew/3.2.rst:1690 msgid "" ":class:`http.client.HTTPSConnection`, :class:`urllib.request.HTTPSHandler` " "and :func:`urllib.request.urlopen` now take optional arguments to allow for " @@ -1843,49 +1842,49 @@ msgid "" "recommended in public uses of HTTPS." msgstr "" -#: ../../whatsnew/3.2.rst:1696 +#: ../../whatsnew/3.2.rst:1695 msgid "(Added by Antoine Pitrou, :issue:`9003`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1699 +#: ../../whatsnew/3.2.rst:1698 msgid "imaplib" msgstr "imaplib" -#: ../../whatsnew/3.2.rst:1701 +#: ../../whatsnew/3.2.rst:1700 msgid "" "Support for explicit TLS on standard IMAP4 connections has been added " "through the new :mod:`imaplib.IMAP4.starttls` method." msgstr "" -#: ../../whatsnew/3.2.rst:1704 +#: ../../whatsnew/3.2.rst:1703 msgid "(Contributed by Lorenzo M. Catucci and Antoine Pitrou, :issue:`4471`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1707 +#: ../../whatsnew/3.2.rst:1706 msgid "http.client" msgstr "http.client" -#: ../../whatsnew/3.2.rst:1709 +#: ../../whatsnew/3.2.rst:1708 msgid "" "There were a number of small API improvements in the :mod:`http.client` " "module. The old-style HTTP 0.9 simple responses are no longer supported and " "the *strict* parameter is deprecated in all classes." msgstr "" -#: ../../whatsnew/3.2.rst:1713 +#: ../../whatsnew/3.2.rst:1712 msgid "" "The :class:`~http.client.HTTPConnection` and :class:`~http.client." "HTTPSConnection` classes now have a *source_address* parameter for a (host, " "port) tuple indicating where the HTTP connection is made from." msgstr "" -#: ../../whatsnew/3.2.rst:1718 +#: ../../whatsnew/3.2.rst:1717 msgid "" "Support for certificate checking and HTTPS virtual hosts were added to :" "class:`~http.client.HTTPSConnection`." msgstr "" -#: ../../whatsnew/3.2.rst:1721 +#: ../../whatsnew/3.2.rst:1720 msgid "" "The :meth:`~http.client.HTTPConnection.request` method on connection objects " "allowed an optional *body* argument so that a :term:`file object` could be " @@ -1895,14 +1894,14 @@ msgid "" "flexible than before." msgstr "" -#: ../../whatsnew/3.2.rst:1728 +#: ../../whatsnew/3.2.rst:1727 msgid "" "To establish an HTTPS connection through a proxy server, there is a new :" "meth:`~http.client.HTTPConnection.set_tunnel` method that sets the host and " "port for HTTP Connect tunneling." msgstr "" -#: ../../whatsnew/3.2.rst:1732 +#: ../../whatsnew/3.2.rst:1731 msgid "" "To match the behavior of :mod:`http.server`, the HTTP client library now " "also encodes headers with ISO-8859-1 (Latin-1) encoding. It was already " @@ -1911,11 +1910,11 @@ msgid "" "`10980`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1738 +#: ../../whatsnew/3.2.rst:1737 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.2.rst:1740 +#: ../../whatsnew/3.2.rst:1739 msgid "" "The unittest module has a number of improvements supporting test discovery " "for packages, easier experimentation at the interactive prompt, new testcase " @@ -1923,7 +1922,7 @@ msgid "" "names." msgstr "" -#: ../../whatsnew/3.2.rst:1745 +#: ../../whatsnew/3.2.rst:1744 msgid "" "The command-line call ``python -m unittest`` can now accept file paths " "instead of module names for running specific tests (:issue:`10620`). The " @@ -1933,29 +1932,29 @@ msgid "" "and a directory to start discovery with ``-s``:" msgstr "" -#: ../../whatsnew/3.2.rst:1756 ../../whatsnew/3.2.rst:1765 -#: ../../whatsnew/3.2.rst:1921 +#: ../../whatsnew/3.2.rst:1755 ../../whatsnew/3.2.rst:1764 +#: ../../whatsnew/3.2.rst:1920 msgid "(Contributed by Michael Foord.)" msgstr "" -#: ../../whatsnew/3.2.rst:1758 +#: ../../whatsnew/3.2.rst:1757 msgid "" "Experimentation at the interactive prompt is now easier because the :class:" "`unittest.case.TestCase` class can now be instantiated without arguments:" msgstr "" -#: ../../whatsnew/3.2.rst:1767 +#: ../../whatsnew/3.2.rst:1766 msgid "" "The :mod:`unittest` module has two new methods, :meth:`~unittest.TestCase." "assertWarns` and :meth:`~unittest.TestCase.assertWarnsRegex` to verify that " "a given warning type is triggered by the code under test::" msgstr "" -#: ../../whatsnew/3.2.rst:1775 +#: ../../whatsnew/3.2.rst:1774 msgid "(Contributed by Antoine Pitrou, :issue:`9754`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1777 +#: ../../whatsnew/3.2.rst:1776 msgid "" "Another new method, :meth:`~unittest.TestCase.assertCountEqual` is used to " "compare two iterables to determine if their element counts are equal " @@ -1963,7 +1962,7 @@ msgid "" "regardless of order)::" msgstr "" -#: ../../whatsnew/3.2.rst:1787 +#: ../../whatsnew/3.2.rst:1786 msgid "" "A principal feature of the unittest module is an effort to produce " "meaningful diagnostics when a test fails. When possible, the failure is " @@ -1973,13 +1972,13 @@ msgid "" "that sets maximum length of diffs displayed." msgstr "" -#: ../../whatsnew/3.2.rst:1794 +#: ../../whatsnew/3.2.rst:1793 msgid "" "In addition, the method names in the module have undergone a number of clean-" "ups." msgstr "" -#: ../../whatsnew/3.2.rst:1796 +#: ../../whatsnew/3.2.rst:1795 msgid "" "For example, :meth:`~unittest.TestCase.assertRegex` is the new name for :" "meth:`~unittest.TestCase.assertRegexpMatches` which was misnamed because the " @@ -1990,76 +1989,76 @@ msgid "" "has unambiguous camel-casing." msgstr "" -#: ../../whatsnew/3.2.rst:1804 +#: ../../whatsnew/3.2.rst:1803 msgid "(Contributed by Raymond Hettinger and implemented by Ezio Melotti.)" msgstr "" -#: ../../whatsnew/3.2.rst:1806 +#: ../../whatsnew/3.2.rst:1805 msgid "" "To improve consistency, some long-standing method aliases are being " "deprecated in favor of the preferred names:" msgstr "" -#: ../../whatsnew/3.2.rst:1810 +#: ../../whatsnew/3.2.rst:1809 msgid "Old Name" msgstr "" -#: ../../whatsnew/3.2.rst:1810 +#: ../../whatsnew/3.2.rst:1809 msgid "Preferred Name" msgstr "" -#: ../../whatsnew/3.2.rst:1812 +#: ../../whatsnew/3.2.rst:1811 msgid ":meth:`assert_`" msgstr ":meth:`assert_`" -#: ../../whatsnew/3.2.rst:1812 +#: ../../whatsnew/3.2.rst:1811 msgid ":meth:`.assertTrue`" msgstr ":meth:`.assertTrue`" -#: ../../whatsnew/3.2.rst:1813 +#: ../../whatsnew/3.2.rst:1812 msgid ":meth:`assertEquals`" msgstr ":meth:`assertEquals`" -#: ../../whatsnew/3.2.rst:1813 +#: ../../whatsnew/3.2.rst:1812 msgid ":meth:`.assertEqual`" msgstr ":meth:`.assertEqual`" -#: ../../whatsnew/3.2.rst:1814 +#: ../../whatsnew/3.2.rst:1813 msgid ":meth:`assertNotEquals`" msgstr ":meth:`assertNotEquals`" -#: ../../whatsnew/3.2.rst:1814 +#: ../../whatsnew/3.2.rst:1813 msgid ":meth:`.assertNotEqual`" msgstr ":meth:`.assertNotEqual`" -#: ../../whatsnew/3.2.rst:1815 +#: ../../whatsnew/3.2.rst:1814 msgid ":meth:`assertAlmostEquals`" msgstr ":meth:`assertAlmostEquals`" -#: ../../whatsnew/3.2.rst:1815 +#: ../../whatsnew/3.2.rst:1814 msgid ":meth:`.assertAlmostEqual`" msgstr ":meth:`.assertAlmostEqual`" -#: ../../whatsnew/3.2.rst:1816 +#: ../../whatsnew/3.2.rst:1815 msgid ":meth:`assertNotAlmostEquals`" msgstr ":meth:`assertNotAlmostEquals`" -#: ../../whatsnew/3.2.rst:1816 +#: ../../whatsnew/3.2.rst:1815 msgid ":meth:`.assertNotAlmostEqual`" msgstr ":meth:`.assertNotAlmostEqual`" -#: ../../whatsnew/3.2.rst:1819 +#: ../../whatsnew/3.2.rst:1818 msgid "" "Likewise, the ``TestCase.fail*`` methods deprecated in Python 3.1 are " "expected to be removed in Python 3.3. Also see the :ref:`deprecated-" "aliases` section in the :mod:`unittest` documentation." msgstr "" -#: ../../whatsnew/3.2.rst:1823 +#: ../../whatsnew/3.2.rst:1822 msgid "(Contributed by Ezio Melotti; :issue:`9424`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1825 +#: ../../whatsnew/3.2.rst:1824 msgid "" "The :meth:`~unittest.TestCase.assertDictContainsSubset` method was " "deprecated because it was misimplemented with the arguments in the wrong " @@ -2067,11 +2066,11 @@ msgid "" "``TestCase().assertDictContainsSubset({'a':1, 'b':2}, {'a':1})`` would fail." msgstr "" -#: ../../whatsnew/3.2.rst:1833 +#: ../../whatsnew/3.2.rst:1832 msgid "random" msgstr "random" -#: ../../whatsnew/3.2.rst:1835 +#: ../../whatsnew/3.2.rst:1834 msgid "" "The integer methods in the :mod:`random` module now do a better job of " "producing uniform distributions. Previously, they computed selections with " @@ -2083,15 +2082,15 @@ msgid "" "func:`~random.sample`." msgstr "" -#: ../../whatsnew/3.2.rst:1844 +#: ../../whatsnew/3.2.rst:1843 msgid "(Contributed by Raymond Hettinger; :issue:`9025`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1847 +#: ../../whatsnew/3.2.rst:1846 msgid "poplib" msgstr "poplib" -#: ../../whatsnew/3.2.rst:1849 +#: ../../whatsnew/3.2.rst:1848 msgid "" ":class:`~poplib.POP3_SSL` class now accepts a *context* parameter, which is " "a :class:`ssl.SSLContext` object allowing bundling SSL configuration " @@ -2099,15 +2098,15 @@ msgid "" "lived) structure." msgstr "" -#: ../../whatsnew/3.2.rst:1854 +#: ../../whatsnew/3.2.rst:1853 msgid "(Contributed by Giampaolo Rodolà; :issue:`8807`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1857 +#: ../../whatsnew/3.2.rst:1856 msgid "asyncore" msgstr "asyncore" -#: ../../whatsnew/3.2.rst:1859 +#: ../../whatsnew/3.2.rst:1858 msgid "" ":class:`asyncore.dispatcher` now provides a :meth:`~asyncore.dispatcher." "handle_accepted()` method returning a `(sock, addr)` pair which is called " @@ -2117,41 +2116,41 @@ msgid "" "dispatcher.accept()` directly." msgstr "" -#: ../../whatsnew/3.2.rst:1866 +#: ../../whatsnew/3.2.rst:1865 msgid "(Contributed by Giampaolo Rodolà; :issue:`6706`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1869 +#: ../../whatsnew/3.2.rst:1868 msgid "tempfile" msgstr "tempfile" -#: ../../whatsnew/3.2.rst:1871 +#: ../../whatsnew/3.2.rst:1870 msgid "" "The :mod:`tempfile` module has a new context manager, :class:`~tempfile." "TemporaryDirectory` which provides easy deterministic cleanup of temporary " "directories::" msgstr "" -#: ../../whatsnew/3.2.rst:1878 +#: ../../whatsnew/3.2.rst:1877 msgid "(Contributed by Neil Schemenauer and Nick Coghlan; :issue:`5178`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1881 +#: ../../whatsnew/3.2.rst:1880 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.2.rst:1883 +#: ../../whatsnew/3.2.rst:1882 msgid "" "The :mod:`inspect` module has a new function :func:`~inspect." "getgeneratorstate` to easily identify the current state of a generator-" "iterator::" msgstr "" -#: ../../whatsnew/3.2.rst:1901 +#: ../../whatsnew/3.2.rst:1900 msgid "(Contributed by Rodolpho Eckhardt and Nick Coghlan, :issue:`10220`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1903 +#: ../../whatsnew/3.2.rst:1902 msgid "" "To support lookups without the possibility of activating a dynamic " "attribute, the :mod:`inspect` module has a new function, :func:`~inspect." @@ -2159,26 +2158,26 @@ msgid "" "guaranteed not to change state while it is searching::" msgstr "" -#: ../../whatsnew/3.2.rst:1924 +#: ../../whatsnew/3.2.rst:1923 msgid "pydoc" msgstr "pydoc" -#: ../../whatsnew/3.2.rst:1926 +#: ../../whatsnew/3.2.rst:1925 msgid "" "The :mod:`pydoc` module now provides a much-improved web server interface, " "as well as a new command-line option ``-b`` to automatically open a browser " "window to display that server:" msgstr "" -#: ../../whatsnew/3.2.rst:1934 +#: ../../whatsnew/3.2.rst:1933 msgid "(Contributed by Ron Adam; :issue:`2001`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1937 +#: ../../whatsnew/3.2.rst:1936 msgid "dis" msgstr "dis" -#: ../../whatsnew/3.2.rst:1939 +#: ../../whatsnew/3.2.rst:1938 msgid "" "The :mod:`dis` module gained two new functions for inspecting code, :func:" "`~dis.code_info` and :func:`~dis.show_code`. Both provide detailed code " @@ -2186,197 +2185,197 @@ msgid "" "code object. The former returns a string and the latter prints it::" msgstr "" -#: ../../whatsnew/3.2.rst:1966 +#: ../../whatsnew/3.2.rst:1965 msgid "" "In addition, the :func:`~dis.dis` function now accepts string arguments so " "that the common idiom ``dis(compile(s, '', 'eval'))`` can be shortened to " "``dis(s)``::" msgstr "" -#: ../../whatsnew/3.2.rst:1988 +#: ../../whatsnew/3.2.rst:1987 msgid "" "Taken together, these improvements make it easier to explore how CPython is " "implemented and to see for yourself what the language syntax does under-the-" "hood." msgstr "" -#: ../../whatsnew/3.2.rst:1992 +#: ../../whatsnew/3.2.rst:1991 msgid "(Contributed by Nick Coghlan in :issue:`9147`.)" msgstr "" -#: ../../whatsnew/3.2.rst:1995 +#: ../../whatsnew/3.2.rst:1994 msgid "dbm" msgstr "dbm" -#: ../../whatsnew/3.2.rst:1997 +#: ../../whatsnew/3.2.rst:1996 msgid "" "All database modules now support the :meth:`get` and :meth:`setdefault` " "methods." msgstr "" -#: ../../whatsnew/3.2.rst:1999 +#: ../../whatsnew/3.2.rst:1998 msgid "(Suggested by Ray Allen in :issue:`9523`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2002 +#: ../../whatsnew/3.2.rst:2001 msgid "ctypes" msgstr "ctypes" -#: ../../whatsnew/3.2.rst:2004 +#: ../../whatsnew/3.2.rst:2003 msgid "" "A new type, :class:`ctypes.c_ssize_t` represents the C :c:type:`ssize_t` " "datatype." msgstr "" -#: ../../whatsnew/3.2.rst:2007 +#: ../../whatsnew/3.2.rst:2006 msgid "site" msgstr "site" -#: ../../whatsnew/3.2.rst:2009 +#: ../../whatsnew/3.2.rst:2008 msgid "" "The :mod:`site` module has three new functions useful for reporting on the " "details of a given Python installation." msgstr "" -#: ../../whatsnew/3.2.rst:2012 +#: ../../whatsnew/3.2.rst:2011 msgid "" ":func:`~site.getsitepackages` lists all global site-packages directories." msgstr "" -#: ../../whatsnew/3.2.rst:2014 +#: ../../whatsnew/3.2.rst:2013 msgid "" ":func:`~site.getuserbase` reports on the user's base directory where data " "can be stored." msgstr "" -#: ../../whatsnew/3.2.rst:2017 +#: ../../whatsnew/3.2.rst:2016 msgid "" ":func:`~site.getusersitepackages` reveals the user-specific site-packages " "directory path." msgstr "" -#: ../../whatsnew/3.2.rst:2032 +#: ../../whatsnew/3.2.rst:2031 msgid "" "Conveniently, some of site's functionality is accessible directly from the " "command-line:" msgstr "" -#: ../../whatsnew/3.2.rst:2042 +#: ../../whatsnew/3.2.rst:2041 msgid "(Contributed by Tarek Ziadé in :issue:`6693`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2045 +#: ../../whatsnew/3.2.rst:2044 msgid "sysconfig" msgstr "sysconfig" -#: ../../whatsnew/3.2.rst:2047 +#: ../../whatsnew/3.2.rst:2046 msgid "" "The new :mod:`sysconfig` module makes it straightforward to discover " "installation paths and configuration variables that vary across platforms " "and installations." msgstr "" -#: ../../whatsnew/3.2.rst:2051 +#: ../../whatsnew/3.2.rst:2050 msgid "" "The module offers access simple access functions for platform and version " "information:" msgstr "" -#: ../../whatsnew/3.2.rst:2054 +#: ../../whatsnew/3.2.rst:2053 msgid "" ":func:`~sysconfig.get_platform` returning values like *linux-i586* or " "*macosx-10.6-ppc*." msgstr "" -#: ../../whatsnew/3.2.rst:2056 +#: ../../whatsnew/3.2.rst:2055 msgid "" ":func:`~sysconfig.get_python_version` returns a Python version string such " "as \"3.2\"." msgstr "" -#: ../../whatsnew/3.2.rst:2059 +#: ../../whatsnew/3.2.rst:2058 msgid "" "It also provides access to the paths and variables corresponding to one of " "seven named schemes used by :mod:`distutils`. Those include *posix_prefix*, " "*posix_home*, *posix_user*, *nt*, *nt_user*, *os2*, *os2_home*:" msgstr "" -#: ../../whatsnew/3.2.rst:2063 +#: ../../whatsnew/3.2.rst:2062 msgid "" ":func:`~sysconfig.get_paths` makes a dictionary containing installation " "paths for the current installation scheme." msgstr "" -#: ../../whatsnew/3.2.rst:2065 +#: ../../whatsnew/3.2.rst:2064 msgid "" ":func:`~sysconfig.get_config_vars` returns a dictionary of platform specific " "variables." msgstr "" -#: ../../whatsnew/3.2.rst:2068 +#: ../../whatsnew/3.2.rst:2067 msgid "There is also a convenient command-line interface:" msgstr "" -#: ../../whatsnew/3.2.rst:2107 +#: ../../whatsnew/3.2.rst:2106 msgid "(Moved out of Distutils by Tarek Ziadé.)" msgstr "" -#: ../../whatsnew/3.2.rst:2110 +#: ../../whatsnew/3.2.rst:2109 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.2.rst:2112 +#: ../../whatsnew/3.2.rst:2111 msgid "" "The :mod:`pdb` debugger module gained a number of usability improvements:" msgstr "" -#: ../../whatsnew/3.2.rst:2114 +#: ../../whatsnew/3.2.rst:2113 msgid "" ":file:`pdb.py` now has a ``-c`` option that executes commands as given in a :" "file:`.pdbrc` script file." msgstr "" -#: ../../whatsnew/3.2.rst:2116 +#: ../../whatsnew/3.2.rst:2115 msgid "" "A :file:`.pdbrc` script file can contain ``continue`` and ``next`` commands " "that continue debugging." msgstr "" -#: ../../whatsnew/3.2.rst:2118 +#: ../../whatsnew/3.2.rst:2117 msgid "The :class:`Pdb` class constructor now accepts a *nosigint* argument." msgstr "" -#: ../../whatsnew/3.2.rst:2119 +#: ../../whatsnew/3.2.rst:2118 msgid "" "New commands: ``l(list)``, ``ll(long list)`` and ``source`` for listing " "source code." msgstr "" -#: ../../whatsnew/3.2.rst:2121 +#: ../../whatsnew/3.2.rst:2120 msgid "" "New commands: ``display`` and ``undisplay`` for showing or hiding the value " "of an expression if it has changed." msgstr "" -#: ../../whatsnew/3.2.rst:2123 +#: ../../whatsnew/3.2.rst:2122 msgid "" "New command: ``interact`` for starting an interactive interpreter containing " "the global and local names found in the current scope." msgstr "" -#: ../../whatsnew/3.2.rst:2125 +#: ../../whatsnew/3.2.rst:2124 msgid "Breakpoints can be cleared by breakpoint number." msgstr "" -#: ../../whatsnew/3.2.rst:2127 +#: ../../whatsnew/3.2.rst:2126 msgid "(Contributed by Georg Brandl, Antonio Cuni and Ilya Sandler.)" msgstr "" -#: ../../whatsnew/3.2.rst:2130 +#: ../../whatsnew/3.2.rst:2129 msgid "configparser" msgstr "configparser" -#: ../../whatsnew/3.2.rst:2132 +#: ../../whatsnew/3.2.rst:2131 msgid "" "The :mod:`configparser` module was modified to improve usability and " "predictability of the default parser and its supported INI syntax. The old :" @@ -2386,63 +2385,63 @@ msgid "" "option duplicates are not allowed in a single configuration source." msgstr "" -#: ../../whatsnew/3.2.rst:2139 +#: ../../whatsnew/3.2.rst:2138 msgid "Config parsers gained a new API based on the mapping protocol::" msgstr "" -#: ../../whatsnew/3.2.rst:2167 +#: ../../whatsnew/3.2.rst:2166 msgid "" "The new API is implemented on top of the classical API, so custom parser " "subclasses should be able to use it without modifications." msgstr "" -#: ../../whatsnew/3.2.rst:2170 +#: ../../whatsnew/3.2.rst:2169 msgid "" "The INI file structure accepted by config parsers can now be customized. " "Users can specify alternative option/value delimiters and comment prefixes, " "change the name of the *DEFAULT* section or switch the interpolation syntax." msgstr "" -#: ../../whatsnew/3.2.rst:2174 +#: ../../whatsnew/3.2.rst:2173 msgid "" "There is support for pluggable interpolation including an additional " "interpolation handler :class:`~configparser.ExtendedInterpolation`::" msgstr "" -#: ../../whatsnew/3.2.rst:2207 +#: ../../whatsnew/3.2.rst:2206 msgid "" "A number of smaller features were also introduced, like support for " "specifying encoding in read operations, specifying fallback values for get-" "functions, or reading directly from dictionaries and strings." msgstr "" -#: ../../whatsnew/3.2.rst:2211 +#: ../../whatsnew/3.2.rst:2210 msgid "(All changes contributed by Łukasz Langa.)" msgstr "" -#: ../../whatsnew/3.2.rst:2216 +#: ../../whatsnew/3.2.rst:2215 msgid "urllib.parse" msgstr "urllib.parse" -#: ../../whatsnew/3.2.rst:2218 +#: ../../whatsnew/3.2.rst:2217 msgid "" "A number of usability improvements were made for the :mod:`urllib.parse` " "module." msgstr "" -#: ../../whatsnew/3.2.rst:2220 +#: ../../whatsnew/3.2.rst:2219 msgid "" "The :func:`~urllib.parse.urlparse` function now supports `IPv6 `_ addresses as described in :rfc:`2732`:" msgstr "" -#: ../../whatsnew/3.2.rst:2232 +#: ../../whatsnew/3.2.rst:2231 msgid "" "The :func:`~urllib.parse.urldefrag` function now returns a :term:`named " "tuple`::" msgstr "" -#: ../../whatsnew/3.2.rst:2242 +#: ../../whatsnew/3.2.rst:2241 msgid "" "And, the :func:`~urllib.parse.urlencode` function is now much more flexible, " "accepting either a string or bytes type for the *query* argument. If it is " @@ -2450,7 +2449,7 @@ msgid "" "func:`~urllib.parse.quote_plus` for encoding::" msgstr "" -#: ../../whatsnew/3.2.rst:2253 +#: ../../whatsnew/3.2.rst:2252 msgid "" "As detailed in :ref:`parsing-ascii-encoded-bytes`, all the :mod:`urllib." "parse` functions now accept ASCII-encoded byte strings as input, so long as " @@ -2459,17 +2458,17 @@ msgid "" "strings:" msgstr "" -#: ../../whatsnew/3.2.rst:2262 +#: ../../whatsnew/3.2.rst:2261 msgid "" "(Work by Nick Coghlan, Dan Mahn, and Senthil Kumaran in :issue:`2987`, :" "issue:`5468`, and :issue:`9873`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2266 +#: ../../whatsnew/3.2.rst:2265 msgid "mailbox" msgstr "mailbox" -#: ../../whatsnew/3.2.rst:2268 +#: ../../whatsnew/3.2.rst:2267 msgid "" "Thanks to a concerted effort by R. David Murray, the :mod:`mailbox` module " "has been fixed for Python 3.2. The challenge was that mailbox had been " @@ -2478,27 +2477,27 @@ msgid "" "different encodings." msgstr "" -#: ../../whatsnew/3.2.rst:2273 +#: ../../whatsnew/3.2.rst:2272 msgid "" "The solution harnessed the :mod:`email` package's binary support for parsing " "arbitrary email messages. In addition, the solution required a number of " "API changes." msgstr "" -#: ../../whatsnew/3.2.rst:2277 +#: ../../whatsnew/3.2.rst:2276 msgid "" "As expected, the :meth:`~mailbox.Mailbox.add` method for :class:`mailbox." "Mailbox` objects now accepts binary input." msgstr "" -#: ../../whatsnew/3.2.rst:2280 +#: ../../whatsnew/3.2.rst:2279 msgid "" ":class:`~io.StringIO` and text file input are deprecated. Also, string " "input will fail early if non-ASCII characters are used. Previously it would " "fail when the email was processed in a later step." msgstr "" -#: ../../whatsnew/3.2.rst:2284 +#: ../../whatsnew/3.2.rst:2283 msgid "" "There is also support for binary output. The :meth:`~mailbox.Mailbox." "get_file` method now returns a file in the binary mode (where it used to " @@ -2507,7 +2506,7 @@ msgid "" "message corresponding to a given *key*." msgstr "" -#: ../../whatsnew/3.2.rst:2290 +#: ../../whatsnew/3.2.rst:2289 msgid "" "It is still possible to get non-binary output using the old API's :meth:" "`~mailbox.Mailbox.get_string` method, but that approach is not very useful. " @@ -2515,17 +2514,17 @@ msgid "" "object or to load them from binary input." msgstr "" -#: ../../whatsnew/3.2.rst:2295 +#: ../../whatsnew/3.2.rst:2294 msgid "" "(Contributed by R. David Murray, with efforts from Steffen Daode Nurpmeso " "and an initial patch by Victor Stinner in :issue:`9124`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2299 +#: ../../whatsnew/3.2.rst:2298 msgid "turtledemo" msgstr "turtledemo" -#: ../../whatsnew/3.2.rst:2301 +#: ../../whatsnew/3.2.rst:2300 msgid "" "The demonstration code for the :mod:`turtle` module was moved from the " "*Demo* directory to main library. It includes over a dozen sample scripts " @@ -2533,16 +2532,16 @@ msgid "" "from the command-line:" msgstr "" -#: ../../whatsnew/3.2.rst:2310 +#: ../../whatsnew/3.2.rst:2309 msgid "" "(Moved from the Demo directory by Alexander Belopolsky in :issue:`10199`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2313 +#: ../../whatsnew/3.2.rst:2312 msgid "Multi-threading" msgstr "" -#: ../../whatsnew/3.2.rst:2315 +#: ../../whatsnew/3.2.rst:2314 msgid "" "The mechanism for serializing execution of concurrently running Python " "threads (generally known as the :term:`GIL` or Global Interpreter Lock) has " @@ -2554,7 +2553,7 @@ msgid "" "setswitchinterval()`. It currently defaults to 5 milliseconds." msgstr "" -#: ../../whatsnew/3.2.rst:2324 +#: ../../whatsnew/3.2.rst:2323 msgid "" "Additional details about the implementation can be read from a `python-dev " "mailing-list message `_ used in :" "meth:`list.sort` and :func:`sorted` now runs faster and uses less memory " @@ -2638,35 +2637,35 @@ msgid "" "saves time lost to delegating comparisons." msgstr "" -#: ../../whatsnew/3.2.rst:2379 +#: ../../whatsnew/3.2.rst:2378 msgid "(Patch by Daniel Stutzbach in :issue:`9915`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2381 +#: ../../whatsnew/3.2.rst:2380 msgid "" "JSON decoding performance is improved and memory consumption is reduced " "whenever the same string is repeated for multiple keys. Also, JSON encoding " "now uses the C speedups when the ``sort_keys`` argument is true." msgstr "" -#: ../../whatsnew/3.2.rst:2385 +#: ../../whatsnew/3.2.rst:2384 msgid "" "(Contributed by Antoine Pitrou in :issue:`7451` and by Raymond Hettinger and " "Antoine Pitrou in :issue:`10314`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2388 +#: ../../whatsnew/3.2.rst:2387 msgid "" "Recursive locks (created with the :func:`threading.RLock` API) now benefit " "from a C implementation which makes them as fast as regular locks, and " "between 10x and 15x faster than their previous pure Python implementation." msgstr "" -#: ../../whatsnew/3.2.rst:2392 +#: ../../whatsnew/3.2.rst:2391 msgid "(Contributed by Antoine Pitrou; :issue:`3001`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2394 +#: ../../whatsnew/3.2.rst:2393 msgid "" "The fast-search algorithm in stringlib is now used by the :meth:`split`, :" "meth:`rsplit`, :meth:`splitlines` and :meth:`replace` methods on :class:" @@ -2675,21 +2674,21 @@ msgid "" "meth:`rpartition`." msgstr "" -#: ../../whatsnew/3.2.rst:2400 +#: ../../whatsnew/3.2.rst:2399 msgid "(Patch by Florent Xicluna in :issue:`7622` and :issue:`7462`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2403 +#: ../../whatsnew/3.2.rst:2402 msgid "" "Integer to string conversions now work two \"digits\" at a time, reducing " "the number of division and modulo operations." msgstr "" -#: ../../whatsnew/3.2.rst:2406 +#: ../../whatsnew/3.2.rst:2405 msgid "(:issue:`6713` by Gawain Bolton, Mark Dickinson, and Victor Stinner.)" msgstr "" -#: ../../whatsnew/3.2.rst:2408 +#: ../../whatsnew/3.2.rst:2407 msgid "" "There were several other minor optimizations. Set differencing now runs " "faster when one operand is much larger than the other (patch by Andress " @@ -2701,11 +2700,11 @@ msgid "" "line arguments a bit faster (:issue:`7113` by Łukasz Langa)." msgstr "" -#: ../../whatsnew/3.2.rst:2419 +#: ../../whatsnew/3.2.rst:2418 msgid "Unicode" msgstr "" -#: ../../whatsnew/3.2.rst:2421 +#: ../../whatsnew/3.2.rst:2420 msgid "" "Python has been updated to `Unicode 6.0.0 `_. The update to the standard adds over 2,000 new characters " @@ -2713,7 +2712,7 @@ msgid "" "important for mobile phones." msgstr "" -#: ../../whatsnew/3.2.rst:2426 +#: ../../whatsnew/3.2.rst:2425 msgid "" "In addition, the updated standard has altered the character properties for " "two Kannada characters (U+0CF1, U+0CF2) and one New Tai Lue numeric " @@ -2723,15 +2722,15 @@ msgid "" "#Database_Changes>`_." msgstr "" -#: ../../whatsnew/3.2.rst:2434 +#: ../../whatsnew/3.2.rst:2433 msgid "Codecs" msgstr "" -#: ../../whatsnew/3.2.rst:2436 +#: ../../whatsnew/3.2.rst:2435 msgid "Support was added for *cp720* Arabic DOS encoding (:issue:`1616979`)." msgstr "" -#: ../../whatsnew/3.2.rst:2438 +#: ../../whatsnew/3.2.rst:2437 msgid "" "MBCS encoding no longer ignores the error handler argument. In the default " "strict mode, it raises an :exc:`UnicodeDecodeError` when it encounters an " @@ -2739,40 +2738,40 @@ msgid "" "unencodable character." msgstr "" -#: ../../whatsnew/3.2.rst:2443 +#: ../../whatsnew/3.2.rst:2442 msgid "" "The MBCS codec supports ``'strict'`` and ``'ignore'`` error handlers for " "decoding, and ``'strict'`` and ``'replace'`` for encoding." msgstr "" -#: ../../whatsnew/3.2.rst:2446 +#: ../../whatsnew/3.2.rst:2445 msgid "" "To emulate Python3.1 MBCS encoding, select the ``'ignore'`` handler for " "decoding and the ``'replace'`` handler for encoding." msgstr "" -#: ../../whatsnew/3.2.rst:2449 +#: ../../whatsnew/3.2.rst:2448 msgid "" "On Mac OS X, Python decodes command line arguments with ``'utf-8'`` rather " "than the locale encoding." msgstr "" -#: ../../whatsnew/3.2.rst:2452 +#: ../../whatsnew/3.2.rst:2451 msgid "" "By default, :mod:`tarfile` uses ``'utf-8'`` encoding on Windows (instead of " "``'mbcs'``) and the ``'surrogateescape'`` error handler on all operating " "systems." msgstr "" -#: ../../whatsnew/3.2.rst:2458 +#: ../../whatsnew/3.2.rst:2457 msgid "Documentation" msgstr "文件" -#: ../../whatsnew/3.2.rst:2460 +#: ../../whatsnew/3.2.rst:2459 msgid "The documentation continues to be improved." msgstr "" -#: ../../whatsnew/3.2.rst:2462 +#: ../../whatsnew/3.2.rst:2461 msgid "" "A table of quick links has been added to the top of lengthy sections such " "as :ref:`built-in-funcs`. In the case of :mod:`itertools`, the links are " @@ -2780,7 +2779,7 @@ msgid "" "and memory jog without having to read all of the docs." msgstr "" -#: ../../whatsnew/3.2.rst:2467 +#: ../../whatsnew/3.2.rst:2466 msgid "" "In some cases, the pure Python source code can be a helpful adjunct to the " "documentation, so now many modules now feature quick links to the latest " @@ -2788,80 +2787,80 @@ msgid "" "documentation has a quick link at the top labeled:" msgstr "" -#: ../../whatsnew/3.2.rst:2472 +#: ../../whatsnew/3.2.rst:2471 msgid "**Source code** :source:`Lib/functools.py`." msgstr "" -#: ../../whatsnew/3.2.rst:2474 +#: ../../whatsnew/3.2.rst:2473 msgid "" "(Contributed by Raymond Hettinger; see `rationale `_.)" msgstr "" -#: ../../whatsnew/3.2.rst:2477 +#: ../../whatsnew/3.2.rst:2476 msgid "" "The docs now contain more examples and recipes. In particular, :mod:`re` " "module has an extensive section, :ref:`re-examples`. Likewise, the :mod:" "`itertools` module continues to be updated with new :ref:`itertools-recipes`." msgstr "" -#: ../../whatsnew/3.2.rst:2482 +#: ../../whatsnew/3.2.rst:2481 msgid "" "The :mod:`datetime` module now has an auxiliary implementation in pure " "Python. No functionality was changed. This just provides an easier-to-read " "alternate implementation." msgstr "" -#: ../../whatsnew/3.2.rst:2486 +#: ../../whatsnew/3.2.rst:2485 msgid "(Contributed by Alexander Belopolsky in :issue:`9528`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2488 +#: ../../whatsnew/3.2.rst:2487 msgid "" "The unmaintained :file:`Demo` directory has been removed. Some demos were " "integrated into the documentation, some were moved to the :file:`Tools/demo` " "directory, and others were removed altogether." msgstr "" -#: ../../whatsnew/3.2.rst:2492 +#: ../../whatsnew/3.2.rst:2491 msgid "(Contributed by Georg Brandl in :issue:`7962`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2496 +#: ../../whatsnew/3.2.rst:2495 msgid "IDLE" msgstr "IDLE" -#: ../../whatsnew/3.2.rst:2498 +#: ../../whatsnew/3.2.rst:2497 msgid "" "The format menu now has an option to clean source files by stripping " "trailing whitespace." msgstr "" -#: ../../whatsnew/3.2.rst:2501 +#: ../../whatsnew/3.2.rst:2500 msgid "(Contributed by Raymond Hettinger; :issue:`5150`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2503 +#: ../../whatsnew/3.2.rst:2502 msgid "IDLE on Mac OS X now works with both Carbon AquaTk and Cocoa AquaTk." msgstr "" -#: ../../whatsnew/3.2.rst:2505 +#: ../../whatsnew/3.2.rst:2504 msgid "" "(Contributed by Kevin Walzer, Ned Deily, and Ronald Oussoren; :issue:`6075`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2508 +#: ../../whatsnew/3.2.rst:2507 msgid "Code Repository" msgstr "" -#: ../../whatsnew/3.2.rst:2510 +#: ../../whatsnew/3.2.rst:2509 msgid "" "In addition to the existing Subversion code repository at http://svn.python." "org there is now a `Mercurial `_ repository " "at https://hg.python.org/\\ ." msgstr "" -#: ../../whatsnew/3.2.rst:2514 +#: ../../whatsnew/3.2.rst:2513 msgid "" "After the 3.2 release, there are plans to switch to Mercurial as the primary " "repository. This distributed version control system should make it easier " @@ -2869,28 +2868,28 @@ msgid "" "pep:`385` for details." msgstr "" -#: ../../whatsnew/3.2.rst:2519 +#: ../../whatsnew/3.2.rst:2518 msgid "" "To learn to use the new version control system, see the `Quick Start " "`_ or the `Guide to Mercurial " "Workflows `_." msgstr "" -#: ../../whatsnew/3.2.rst:2525 +#: ../../whatsnew/3.2.rst:2524 msgid "Build and C API Changes" msgstr "" -#: ../../whatsnew/3.2.rst:2527 +#: ../../whatsnew/3.2.rst:2526 msgid "Changes to Python's build process and to the C API include:" msgstr "" -#: ../../whatsnew/3.2.rst:2529 +#: ../../whatsnew/3.2.rst:2528 msgid "" "The *idle*, *pydoc* and *2to3* scripts are now installed with a version-" "specific suffix on ``make altinstall`` (:issue:`10679`)." msgstr "" -#: ../../whatsnew/3.2.rst:2532 +#: ../../whatsnew/3.2.rst:2531 msgid "" "The C functions that access the Unicode Database now accept and return " "characters from the full Unicode range, even on narrow unicode builds " @@ -2900,33 +2899,33 @@ msgid "" "characters as printable." msgstr "" -#: ../../whatsnew/3.2.rst:2539 +#: ../../whatsnew/3.2.rst:2538 msgid "" "(Reported by Bupjoe Lee and fixed by Amaury Forgeot D'Arc; :issue:`5127`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2541 +#: ../../whatsnew/3.2.rst:2540 msgid "" "Computed gotos are now enabled by default on supported compilers (which are " "detected by the configure script). They can still be disabled selectively " "by specifying ``--without-computed-gotos``." msgstr "" -#: ../../whatsnew/3.2.rst:2545 +#: ../../whatsnew/3.2.rst:2544 msgid "(Contributed by Antoine Pitrou; :issue:`9203`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2547 +#: ../../whatsnew/3.2.rst:2546 msgid "" "The option ``--with-wctype-functions`` was removed. The built-in unicode " "database is now used for all functions." msgstr "" -#: ../../whatsnew/3.2.rst:2550 +#: ../../whatsnew/3.2.rst:2549 msgid "(Contributed by Amaury Forgeot D'Arc; :issue:`9210`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2552 +#: ../../whatsnew/3.2.rst:2551 msgid "" "Hash values are now values of a new type, :c:type:`Py_hash_t`, which is " "defined to be the same size as a pointer. Previously they were of type " @@ -2936,34 +2935,34 @@ msgid "" "grow to that size but their performance degraded catastrophically)." msgstr "" -#: ../../whatsnew/3.2.rst:2559 +#: ../../whatsnew/3.2.rst:2558 msgid "" "(Suggested by Raymond Hettinger and implemented by Benjamin Peterson; :issue:" "`9778`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2562 +#: ../../whatsnew/3.2.rst:2561 msgid "" "A new macro :c:macro:`Py_VA_COPY` copies the state of the variable argument " "list. It is equivalent to C99 *va_copy* but available on all Python " "platforms (:issue:`2443`)." msgstr "" -#: ../../whatsnew/3.2.rst:2566 +#: ../../whatsnew/3.2.rst:2565 msgid "" "A new C API function :c:func:`PySys_SetArgvEx` allows an embedded " "interpreter to set :attr:`sys.argv` without also modifying :attr:`sys.path` " "(:issue:`5753`)." msgstr "" -#: ../../whatsnew/3.2.rst:2570 +#: ../../whatsnew/3.2.rst:2569 msgid "" ":c:macro:`PyEval_CallObject` is now only available in macro form. The " "function declaration, which was kept for backwards compatibility reasons, is " "now removed -- the macro was introduced in 1997 (:issue:`8276`)." msgstr "" -#: ../../whatsnew/3.2.rst:2574 +#: ../../whatsnew/3.2.rst:2573 msgid "" "There is a new function :c:func:`PyLong_AsLongLongAndOverflow` which is " "analogous to :c:func:`PyLong_AsLongAndOverflow`. They both serve to convert " @@ -2971,13 +2970,13 @@ msgid "" "of cases where the conversion won't fit (:issue:`7767`)." msgstr "" -#: ../../whatsnew/3.2.rst:2579 +#: ../../whatsnew/3.2.rst:2578 msgid "" "The :c:func:`PyUnicode_CompareWithASCIIString` function now returns *not " "equal* if the Python string is *NUL* terminated." msgstr "" -#: ../../whatsnew/3.2.rst:2582 +#: ../../whatsnew/3.2.rst:2581 msgid "" "There is a new function :c:func:`PyErr_NewExceptionWithDoc` that is like :c:" "func:`PyErr_NewException` but allows a docstring to be specified. This lets " @@ -2985,7 +2984,7 @@ msgid "" "Python counterparts (:issue:`7033`)." msgstr "" -#: ../../whatsnew/3.2.rst:2587 +#: ../../whatsnew/3.2.rst:2586 msgid "" "When compiled with the ``--with-valgrind`` option, the pymalloc allocator " "will be automatically disabled when running under Valgrind. This gives " @@ -2993,39 +2992,41 @@ msgid "" "advantage of pymalloc at other times (:issue:`2422`)." msgstr "" -#: ../../whatsnew/3.2.rst:2592 +#: ../../whatsnew/3.2.rst:2591 msgid "" "Removed the ``O?`` format from the *PyArg_Parse* functions. The format is " "no longer used and it had never been documented (:issue:`8837`)." msgstr "" -#: ../../whatsnew/3.2.rst:2595 +#: ../../whatsnew/3.2.rst:2594 msgid "" -"There were a number of other small changes to the C-API. See the :source:" -"`Misc/NEWS` file for a complete list." +"There were a number of other small changes to the C-API. See the `Misc/NEWS " +"`_ file for a " +"complete list." msgstr "" #: ../../whatsnew/3.2.rst:2598 msgid "" -"Also, there were a number of updates to the Mac OS X build, see :source:`Mac/" -"BuildScript/README.txt` for details. For users running a 32/64-bit build, " +"Also, there were a number of updates to the Mac OS X build, see `Mac/" +"BuildScript/README.txt `_ for details. For users running a 32/64-bit build, " "there is a known problem with the default Tcl/Tk on Mac OS X 10.6. " "Accordingly, we recommend installing an updated alternative such as " "`ActiveState Tcl/Tk 8.5.9 `_" "\\. See https://www.python.org/download/mac/tcltk/ for additional details." msgstr "" -#: ../../whatsnew/3.2.rst:2606 +#: ../../whatsnew/3.2.rst:2607 msgid "Porting to Python 3.2" msgstr "" -#: ../../whatsnew/3.2.rst:2608 +#: ../../whatsnew/3.2.rst:2609 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code:" msgstr "" -#: ../../whatsnew/3.2.rst:2611 +#: ../../whatsnew/3.2.rst:2612 msgid "" "The :mod:`configparser` module has a number of clean-ups. The major change " "is to replace the old :class:`ConfigParser` class with long-standing " @@ -3033,7 +3034,7 @@ msgid "" "number of smaller incompatibilities:" msgstr "" -#: ../../whatsnew/3.2.rst:2616 +#: ../../whatsnew/3.2.rst:2617 msgid "" "The interpolation syntax is now validated on :meth:`~configparser." "ConfigParser.get` and :meth:`~configparser.ConfigParser.set` operations. In " @@ -3041,14 +3042,14 @@ msgid "" "valid: ``%(name)s`` and ``%%``, the latter being an escaped percent sign." msgstr "" -#: ../../whatsnew/3.2.rst:2622 +#: ../../whatsnew/3.2.rst:2623 msgid "" "The :meth:`~configparser.ConfigParser.set` and :meth:`~configparser." "ConfigParser.add_section` methods now verify that values are actual " "strings. Formerly, unsupported types could be introduced unintentionally." msgstr "" -#: ../../whatsnew/3.2.rst:2627 +#: ../../whatsnew/3.2.rst:2628 msgid "" "Duplicate sections or options from a single source now raise either :exc:" "`~configparser.DuplicateSectionError` or :exc:`~configparser." @@ -3056,57 +3057,57 @@ msgid "" "previous entry." msgstr "" -#: ../../whatsnew/3.2.rst:2632 +#: ../../whatsnew/3.2.rst:2633 msgid "" "Inline comments are now disabled by default so now the **;** character can " "be safely used in values." msgstr "" -#: ../../whatsnew/3.2.rst:2635 +#: ../../whatsnew/3.2.rst:2636 msgid "" "Comments now can be indented. Consequently, for **;** or **#** to appear at " "the start of a line in multiline values, it has to be interpolated. This " "keeps comment prefix characters in values from being mistaken as comments." msgstr "" -#: ../../whatsnew/3.2.rst:2639 +#: ../../whatsnew/3.2.rst:2640 msgid "" "``\"\"`` is now a valid value and is no longer automatically converted to an " "empty string. For empty strings, use ``\"option =\"`` in a line." msgstr "" -#: ../../whatsnew/3.2.rst:2642 +#: ../../whatsnew/3.2.rst:2643 msgid "" "The :mod:`nntplib` module was reworked extensively, meaning that its APIs " "are often incompatible with the 3.1 APIs." msgstr "" -#: ../../whatsnew/3.2.rst:2645 +#: ../../whatsnew/3.2.rst:2646 msgid "" ":class:`bytearray` objects can no longer be used as filenames; instead, they " "should be converted to :class:`bytes`." msgstr "" -#: ../../whatsnew/3.2.rst:2648 +#: ../../whatsnew/3.2.rst:2649 msgid "" "The :meth:`array.tostring` and :meth:`array.fromstring` have been renamed " "to :meth:`array.tobytes` and :meth:`array.frombytes` for clarity. The old " "names have been deprecated. (See :issue:`8990`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2652 +#: ../../whatsnew/3.2.rst:2653 msgid "``PyArg_Parse*()`` functions:" msgstr "" -#: ../../whatsnew/3.2.rst:2654 +#: ../../whatsnew/3.2.rst:2655 msgid "\"t#\" format has been removed: use \"s#\" or \"s*\" instead" msgstr "" -#: ../../whatsnew/3.2.rst:2655 +#: ../../whatsnew/3.2.rst:2656 msgid "\"w\" and \"w#\" formats has been removed: use \"w*\" instead" msgstr "" -#: ../../whatsnew/3.2.rst:2657 +#: ../../whatsnew/3.2.rst:2658 msgid "" "The :c:type:`PyCObject` type, deprecated in 3.1, has been removed. To wrap " "opaque C pointers in Python objects, the :c:type:`PyCapsule` API should be " @@ -3114,13 +3115,13 @@ msgid "" "safety information and a less complicated signature for calling a destructor." msgstr "" -#: ../../whatsnew/3.2.rst:2662 +#: ../../whatsnew/3.2.rst:2663 msgid "" "The :func:`sys.setfilesystemencoding` function was removed because it had a " "flawed design." msgstr "" -#: ../../whatsnew/3.2.rst:2665 +#: ../../whatsnew/3.2.rst:2666 msgid "" "The :func:`random.seed` function and method now salt string seeds with an " "sha512 hash function. To access the previous version of *seed* in order to " @@ -3128,7 +3129,7 @@ msgid "" "seed(s, version=1)``." msgstr "" -#: ../../whatsnew/3.2.rst:2670 +#: ../../whatsnew/3.2.rst:2671 msgid "" "The previously deprecated :func:`string.maketrans` function has been removed " "in favor of the static methods :meth:`bytes.maketrans` and :meth:`bytearray." @@ -3138,11 +3139,11 @@ msgid "" "methods with intermediate translation tables of the appropriate type." msgstr "" -#: ../../whatsnew/3.2.rst:2678 +#: ../../whatsnew/3.2.rst:2679 msgid "(Contributed by Georg Brandl; :issue:`5675`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2680 +#: ../../whatsnew/3.2.rst:2681 msgid "" "The previously deprecated :func:`contextlib.nested` function has been " "removed in favor of a plain :keyword:`with` statement which can accept " @@ -3151,13 +3152,13 @@ msgid "" "when one of them raises an exception::" msgstr "" -#: ../../whatsnew/3.2.rst:2691 +#: ../../whatsnew/3.2.rst:2692 msgid "" "(Contributed by Georg Brandl and Mattias Brändström; `appspot issue 53094 " "`_.)" msgstr "" -#: ../../whatsnew/3.2.rst:2694 +#: ../../whatsnew/3.2.rst:2695 msgid "" ":func:`struct.pack` now only allows bytes for the ``s`` string pack code. " "Formerly, it would accept text arguments and implicitly encode them to bytes " @@ -3166,32 +3167,32 @@ msgid "" "writing to fixed length segment of a structure." msgstr "" -#: ../../whatsnew/3.2.rst:2700 +#: ../../whatsnew/3.2.rst:2701 msgid "" "Code such as ``struct.pack('<6sHHBBB', 'GIF87a', x, y)`` should be rewritten " "with to use bytes instead of text, ``struct.pack('<6sHHBBB', b'GIF87a', x, " "y)``." msgstr "" -#: ../../whatsnew/3.2.rst:2703 +#: ../../whatsnew/3.2.rst:2704 msgid "" "(Discovered by David Beazley and fixed by Victor Stinner; :issue:`10783`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2705 +#: ../../whatsnew/3.2.rst:2706 msgid "" "The :class:`xml.etree.ElementTree` class now raises an :exc:`xml.etree." "ElementTree.ParseError` when a parse fails. Previously it raised an :exc:" "`xml.parsers.expat.ExpatError`." msgstr "" -#: ../../whatsnew/3.2.rst:2709 +#: ../../whatsnew/3.2.rst:2710 msgid "" "The new, longer :func:`str` value on floats may break doctests which rely on " "the old output format." msgstr "" -#: ../../whatsnew/3.2.rst:2712 +#: ../../whatsnew/3.2.rst:2713 msgid "" "In :class:`subprocess.Popen`, the default value for *close_fds* is now " "``True`` under Unix; under Windows, it is ``True`` if the three standard " @@ -3200,28 +3201,28 @@ msgid "" "race conditions when open file descriptors would leak into the child process." msgstr "" -#: ../../whatsnew/3.2.rst:2719 +#: ../../whatsnew/3.2.rst:2720 msgid "" "Support for legacy HTTP 0.9 has been removed from :mod:`urllib.request` and :" "mod:`http.client`. Such support is still present on the server side (in :" "mod:`http.server`)." msgstr "" -#: ../../whatsnew/3.2.rst:2723 +#: ../../whatsnew/3.2.rst:2724 msgid "(Contributed by Antoine Pitrou, :issue:`10711`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2725 +#: ../../whatsnew/3.2.rst:2726 msgid "" "SSL sockets in timeout mode now raise :exc:`socket.timeout` when a timeout " "occurs, rather than a generic :exc:`~ssl.SSLError`." msgstr "" -#: ../../whatsnew/3.2.rst:2728 +#: ../../whatsnew/3.2.rst:2729 msgid "(Contributed by Antoine Pitrou, :issue:`10272`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2730 +#: ../../whatsnew/3.2.rst:2731 msgid "" "The misleading functions :c:func:`PyEval_AcquireLock()` and :c:func:" "`PyEval_ReleaseLock()` have been officially deprecated. The thread-state " @@ -3229,18 +3230,18 @@ msgid "" "`PyEval_RestoreThread()`) should be used instead." msgstr "" -#: ../../whatsnew/3.2.rst:2735 +#: ../../whatsnew/3.2.rst:2736 msgid "" "Due to security risks, :func:`asyncore.handle_accept` has been deprecated, " "and a new function, :func:`asyncore.handle_accepted`, was added to replace " "it." msgstr "" -#: ../../whatsnew/3.2.rst:2738 +#: ../../whatsnew/3.2.rst:2739 msgid "(Contributed by Giampaolo Rodola in :issue:`6706`.)" msgstr "" -#: ../../whatsnew/3.2.rst:2740 +#: ../../whatsnew/3.2.rst:2741 msgid "" "Due to the new :term:`GIL` implementation, :c:func:`PyEval_InitThreads()` " "cannot be called before :c:func:`Py_Initialize()` anymore." diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 1ff5268c36..10f9413e14 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -1139,7 +1139,7 @@ msgid "" "Hettinger in :issue:`17941`.)" msgstr "" -#: ../../whatsnew/3.6.rst:940 ../../whatsnew/3.6.rst:2278 +#: ../../whatsnew/3.6.rst:940 ../../whatsnew/3.6.rst:2279 msgid "" "The *verbose* and *rename* arguments for :func:`~collections.namedtuple` are " "now keyword-only. (Contributed by Raymond Hettinger in :issue:`25628`.)" @@ -2755,28 +2755,29 @@ msgid "" "platform specific ``Lib/plat-*/`` directories, but were chronically out of " "date, inconsistently available across platforms, and unmaintained. The " "script that created these modules is still available in the source " -"distribution at :source:`Tools/scripts/h2py.py`." +"distribution at `Tools/scripts/h2py.py `_." msgstr "" -#: ../../whatsnew/3.6.rst:2122 +#: ../../whatsnew/3.6.rst:2123 msgid "The deprecated ``asynchat.fifo`` class has been removed." msgstr "" -#: ../../whatsnew/3.6.rst:2126 +#: ../../whatsnew/3.6.rst:2127 msgid "Porting to Python 3.6" msgstr "" -#: ../../whatsnew/3.6.rst:2128 +#: ../../whatsnew/3.6.rst:2129 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.6.rst:2132 +#: ../../whatsnew/3.6.rst:2133 msgid "Changes in 'python' Command Behavior" msgstr "" -#: ../../whatsnew/3.6.rst:2134 +#: ../../whatsnew/3.6.rst:2135 msgid "" "The output of a special Python build with defined ``COUNT_ALLOCS``, " "``SHOW_ALLOC_COUNT`` or ``SHOW_TRACK_COUNT`` macros is now off by default. " @@ -2785,42 +2786,42 @@ msgid "" "issue:`23034`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2142 +#: ../../whatsnew/3.6.rst:2143 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.6.rst:2144 +#: ../../whatsnew/3.6.rst:2145 msgid "" ":func:`open() ` will no longer allow combining the ``'U'`` mode flag " "with ``'+'``. (Contributed by Jeff Balogh and John O'Connor in :issue:" "`2091`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2148 +#: ../../whatsnew/3.6.rst:2149 msgid "" ":mod:`sqlite3` no longer implicitly commits an open transaction before DDL " "statements." msgstr "" -#: ../../whatsnew/3.6.rst:2151 +#: ../../whatsnew/3.6.rst:2152 msgid "" "On Linux, :func:`os.urandom` now blocks until the system urandom entropy " "pool is initialized to increase the security." msgstr "" -#: ../../whatsnew/3.6.rst:2154 +#: ../../whatsnew/3.6.rst:2155 msgid "" "When :meth:`importlib.abc.Loader.exec_module` is defined, :meth:`importlib." "abc.Loader.create_module` must also be defined." msgstr "" -#: ../../whatsnew/3.6.rst:2157 +#: ../../whatsnew/3.6.rst:2158 msgid "" ":c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg** " "argument is not set. Previously only ``NULL`` was returned." msgstr "" -#: ../../whatsnew/3.6.rst:2160 +#: ../../whatsnew/3.6.rst:2161 msgid "" "The format of the ``co_lnotab`` attribute of code objects changed to support " "a negative line number delta. By default, Python does not emit bytecode with " @@ -2833,7 +2834,7 @@ msgid "" "see the :pep:`511` for the rationale." msgstr "" -#: ../../whatsnew/3.6.rst:2170 +#: ../../whatsnew/3.6.rst:2171 msgid "" "The functions in the :mod:`compileall` module now return booleans instead of " "``1`` or ``0`` to represent success or failure, respectively. Thanks to " @@ -2841,7 +2842,7 @@ msgid "" "were doing identity checks for ``1`` or ``0``. See :issue:`25768`." msgstr "" -#: ../../whatsnew/3.6.rst:2175 +#: ../../whatsnew/3.6.rst:2176 msgid "" "Reading the :attr:`~urllib.parse.SplitResult.port` attribute of :func:" "`urllib.parse.urlsplit` and :func:`~urllib.parse.urlparse` results now " @@ -2849,13 +2850,13 @@ msgid "" "const:`None`. See :issue:`20059`." msgstr "" -#: ../../whatsnew/3.6.rst:2180 +#: ../../whatsnew/3.6.rst:2181 msgid "" "The :mod:`imp` module now raises a :exc:`DeprecationWarning` instead of :exc:" "`PendingDeprecationWarning`." msgstr "" -#: ../../whatsnew/3.6.rst:2183 +#: ../../whatsnew/3.6.rst:2184 msgid "" "The following modules have had missing APIs added to their :attr:`__all__` " "attributes to match the documented APIs: :mod:`calendar`, :mod:`cgi`, :mod:" @@ -2867,21 +2868,21 @@ msgid "" "Kołodziej in :issue:`23883`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2194 +#: ../../whatsnew/3.6.rst:2195 msgid "" "When performing a relative import, if ``__package__`` does not compare equal " "to ``__spec__.parent`` then :exc:`ImportWarning` is raised. (Contributed by " "Brett Cannon in :issue:`25791`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2198 +#: ../../whatsnew/3.6.rst:2199 msgid "" "When a relative import is performed and no parent package is known, then :" "exc:`ImportError` will be raised. Previously, :exc:`SystemError` could be " "raised. (Contributed by Brett Cannon in :issue:`18018`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2202 +#: ../../whatsnew/3.6.rst:2203 msgid "" "Servers based on the :mod:`socketserver` module, including those defined in :" "mod:`http.server`, :mod:`xmlrpc.server` and :mod:`wsgiref.simple_server`, " @@ -2892,20 +2893,20 @@ msgid "" "(Contributed by Martin Panter in :issue:`23430`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2211 +#: ../../whatsnew/3.6.rst:2212 msgid "" ":func:`spwd.getspnam` now raises a :exc:`PermissionError` instead of :exc:" "`KeyError` if the user doesn't have privileges." msgstr "" -#: ../../whatsnew/3.6.rst:2214 +#: ../../whatsnew/3.6.rst:2215 msgid "" "The :meth:`socket.socket.close` method now raises an exception if an error " "(e.g. ``EBADF``) was reported by the underlying system call. (Contributed by " "Martin Panter in :issue:`26685`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2218 +#: ../../whatsnew/3.6.rst:2219 msgid "" "The *decode_data* argument for the :class:`smtpd.SMTPChannel` and :class:" "`smtpd.SMTPServer` constructors is now ``False`` by default. This means that " @@ -2915,7 +2916,7 @@ msgid "" "deprecation warning generated by 3.5 will not be affected." msgstr "" -#: ../../whatsnew/3.6.rst:2226 +#: ../../whatsnew/3.6.rst:2227 msgid "" "All optional arguments of the :func:`~json.dump`, :func:`~json.dumps`, :func:" "`~json.load` and :func:`~json.loads` functions and :class:`~json." @@ -2924,13 +2925,13 @@ msgid "" "(Contributed by Serhiy Storchaka in :issue:`18726`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2233 +#: ../../whatsnew/3.6.rst:2234 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." msgstr "" -#: ../../whatsnew/3.6.rst:2236 +#: ../../whatsnew/3.6.rst:2237 msgid "" "As part of :pep:`487`, the handling of keyword arguments passed to :class:" "`type` (other than the metaclass hint, ``metaclass``) is now consistently " @@ -2942,7 +2943,7 @@ msgid "" "__new__` (whether direct or via :class:`super`) accordingly." msgstr "" -#: ../../whatsnew/3.6.rst:2245 +#: ../../whatsnew/3.6.rst:2246 msgid "" "In :class:`distutils.command.sdist.sdist`, the ``default_format`` attribute " "has been removed and is no longer honored. Instead, the gzipped tarfile " @@ -2952,13 +2953,13 @@ msgid "" "containing the following:" msgstr "" -#: ../../whatsnew/3.6.rst:2258 +#: ../../whatsnew/3.6.rst:2259 msgid "" "This behavior has also been backported to earlier Python versions by " "Setuptools 26.0.0." msgstr "" -#: ../../whatsnew/3.6.rst:2261 +#: ../../whatsnew/3.6.rst:2262 msgid "" "In the :mod:`urllib.request` module and the :meth:`http.client." "HTTPConnection.request` method, if no Content-Length header field has been " @@ -2969,47 +2970,47 @@ msgid "" "`12319`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2270 +#: ../../whatsnew/3.6.rst:2271 msgid "" "The :class:`~csv.DictReader` now returns rows of type :class:`~collections." "OrderedDict`. (Contributed by Steve Holden in :issue:`27842`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2274 +#: ../../whatsnew/3.6.rst:2275 msgid "" "The :const:`crypt.METHOD_CRYPT` will no longer be added to ``crypt.methods`` " "if unsupported by the platform. (Contributed by Victor Stinner in :issue:" "`25287`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2282 +#: ../../whatsnew/3.6.rst:2283 msgid "" "On Linux, :func:`ctypes.util.find_library` now looks in ``LD_LIBRARY_PATH`` " "for shared libraries. (Contributed by Vinay Sajip in :issue:`9998`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2286 +#: ../../whatsnew/3.6.rst:2287 msgid "" "The :class:`imaplib.IMAP4` class now handles flags containing the ``']'`` " "character in messages sent from the server to improve real-world " "compatibility. (Contributed by Lita Cho in :issue:`21815`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2291 +#: ../../whatsnew/3.6.rst:2292 msgid "" "The :func:`mmap.write() ` function now returns the number of " "bytes written like other write methods. (Contributed by Jakub Stasiak in :" "issue:`26335`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2295 +#: ../../whatsnew/3.6.rst:2296 msgid "" "The :func:`pkgutil.iter_modules` and :func:`pkgutil.walk_packages` functions " "now return :class:`~pkgutil.ModuleInfo` named tuples. (Contributed by " "Ramchandra Apte in :issue:`17211`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2299 +#: ../../whatsnew/3.6.rst:2300 msgid "" ":func:`re.sub` now raises an error for invalid numerical group references in " "replacement templates even if the pattern is not found in the string. The " @@ -3018,7 +3019,7 @@ msgid "" "in :issue:`25953`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2305 +#: ../../whatsnew/3.6.rst:2306 msgid "" ":class:`zipfile.ZipFile` will now raise :exc:`NotImplementedError` for " "unrecognized compression values. Previously a plain :exc:`RuntimeError` was " @@ -3028,7 +3029,7 @@ msgid "" "`RuntimeError` was raised in those scenarios." msgstr "" -#: ../../whatsnew/3.6.rst:2312 +#: ../../whatsnew/3.6.rst:2313 msgid "" "when custom metaclasses are combined with zero-argument :func:`super` or " "direct references from methods to the implicit ``__class__`` closure " @@ -3038,7 +3039,7 @@ msgid "" "Python 3.8." msgstr "" -#: ../../whatsnew/3.6.rst:2319 +#: ../../whatsnew/3.6.rst:2320 msgid "" "With the introduction of :exc:`ModuleNotFoundError`, import system consumers " "may start expecting import system replacements to raise that more specific " @@ -3051,11 +3052,11 @@ msgid "" "the default import system will raise the new subclass when appropriate." msgstr "" -#: ../../whatsnew/3.6.rst:2331 +#: ../../whatsnew/3.6.rst:2332 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.6.rst:2333 +#: ../../whatsnew/3.6.rst:2334 msgid "" "The :c:func:`PyMem_Malloc` allocator family now uses the :ref:`pymalloc " "allocator ` rather than the system :c:func:`malloc`. Applications " @@ -3064,29 +3065,29 @@ msgid "" "usage of memory allocators in your application. See :issue:`26249`." msgstr "" -#: ../../whatsnew/3.6.rst:2339 +#: ../../whatsnew/3.6.rst:2340 msgid "" ":c:func:`Py_Exit` (and the main interpreter) now override the exit status " "with 120 if flushing buffered data failed. See :issue:`5319`." msgstr "" -#: ../../whatsnew/3.6.rst:2344 +#: ../../whatsnew/3.6.rst:2345 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.6.rst:2346 +#: ../../whatsnew/3.6.rst:2347 msgid "" "There have been several major changes to the :term:`bytecode` in Python 3.6." msgstr "" -#: ../../whatsnew/3.6.rst:2348 +#: ../../whatsnew/3.6.rst:2349 msgid "" "The Python interpreter now uses a 16-bit wordcode instead of bytecode. " "(Contributed by Demur Rumed with input and reviews from Serhiy Storchaka and " "Victor Stinner in :issue:`26647` and :issue:`28050`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2352 +#: ../../whatsnew/3.6.rst:2353 msgid "" "The new :opcode:`FORMAT_VALUE` and :opcode:`BUILD_STRING` opcodes as part of " "the :ref:`formatted string literal ` implementation. " @@ -3094,14 +3095,14 @@ msgid "" "`27078`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2357 +#: ../../whatsnew/3.6.rst:2358 msgid "" "The new :opcode:`BUILD_CONST_KEY_MAP` opcode to optimize the creation of " "dictionaries with constant keys. (Contributed by Serhiy Storchaka in :issue:" "`27140`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2361 +#: ../../whatsnew/3.6.rst:2362 msgid "" "The function call opcodes have been heavily reworked for better performance " "and simpler implementation. The :opcode:`MAKE_FUNCTION`, :opcode:" @@ -3113,22 +3114,22 @@ msgid "" "issue:`27095`, and Serhiy Storchaka in :issue:`27213`, :issue:`28257`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2372 +#: ../../whatsnew/3.6.rst:2373 msgid "" "The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes " "have been added to support the new :term:`variable annotation` syntax. " "(Contributed by Ivan Levkivskyi in :issue:`27985`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2378 +#: ../../whatsnew/3.6.rst:2379 msgid "Notable changes in Python 3.6.2" msgstr "" -#: ../../whatsnew/3.6.rst:2381 +#: ../../whatsnew/3.6.rst:2382 msgid "New ``make regen-all`` build target" msgstr "" -#: ../../whatsnew/3.6.rst:2383 +#: ../../whatsnew/3.6.rst:2384 msgid "" "To simplify cross-compilation, and to ensure that CPython can reliably be " "compiled without requiring an existing version of Python to already be " @@ -3136,43 +3137,43 @@ msgid "" "recompile generated files based on file modification times." msgstr "" -#: ../../whatsnew/3.6.rst:2388 +#: ../../whatsnew/3.6.rst:2389 msgid "" "Instead, a new ``make regen-all`` command has been added to force " "regeneration of these files when desired (e.g. after an initial version of " "Python has already been built based on the pregenerated versions)." msgstr "" -#: ../../whatsnew/3.6.rst:2392 +#: ../../whatsnew/3.6.rst:2393 msgid "" "More selective regeneration targets are also defined - see :source:`Makefile." "pre.in` for details." msgstr "" -#: ../../whatsnew/3.6.rst:2395 ../../whatsnew/3.6.rst:2408 +#: ../../whatsnew/3.6.rst:2396 ../../whatsnew/3.6.rst:2409 msgid "(Contributed by Victor Stinner in :issue:`23404`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2401 +#: ../../whatsnew/3.6.rst:2402 msgid "Removal of ``make touch`` build target" msgstr "" -#: ../../whatsnew/3.6.rst:2403 +#: ../../whatsnew/3.6.rst:2404 msgid "" "The ``make touch`` build target previously used to request implicit " "regeneration of generated files by updating their modification times has " "been removed." msgstr "" -#: ../../whatsnew/3.6.rst:2406 +#: ../../whatsnew/3.6.rst:2407 msgid "It has been replaced by the new ``make regen-all`` target." msgstr "" -#: ../../whatsnew/3.6.rst:2414 +#: ../../whatsnew/3.6.rst:2415 msgid "Notable changes in Python 3.6.4" msgstr "" -#: ../../whatsnew/3.6.rst:2416 +#: ../../whatsnew/3.6.rst:2417 msgid "" "The ``PyExc_RecursionErrorInst`` singleton that was part of the public API " "has been removed as its members being never cleared may cause a segfault " @@ -3180,22 +3181,22 @@ msgid "" "issue:`22898` and :issue:`30697`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2423 +#: ../../whatsnew/3.6.rst:2424 msgid "Notable changes in Python 3.6.5" msgstr "" -#: ../../whatsnew/3.6.rst:2425 +#: ../../whatsnew/3.6.rst:2426 msgid "" "The :func:`locale.localeconv` function now sets temporarily the ``LC_CTYPE`` " "locale to the ``LC_NUMERIC`` locale in some cases. (Contributed by Victor " "Stinner in :issue:`31900`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2430 +#: ../../whatsnew/3.6.rst:2431 msgid "Notable changes in Python 3.6.7" msgstr "" -#: ../../whatsnew/3.6.rst:2432 +#: ../../whatsnew/3.6.rst:2433 msgid "" "In 3.6.7 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token " "when provided with input that does not have a trailing new line. This " @@ -3203,11 +3204,11 @@ msgid "" "Ammar Askar in :issue:`33899`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2438 +#: ../../whatsnew/3.6.rst:2439 msgid "Notable changes in Python 3.6.10" msgstr "" -#: ../../whatsnew/3.6.rst:2440 +#: ../../whatsnew/3.6.rst:2441 msgid "" "Due to significant security concerns, the *reuse_address* parameter of :meth:" "`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " @@ -3217,11 +3218,11 @@ msgid "" "`37228`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2448 +#: ../../whatsnew/3.6.rst:2449 msgid "Notable changes in Python 3.6.13" msgstr "" -#: ../../whatsnew/3.6.rst:2450 +#: ../../whatsnew/3.6.rst:2451 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " "parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index f48e3d38e2..cfe3c883dc 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-15 00:13+0000\n" +"POT-Creation-Date: 2022-06-22 00:18+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2986,48 +2986,49 @@ msgstr "" #: ../../whatsnew/3.7.rst:2123 msgid "" -"CPython's own :source:`CI configuration file <.travis.yml>` provides an " -"example of using the SSL :source:`compatibility testing infrastructure " -"` in CPython's test suite to build and link " -"against OpenSSL 1.1.0 rather than an outdated system provided OpenSSL." +"CPython's own `CI configuration file `_ provides an example of using the SSL :source:" +"`compatibility testing infrastructure ` in " +"CPython's test suite to build and link against OpenSSL 1.1.0 rather than an " +"outdated system provided OpenSSL." msgstr "" -#: ../../whatsnew/3.7.rst:2131 +#: ../../whatsnew/3.7.rst:2132 msgid "API and Feature Removals" msgstr "" -#: ../../whatsnew/3.7.rst:2133 +#: ../../whatsnew/3.7.rst:2134 msgid "The following features and APIs have been removed from Python 3.7:" msgstr "" -#: ../../whatsnew/3.7.rst:2135 +#: ../../whatsnew/3.7.rst:2136 msgid "" "The ``os.stat_float_times()`` function has been removed. It was introduced " "in Python 2.3 for backward compatibility with Python 2.2, and was deprecated " "since Python 3.1." msgstr "" -#: ../../whatsnew/3.7.rst:2139 +#: ../../whatsnew/3.7.rst:2140 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter in replacement " "templates for :func:`re.sub` were deprecated in Python 3.5, and will now " "cause an error." msgstr "" -#: ../../whatsnew/3.7.rst:2143 +#: ../../whatsnew/3.7.rst:2144 msgid "" "Removed support of the *exclude* argument in :meth:`tarfile.TarFile.add`. It " "was deprecated in Python 2.7 and 3.2. Use the *filter* argument instead." msgstr "" -#: ../../whatsnew/3.7.rst:2146 +#: ../../whatsnew/3.7.rst:2147 msgid "" "The ``splitunc()`` function in the :mod:`ntpath` module was deprecated in " "Python 3.1, and has now been removed. Use the :func:`~os.path.splitdrive` " "function instead." msgstr "" -#: ../../whatsnew/3.7.rst:2150 +#: ../../whatsnew/3.7.rst:2151 msgid "" ":func:`collections.namedtuple` no longer supports the *verbose* parameter or " "``_source`` attribute which showed the generated source code for the named " @@ -3036,14 +3037,14 @@ msgid "" "Naoki, Serhiy Storchaka, and Raymond Hettinger in :issue:`28638`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2156 +#: ../../whatsnew/3.7.rst:2157 msgid "" "Functions :func:`bool`, :func:`float`, :func:`list` and :func:`tuple` no " "longer take keyword arguments. The first argument of :func:`int` can now be " "passed only as positional argument." msgstr "" -#: ../../whatsnew/3.7.rst:2160 +#: ../../whatsnew/3.7.rst:2161 msgid "" "Removed previously deprecated in Python 2.4 classes ``Plist``, ``Dict`` and " "``_InternalDict`` in the :mod:`plistlib` module. Dict values in the result " @@ -3052,7 +3053,7 @@ msgid "" "access to access items of these dictionaries." msgstr "" -#: ../../whatsnew/3.7.rst:2166 +#: ../../whatsnew/3.7.rst:2167 msgid "" "The ``asyncio.windows_utils.socketpair()`` function has been removed. Use " "the :func:`socket.socketpair` function instead, it is available on all " @@ -3060,14 +3061,14 @@ msgid "" "alias to ``socket.socketpair`` on Python 3.5 and newer." msgstr "" -#: ../../whatsnew/3.7.rst:2172 +#: ../../whatsnew/3.7.rst:2173 msgid "" ":mod:`asyncio` no longer exports the :mod:`selectors` and :mod:`_overlapped` " "modules as ``asyncio.selectors`` and ``asyncio._overlapped``. Replace ``from " "asyncio import selectors`` with ``import selectors``." msgstr "" -#: ../../whatsnew/3.7.rst:2177 +#: ../../whatsnew/3.7.rst:2178 msgid "" "Direct instantiation of :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` " "objects is now prohibited. The constructors were never documented, tested, " @@ -3076,17 +3077,17 @@ msgid "" "in :issue:`32951`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2183 +#: ../../whatsnew/3.7.rst:2184 msgid "" "The unused :mod:`distutils` ``install_misc`` command has been removed. " "(Contributed by Eric N. Vander Weele in :issue:`29218`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2188 +#: ../../whatsnew/3.7.rst:2189 msgid "Module Removals" msgstr "" -#: ../../whatsnew/3.7.rst:2190 +#: ../../whatsnew/3.7.rst:2191 msgid "" "The ``fpectl`` module has been removed. It was never enabled by default, " "never worked correctly on x86-64, and it changed the Python ABI in ways that " @@ -3094,11 +3095,11 @@ msgid "" "Smith in :issue:`29137`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2197 ../../whatsnew/3.7.rst:2473 +#: ../../whatsnew/3.7.rst:2198 ../../whatsnew/3.7.rst:2474 msgid "Windows-only Changes" msgstr "" -#: ../../whatsnew/3.7.rst:2199 +#: ../../whatsnew/3.7.rst:2200 msgid "" "The python launcher, (py.exe), can accept 32 & 64 bit specifiers **without** " "having to specify a minor version as well. So ``py -3-32`` and ``py -3-64`` " @@ -3108,7 +3109,7 @@ msgid "" "(Contributed by Steve Barnes in :issue:`30291`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2206 +#: ../../whatsnew/3.7.rst:2207 msgid "" "The launcher can be run as ``py -0`` to produce a list of the installed " "pythons, *with default marked with an asterisk*. Running ``py -0p`` will " @@ -3117,28 +3118,28 @@ msgid "" "(Contributed by Steve Barnes in :issue:`30362`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2216 +#: ../../whatsnew/3.7.rst:2217 msgid "Porting to Python 3.7" msgstr "" -#: ../../whatsnew/3.7.rst:2218 +#: ../../whatsnew/3.7.rst:2219 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.7.rst:2223 +#: ../../whatsnew/3.7.rst:2224 msgid "Changes in Python Behavior" msgstr "" -#: ../../whatsnew/3.7.rst:2225 +#: ../../whatsnew/3.7.rst:2226 msgid "" ":keyword:`async` and :keyword:`await` names are now reserved keywords. Code " "using these names as identifiers will now raise a :exc:`SyntaxError`. " "(Contributed by Jelle Zijlstra in :issue:`30406`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2229 +#: ../../whatsnew/3.7.rst:2230 msgid "" ":pep:`479` is enabled for all code in Python 3.7, meaning that :exc:" "`StopIteration` exceptions raised directly or indirectly in coroutines and " @@ -3146,19 +3147,19 @@ msgid "" "by Yury Selivanov in :issue:`32670`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2235 +#: ../../whatsnew/3.7.rst:2236 msgid "" ":meth:`object.__aiter__` methods can no longer be declared as asynchronous. " "(Contributed by Yury Selivanov in :issue:`31709`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2238 +#: ../../whatsnew/3.7.rst:2239 msgid "" "Due to an oversight, earlier Python versions erroneously accepted the " "following syntax::" msgstr "" -#: ../../whatsnew/3.7.rst:2246 +#: ../../whatsnew/3.7.rst:2247 msgid "" "Python 3.7 now correctly raises a :exc:`SyntaxError`, as a generator " "expression always needs to be directly inside a set of parentheses and " @@ -3167,7 +3168,7 @@ msgid "" "`32012` and :issue:`32023`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2252 +#: ../../whatsnew/3.7.rst:2253 msgid "" "When using the :option:`-m` switch, the initial working directory is now " "added to :data:`sys.path`, rather than an empty string (which dynamically " @@ -3179,11 +3180,11 @@ msgid "" "place)." msgstr "" -#: ../../whatsnew/3.7.rst:2262 +#: ../../whatsnew/3.7.rst:2263 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.7.rst:2264 +#: ../../whatsnew/3.7.rst:2265 msgid "" ":meth:`socketserver.ThreadingMixIn.server_close` now waits until all non-" "daemon threads complete. Set the new :attr:`socketserver.ThreadingMixIn." @@ -3191,7 +3192,7 @@ msgid "" "(Contributed by Victor Stinner in :issue:`31233` and :issue:`33540`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2270 +#: ../../whatsnew/3.7.rst:2271 msgid "" ":meth:`socketserver.ForkingMixIn.server_close` now waits until all child " "processes complete. Set the new :attr:`socketserver.ForkingMixIn." @@ -3199,21 +3200,21 @@ msgid "" "(Contributed by Victor Stinner in :issue:`31151` and :issue:`33540`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2276 +#: ../../whatsnew/3.7.rst:2277 msgid "" "The :func:`locale.localeconv` function now temporarily sets the ``LC_CTYPE`` " "locale to the value of ``LC_NUMERIC`` in some cases. (Contributed by Victor " "Stinner in :issue:`31900`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2280 +#: ../../whatsnew/3.7.rst:2281 msgid "" ":meth:`pkgutil.walk_packages` now raises a :exc:`ValueError` if *path* is a " "string. Previously an empty list was returned. (Contributed by Sanyam " "Khurana in :issue:`24744`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2284 +#: ../../whatsnew/3.7.rst:2285 msgid "" "A format string argument for :meth:`string.Formatter.format` is now :ref:" "`positional-only `. Passing it as a keyword " @@ -3221,7 +3222,7 @@ msgid "" "issue:`29193`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2289 +#: ../../whatsnew/3.7.rst:2290 msgid "" "Attributes :attr:`~http.cookies.Morsel.key`, :attr:`~http.cookies.Morsel." "value` and :attr:`~http.cookies.Morsel.coded_value` of class :class:`http." @@ -3230,7 +3231,7 @@ msgid "" "them. (Contributed by Serhiy Storchaka in :issue:`29192`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2297 +#: ../../whatsnew/3.7.rst:2298 msgid "" "The *mode* argument of :func:`os.makedirs` no longer affects the file " "permission bits of newly-created intermediate-level directories. To set " @@ -3238,13 +3239,13 @@ msgid "" "``makedirs()``. (Contributed by Serhiy Storchaka in :issue:`19930`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2303 +#: ../../whatsnew/3.7.rst:2304 msgid "" "The :attr:`struct.Struct.format` type is now :class:`str` instead of :class:" "`bytes`. (Contributed by Victor Stinner in :issue:`21071`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2306 +#: ../../whatsnew/3.7.rst:2307 msgid "" ":func:`~cgi.parse_multipart` now accepts the *encoding* and *errors* " "arguments and returns the same results as :class:`~FieldStorage`: for non-" @@ -3252,27 +3253,27 @@ msgid "" "(Contributed by Pierre Quentel in :issue:`29979`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2312 +#: ../../whatsnew/3.7.rst:2313 msgid "" "Due to internal changes in :mod:`socket`, calling :func:`socket.fromshare` " "on a socket created by :func:`socket.share ` in older " "Python versions is not supported." msgstr "" -#: ../../whatsnew/3.7.rst:2316 +#: ../../whatsnew/3.7.rst:2317 msgid "" "``repr`` for :exc:`BaseException` has changed to not include the trailing " "comma. Most exceptions are affected by this change. (Contributed by Serhiy " "Storchaka in :issue:`30399`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2320 +#: ../../whatsnew/3.7.rst:2321 msgid "" "``repr`` for :class:`datetime.timedelta` has changed to include the keyword " "arguments in the output. (Contributed by Utkarsh Upadhyay in :issue:`30302`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2323 +#: ../../whatsnew/3.7.rst:2324 msgid "" "Because :func:`shutil.rmtree` is now implemented using the :func:`os." "scandir` function, the user specified handler *onerror* is now called with " @@ -3280,7 +3281,7 @@ msgid "" "directory is failed." msgstr "" -#: ../../whatsnew/3.7.rst:2328 +#: ../../whatsnew/3.7.rst:2329 msgid "" "Support for nested sets and set operations in regular expressions as in " "`Unicode Technical Standard #18`_ might be added in the future. This would " @@ -3291,7 +3292,7 @@ msgid "" "with a backslash. (Contributed by Serhiy Storchaka in :issue:`30349`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2339 +#: ../../whatsnew/3.7.rst:2340 msgid "" "The result of splitting a string on a :mod:`regular expression ` that " "could match an empty string has been changed. For example splitting on " @@ -3302,7 +3303,7 @@ msgid "" "patterns since Python 3.5." msgstr "" -#: ../../whatsnew/3.7.rst:2348 +#: ../../whatsnew/3.7.rst:2349 msgid "" "For patterns that match both empty and non-empty strings, the result of " "searching for all matches may also be changed in other cases. For example " @@ -3312,7 +3313,7 @@ msgid "" "as ``r'(?m)^[^\\S\\n]*$'``." msgstr "" -#: ../../whatsnew/3.7.rst:2355 +#: ../../whatsnew/3.7.rst:2356 msgid "" ":func:`re.sub()` now replaces empty matches adjacent to a previous non-empty " "match. For example ``re.sub('x*', '-', 'abxd')`` returns now ``'-a-b--d-'`` " @@ -3320,25 +3321,25 @@ msgid "" "and the second minus replaces an empty string between 'x' and 'd')." msgstr "" -#: ../../whatsnew/3.7.rst:2361 +#: ../../whatsnew/3.7.rst:2362 msgid "(Contributed by Serhiy Storchaka in :issue:`25054` and :issue:`32308`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2363 +#: ../../whatsnew/3.7.rst:2364 msgid "" "Change :func:`re.escape` to only escape regex special characters instead of " "escaping all characters other than ASCII letters, numbers, and ``'_'``. " "(Contributed by Serhiy Storchaka in :issue:`29995`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2367 +#: ../../whatsnew/3.7.rst:2368 msgid "" ":class:`tracemalloc.Traceback` frames are now sorted from oldest to most " "recent to be more consistent with :mod:`traceback`. (Contributed by Jesse " "Bakker in :issue:`32121`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2371 +#: ../../whatsnew/3.7.rst:2372 msgid "" "On OSes that support :const:`socket.SOCK_NONBLOCK` or :const:`socket." "SOCK_CLOEXEC` bit flags, the :attr:`socket.type ` no " @@ -3347,7 +3348,7 @@ msgid "" "Selivanov in :issue:`32331`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2378 +#: ../../whatsnew/3.7.rst:2379 msgid "" "On Windows the default for the *close_fds* argument of :class:`subprocess." "Popen` was changed from :const:`False` to :const:`True` when redirecting the " @@ -3357,7 +3358,7 @@ msgid "" "`STARTUPINFO.lpAttributeList `." msgstr "" -#: ../../whatsnew/3.7.rst:2386 +#: ../../whatsnew/3.7.rst:2387 msgid "" ":meth:`importlib.machinery.PathFinder.invalidate_caches` -- which implicitly " "affects :func:`importlib.invalidate_caches` -- now deletes entries in :data:" @@ -3365,7 +3366,7 @@ msgid "" "Cannon in :issue:`33169`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2391 +#: ../../whatsnew/3.7.rst:2392 msgid "" "In :mod:`asyncio`, :meth:`loop.sock_recv() `, :meth:" "`loop.sock_sendall() `, :meth:`loop.sock_accept() " @@ -3376,21 +3377,21 @@ msgid "" "(Contributed by Yury Selivanov in :issue:`32327`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2402 +#: ../../whatsnew/3.7.rst:2403 msgid "" ":attr:`asyncio.Server.sockets` now returns a copy of the internal list of " "server sockets, instead of returning it directly. (Contributed by Yury " "Selivanov in :issue:`32662`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2406 +#: ../../whatsnew/3.7.rst:2407 msgid "" ":attr:`Struct.format ` is now a :class:`str` instance " "instead of a :class:`bytes` instance. (Contributed by Victor Stinner in :" "issue:`21071`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2410 +#: ../../whatsnew/3.7.rst:2411 msgid "" ":mod:`argparse` subparsers can now be made mandatory by passing " "``required=True`` to :meth:`ArgumentParser.add_subparsers() ` will now " "consistently raise an exception when a date falls outside of the " @@ -3417,13 +3418,13 @@ msgid "" "date`. (Contributed by Alexander Belopolsky in :issue:`28292`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2428 +#: ../../whatsnew/3.7.rst:2429 msgid "" ":class:`collections.ChainMap` now preserves the order of the underlying " "mappings. (Contributed by Raymond Hettinger in :issue:`32792`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2431 +#: ../../whatsnew/3.7.rst:2432 msgid "" "The ``submit()`` method of :class:`concurrent.futures.ThreadPoolExecutor` " "and :class:`concurrent.futures.ProcessPoolExecutor` now raises a :exc:" @@ -3431,7 +3432,7 @@ msgid "" "Nemec in :issue:`33097`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2436 +#: ../../whatsnew/3.7.rst:2437 msgid "" "The :class:`configparser.ConfigParser` constructor now uses ``read_dict()`` " "to process the default values, making its behavior consistent with the rest " @@ -3440,7 +3441,7 @@ msgid "" "in :issue:`23835`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2442 +#: ../../whatsnew/3.7.rst:2443 msgid "" "Several undocumented internal imports were removed. One example is that ``os." "errno`` is no longer available; use ``import errno`` directly instead. Note " @@ -3448,11 +3449,11 @@ msgid "" "notice, even in micro version releases." msgstr "" -#: ../../whatsnew/3.7.rst:2450 +#: ../../whatsnew/3.7.rst:2451 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.7.rst:2452 +#: ../../whatsnew/3.7.rst:2453 msgid "" "The function :c:func:`PySlice_GetIndicesEx` is considered unsafe for " "resizable sequences. If the slice indices are not instances of :class:" @@ -3464,34 +3465,34 @@ msgid "" "Storchaka in :issue:`27867`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2463 +#: ../../whatsnew/3.7.rst:2464 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.7.rst:2465 +#: ../../whatsnew/3.7.rst:2466 msgid "" "There are two new opcodes: :opcode:`LOAD_METHOD` and :opcode:`CALL_METHOD`. " "(Contributed by Yury Selivanov and INADA Naoki in :issue:`26110`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2468 +#: ../../whatsnew/3.7.rst:2469 msgid "" "The :opcode:`STORE_ANNOTATION` opcode has been removed. (Contributed by Mark " "Shannon in :issue:`32550`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2475 +#: ../../whatsnew/3.7.rst:2476 msgid "" "The file used to override :data:`sys.path` is now called ``._pth`` instead of ``'sys.path'``. See :ref:`finding_modules` for " "more information. (Contributed by Steve Dower in :issue:`28137`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2482 +#: ../../whatsnew/3.7.rst:2483 msgid "Other CPython implementation changes" msgstr "" -#: ../../whatsnew/3.7.rst:2484 +#: ../../whatsnew/3.7.rst:2485 msgid "" "In preparation for potential future changes to the public CPython runtime " "initialization API (see :pep:`432` for an initial, but somewhat outdated, " @@ -3506,21 +3507,21 @@ msgid "" "Stinner in a number of other issues). Some known details affected:" msgstr "" -#: ../../whatsnew/3.7.rst:2497 +#: ../../whatsnew/3.7.rst:2498 msgid "" ":c:func:`PySys_AddWarnOptionUnicode` is not currently usable by embedding " "applications due to the requirement to create a Unicode object prior to " "calling `Py_Initialize`. Use :c:func:`PySys_AddWarnOption` instead." msgstr "" -#: ../../whatsnew/3.7.rst:2501 +#: ../../whatsnew/3.7.rst:2502 msgid "" "warnings filters added by an embedding application with :c:func:" "`PySys_AddWarnOption` should now more consistently take precedence over the " "default filters set by the interpreter" msgstr "" -#: ../../whatsnew/3.7.rst:2505 +#: ../../whatsnew/3.7.rst:2506 msgid "" "Due to changes in the way the default warnings filters are configured, " "setting :c:data:`Py_BytesWarningFlag` to a value greater than one is no " @@ -3530,7 +3531,7 @@ msgid "" "BytesWarning`` warnings filter added to convert them to exceptions." msgstr "" -#: ../../whatsnew/3.7.rst:2512 +#: ../../whatsnew/3.7.rst:2513 msgid "" "Due to a change in the way docstrings are handled by the compiler, the " "implicit ``return None`` in a function body consisting solely of a docstring " @@ -3538,7 +3539,7 @@ msgid "" "function's header line." msgstr "" -#: ../../whatsnew/3.7.rst:2517 +#: ../../whatsnew/3.7.rst:2518 msgid "" "The current exception state has been moved from the frame object to the co-" "routine. This simplified the interpreter and fixed a couple of obscure bugs " @@ -3546,11 +3547,11 @@ msgid "" "(Contributed by Mark Shannon in :issue:`25612`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2523 +#: ../../whatsnew/3.7.rst:2524 msgid "Notable changes in Python 3.7.1" msgstr "" -#: ../../whatsnew/3.7.rst:2525 +#: ../../whatsnew/3.7.rst:2526 msgid "" "Starting in 3.7.1, :c:func:`Py_Initialize` now consistently reads and " "respects all of the same environment settings as :c:func:`Py_Main` (in " @@ -3560,14 +3561,14 @@ msgid "" "`Py_IgnoreEnvironmentFlag` to 1 before calling :c:func:`Py_Initialize`." msgstr "" -#: ../../whatsnew/3.7.rst:2532 +#: ../../whatsnew/3.7.rst:2533 msgid "" "In 3.7.1 the C API for Context Variables :ref:`was updated " "` to use :c:type:`PyObject` " "pointers. See also :issue:`34762`." msgstr "" -#: ../../whatsnew/3.7.rst:2536 +#: ../../whatsnew/3.7.rst:2537 msgid "" "In 3.7.1 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token " "when provided with input that does not have a trailing new line. This " @@ -3575,11 +3576,11 @@ msgid "" "Ammar Askar in :issue:`33899`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2542 +#: ../../whatsnew/3.7.rst:2543 msgid "Notable changes in Python 3.7.2" msgstr "" -#: ../../whatsnew/3.7.rst:2544 +#: ../../whatsnew/3.7.rst:2545 msgid "" "In 3.7.2, :mod:`venv` on Windows no longer copies the original binaries, but " "creates redirector scripts named ``python.exe`` and ``pythonw.exe`` instead. " @@ -3589,11 +3590,11 @@ msgid "" "to get the new scripts." msgstr "" -#: ../../whatsnew/3.7.rst:2552 +#: ../../whatsnew/3.7.rst:2553 msgid "Notable changes in Python 3.7.6" msgstr "" -#: ../../whatsnew/3.7.rst:2554 +#: ../../whatsnew/3.7.rst:2555 msgid "" "Due to significant security concerns, the *reuse_address* parameter of :meth:" "`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " @@ -3603,11 +3604,11 @@ msgid "" "`37228`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2562 +#: ../../whatsnew/3.7.rst:2563 msgid "Notable changes in Python 3.7.10" msgstr "" -#: ../../whatsnew/3.7.rst:2564 +#: ../../whatsnew/3.7.rst:2565 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " "parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." From 87758ccb1e43288de90e6299daefdd518b7fb4e0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jun 2022 00:15:51 +0000 Subject: [PATCH 06/11] sync with cpython ee2ddc2d --- library/shutil.po | 97 +++++++++++++++++++++++++-------------------- tutorial/whatnow.po | 41 ++++++++++--------- 2 files changed, 76 insertions(+), 62 deletions(-) diff --git a/library/shutil.po b/library/shutil.po index 8ecca2dc41..7191ad0c73 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-06-23 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -699,10 +699,13 @@ msgid "" msgstr "" #: ../../library/shutil.rst:571 -msgid "This function is not thread-safe." +msgid "" +"This function is not thread-safe when custom archivers registered with :func:" +"`register_archive_format` are used. In this case it temporarily changes the " +"current working directory of the process to perform archiving." msgstr "" -#: ../../library/shutil.rst:573 +#: ../../library/shutil.rst:576 msgid "" "The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU " "format for archives created with ``format=\"tar\"``." @@ -710,46 +713,52 @@ msgstr "" #: ../../library/shutil.rst:580 msgid "" +"This function is now made thread-safe during creation of standard ``.zip`` " +"and tar archives." +msgstr "" + +#: ../../library/shutil.rst:586 +msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: ../../library/shutil.rst:583 ../../library/shutil.rst:671 +#: ../../library/shutil.rst:589 ../../library/shutil.rst:677 msgid "By default :mod:`shutil` provides these formats:" msgstr "" -#: ../../library/shutil.rst:585 +#: ../../library/shutil.rst:591 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:586 +#: ../../library/shutil.rst:592 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: ../../library/shutil.rst:587 ../../library/shutil.rst:676 +#: ../../library/shutil.rst:593 ../../library/shutil.rst:682 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:588 ../../library/shutil.rst:677 +#: ../../library/shutil.rst:594 ../../library/shutil.rst:683 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: ../../library/shutil.rst:589 ../../library/shutil.rst:678 +#: ../../library/shutil.rst:595 ../../library/shutil.rst:684 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:591 +#: ../../library/shutil.rst:597 msgid "" "You can register new formats or provide your own archiver for any existing " "formats, by using :func:`register_archive_format`." msgstr "" -#: ../../library/shutil.rst:597 +#: ../../library/shutil.rst:603 msgid "Register an archiver for the format *name*." msgstr "" -#: ../../library/shutil.rst:599 +#: ../../library/shutil.rst:605 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the *base_name* of the file to create, followed by the " @@ -758,33 +767,33 @@ msgid "" "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: ../../library/shutil.rst:605 +#: ../../library/shutil.rst:611 msgid "" "If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be " "used as extra keywords arguments when the archiver callable is used." msgstr "" -#: ../../library/shutil.rst:608 +#: ../../library/shutil.rst:614 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: ../../library/shutil.rst:614 +#: ../../library/shutil.rst:620 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: ../../library/shutil.rst:619 +#: ../../library/shutil.rst:625 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: ../../library/shutil.rst:621 +#: ../../library/shutil.rst:627 msgid "" "*extract_dir* is the name of the target directory where the archive is " "unpacked. If not provided, the current working directory is used." msgstr "" -#: ../../library/shutil.rst:624 +#: ../../library/shutil.rst:630 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", \"bztar" "\", or \"xztar\". Or any other format registered with :func:" @@ -793,13 +802,13 @@ msgid "" "that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/shutil.rst:631 +#: ../../library/shutil.rst:637 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." msgstr "" -#: ../../library/shutil.rst:635 +#: ../../library/shutil.rst:641 msgid "" "Never extract archives from untrusted sources without prior inspection. It " "is possible that files are created outside of the path specified in the " @@ -807,120 +816,120 @@ msgid "" "with \"/\" or filenames with two dots \"..\"." msgstr "" -#: ../../library/shutil.rst:640 +#: ../../library/shutil.rst:646 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: ../../library/shutil.rst:645 +#: ../../library/shutil.rst:651 msgid "" "Registers an unpack format. *name* is the name of the format and " "*extensions* is a list of extensions corresponding to the format, like ``." "zip`` for Zip files." msgstr "" -#: ../../library/shutil.rst:649 +#: ../../library/shutil.rst:655 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the path of the archive, followed by the directory the " "archive must be extracted to." msgstr "" -#: ../../library/shutil.rst:653 +#: ../../library/shutil.rst:659 msgid "" "When provided, *extra_args* is a sequence of ``(name, value)`` tuples that " "will be passed as keywords arguments to the callable." msgstr "" -#: ../../library/shutil.rst:656 +#: ../../library/shutil.rst:662 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: ../../library/shutil.rst:662 +#: ../../library/shutil.rst:668 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: ../../library/shutil.rst:667 +#: ../../library/shutil.rst:673 msgid "" "Return a list of all registered formats for unpacking. Each element of the " "returned sequence is a tuple ``(name, extensions, description)``." msgstr "" -#: ../../library/shutil.rst:673 +#: ../../library/shutil.rst:679 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: ../../library/shutil.rst:675 +#: ../../library/shutil.rst:681 msgid "*tar*: uncompressed tar file." msgstr "" -#: ../../library/shutil.rst:680 +#: ../../library/shutil.rst:686 msgid "" "You can register new formats or provide your own unpacker for any existing " "formats, by using :func:`register_unpack_format`." msgstr "" -#: ../../library/shutil.rst:687 +#: ../../library/shutil.rst:693 msgid "Archiving example" msgstr "" -#: ../../library/shutil.rst:689 +#: ../../library/shutil.rst:695 msgid "" "In this example, we create a gzip'ed tar-file archive containing all files " "found in the :file:`.ssh` directory of the user::" msgstr "" -#: ../../library/shutil.rst:699 +#: ../../library/shutil.rst:705 msgid "The resulting archive contains:" msgstr "" -#: ../../library/shutil.rst:717 +#: ../../library/shutil.rst:723 msgid "Archiving example with *base_dir*" msgstr "" -#: ../../library/shutil.rst:719 +#: ../../library/shutil.rst:725 msgid "" "In this example, similar to the `one above `_, we " "show how to use :func:`make_archive`, but this time with the usage of " "*base_dir*. We now have the following directory structure:" msgstr "" -#: ../../library/shutil.rst:733 +#: ../../library/shutil.rst:739 msgid "" "In the final archive, :file:`please_add.txt` should be included, but :file:" "`do_not_add.txt` should not. Therefore we use the following::" msgstr "" -#: ../../library/shutil.rst:747 +#: ../../library/shutil.rst:753 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: ../../library/shutil.rst:757 +#: ../../library/shutil.rst:763 msgid "Querying the size of the output terminal" msgstr "" -#: ../../library/shutil.rst:761 +#: ../../library/shutil.rst:767 msgid "Get the size of the terminal window." msgstr "" -#: ../../library/shutil.rst:763 +#: ../../library/shutil.rst:769 msgid "" "For each of the two dimensions, the environment variable, ``COLUMNS`` and " "``LINES`` respectively, is checked. If the variable is defined and the value " "is a positive integer, it is used." msgstr "" -#: ../../library/shutil.rst:767 +#: ../../library/shutil.rst:773 msgid "" "When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the " "terminal connected to :data:`sys.__stdout__` is queried by invoking :func:" "`os.get_terminal_size`." msgstr "" -#: ../../library/shutil.rst:771 +#: ../../library/shutil.rst:777 msgid "" "If the terminal size cannot be successfully queried, either because the " "system doesn't support querying, or because we are not connected to a " @@ -929,11 +938,11 @@ msgid "" "emulators." msgstr "" -#: ../../library/shutil.rst:777 +#: ../../library/shutil.rst:783 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: ../../library/shutil.rst:779 +#: ../../library/shutil.rst:785 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." diff --git a/tutorial/whatnow.po b/tutorial/whatnow.po index c37dd76cd9..daf06ce410 100644 --- a/tutorial/whatnow.po +++ b/tutorial/whatnow.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-23 00:14+0000\n" "PO-Revision-Date: 2021-07-05 21:37+0800\n" "Last-Translator: meowmeowcat \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -83,21 +83,14 @@ msgstr "更多 Python 的資源:" #: ../../tutorial/whatnow.rst:33 msgid "" "https://www.python.org: The major Python web site. It contains code, " -"documentation, and pointers to Python-related pages around the web. This " -"web site is mirrored in various places around the world, such as Europe, " -"Japan, and Australia; a mirror may be faster than the main site, depending " -"on your geographical location." +"documentation, and pointers to Python-related pages around the web." msgstr "" -"https://www.python.org:Python 的主要網站。它包含程式碼、文件以及連結到 " -"Python 相關聯的網頁。網站為鏡像的並設置於世界各地,像是歐洲、日本以及澳大利" -"亞;鏡像網站也許會比主網站來得更快,不過具體速度則還是取決於你所在的地理位" -"置。" -#: ../../tutorial/whatnow.rst:39 +#: ../../tutorial/whatnow.rst:36 msgid "https://docs.python.org: Fast access to Python's documentation." msgstr "https://docs.python.org:快速訪問 Python 的文件。" -#: ../../tutorial/whatnow.rst:41 +#: ../../tutorial/whatnow.rst:38 msgid "" "https://pypi.org: The Python Package Index, previously also nicknamed the " "Cheese Shop [#]_, is an index of user-created Python modules that are " @@ -108,7 +101,7 @@ msgstr "" "Cheese Shop [#]_,彙總了使用者開發 Python 模組的索引,並提供模組能夠被下載。" "一旦開始發佈相關程式碼,你可以將開發的作品註冊到這裡並且讓其他人找到。" -#: ../../tutorial/whatnow.rst:46 +#: ../../tutorial/whatnow.rst:43 msgid "" "https://code.activestate.com/recipes/langs/python/: The Python Cookbook is a " "sizable collection of code examples, larger modules, and useful scripts. " @@ -120,7 +113,7 @@ msgstr "" "則被收集在一本名為 Python Cookbook (O’Reilly & Associates, ISBN " "0-596-00797-3.) 的書籍中。" -#: ../../tutorial/whatnow.rst:51 +#: ../../tutorial/whatnow.rst:48 msgid "" "http://www.pyvideo.org collects links to Python-related videos from " "conferences and user-group meetings." @@ -128,7 +121,7 @@ msgstr "" "http://www.pyvideo.org 從研討會與使用者群組聚會裡收集與 Python 相關的影片連" "結。" -#: ../../tutorial/whatnow.rst:54 +#: ../../tutorial/whatnow.rst:51 msgid "" "https://scipy.org: The Scientific Python project includes modules for fast " "array computations and manipulations plus a host of packages for such things " @@ -139,7 +132,7 @@ msgstr "" "的模組,以及用於如線性代數、傅利葉變換、非線性求解器、隨機數分佈、統計分析等" "一系列的套件。" -#: ../../tutorial/whatnow.rst:59 +#: ../../tutorial/whatnow.rst:56 msgid "" "For Python-related questions and problem reports, you can post to the " "newsgroup :newsgroup:`comp.lang.python`, or send them to the mailing list at " @@ -155,7 +148,7 @@ msgstr "" "每天會有數以百計的內容,詢問(和回答)問題、建議新功能與發佈新的模組。郵寄清" "單會存檔在 https://mail.python.org/pipermail/。" -#: ../../tutorial/whatnow.rst:67 +#: ../../tutorial/whatnow.rst:64 msgid "" "Before posting, be sure to check the list of :ref:`Frequently Asked " "Questions ` (also called the FAQ). The FAQ answers many of the " @@ -166,14 +159,26 @@ msgstr "" "FAQ)這個清單內。FAQ 會回答出現很多次的問題及解答,有很多問題甚至已經包含解決" "問題的方法。" -#: ../../tutorial/whatnow.rst:73 +#: ../../tutorial/whatnow.rst:70 msgid "Footnotes" msgstr "註解" -#: ../../tutorial/whatnow.rst:74 +#: ../../tutorial/whatnow.rst:71 msgid "" "\"Cheese Shop\" is a Monty Python's sketch: a customer enters a cheese shop, " "but whatever cheese he asks for, the clerk says it's missing." msgstr "" "「Cheese Shop(起司店)」是 Monty Python 的一個短劇:一位顧客進入一家起司店," "但無論他要哪種起司,店員都說沒有貨。" + +#~ msgid "" +#~ "https://www.python.org: The major Python web site. It contains code, " +#~ "documentation, and pointers to Python-related pages around the web. This " +#~ "web site is mirrored in various places around the world, such as Europe, " +#~ "Japan, and Australia; a mirror may be faster than the main site, " +#~ "depending on your geographical location." +#~ msgstr "" +#~ "https://www.python.org:Python 的主要網站。它包含程式碼、文件以及連結到 " +#~ "Python 相關聯的網頁。網站為鏡像的並設置於世界各地,像是歐洲、日本以及澳大" +#~ "利亞;鏡像網站也許會比主網站來得更快,不過具體速度則還是取決於你所在的地理" +#~ "位置。" From 6174a5654b9321c9b7b1a7b75974818f12782ab7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Jun 2022 00:19:33 +0000 Subject: [PATCH 07/11] sync with cpython 036a2c12 --- tutorial/whatnow.po | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tutorial/whatnow.po b/tutorial/whatnow.po index daf06ce410..f66b01765f 100644 --- a/tutorial/whatnow.po +++ b/tutorial/whatnow.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-23 00:14+0000\n" +"POT-Creation-Date: 2022-06-24 00:17+0000\n" "PO-Revision-Date: 2021-07-05 21:37+0800\n" "Last-Translator: meowmeowcat \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -114,9 +114,10 @@ msgstr "" "0-596-00797-3.) 的書籍中。" #: ../../tutorial/whatnow.rst:48 +#, fuzzy msgid "" -"http://www.pyvideo.org collects links to Python-related videos from " -"conferences and user-group meetings." +"https://pyvideo.org collects links to Python-related videos from conferences " +"and user-group meetings." msgstr "" "http://www.pyvideo.org 從研討會與使用者群組聚會裡收集與 Python 相關的影片連" "結。" From ddc1b3ede5f499292b5a367b2b7b4dcf5887d3be Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 25 Jun 2022 00:17:06 +0000 Subject: [PATCH 08/11] sync with cpython 14943829 --- library/multiprocessing.shared_memory.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/multiprocessing.shared_memory.po b/library/multiprocessing.shared_memory.po index 6ada8f0c93..b2fc24d4af 100644 --- a/library/multiprocessing.shared_memory.po +++ b/library/multiprocessing.shared_memory.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-25 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -19,8 +19,8 @@ msgstr "" #: ../../library/multiprocessing.shared_memory.rst:2 msgid "" -":mod:`multiprocessing.shared_memory` --- Provides shared memory for direct " -"access across processes" +":mod:`multiprocessing.shared_memory` --- Shared memory for direct access " +"across processes" msgstr "" #: ../../library/multiprocessing.shared_memory.rst:7 From 8459c10aa6611680f7f7ef70f90f0ea7f5079db4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Jun 2022 00:20:25 +0000 Subject: [PATCH 09/11] sync with cpython 5f3b45a7 --- howto/functional.po | 302 ++++++++++++------------ library/dis.po | 6 +- library/sqlite3.po | 549 ++++++++++++++++++++++---------------------- 3 files changed, 428 insertions(+), 429 deletions(-) diff --git a/howto/functional.po b/howto/functional.po index a490402244..bcdc66bcc5 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-01 00:15+0000\n" +"POT-Creation-Date: 2022-06-26 00:18+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -418,11 +418,11 @@ msgid "" "set's elements::" msgstr "" -#: ../../howto/functional.rst:325 +#: ../../howto/functional.rst:331 msgid "Generator expressions and list comprehensions" msgstr "" -#: ../../howto/functional.rst:327 +#: ../../howto/functional.rst:333 msgid "" "Two common operations on an iterator's output are 1) performing some " "operation for every element, 2) selecting a subset of elements that meet " @@ -431,7 +431,7 @@ msgid "" "containing a given substring." msgstr "" -#: ../../howto/functional.rst:333 +#: ../../howto/functional.rst:339 msgid "" "List comprehensions and generator expressions (short form: \"listcomps\" and " "\"genexps\") are a concise notation for such operations, borrowed from the " @@ -439,12 +439,12 @@ msgid "" "strip all the whitespace from a stream of strings with the following code::" msgstr "" -#: ../../howto/functional.rst:346 +#: ../../howto/functional.rst:352 msgid "" "You can select only certain elements by adding an ``\"if\"`` condition::" msgstr "" -#: ../../howto/functional.rst:351 +#: ../../howto/functional.rst:357 msgid "" "With a list comprehension, you get back a Python list; ``stripped_list`` is " "a list containing the resulting lines, not an iterator. Generator " @@ -455,20 +455,20 @@ msgid "" "preferable in these situations." msgstr "" -#: ../../howto/functional.rst:358 +#: ../../howto/functional.rst:364 msgid "" "Generator expressions are surrounded by parentheses (\"()\") and list " "comprehensions are surrounded by square brackets (\"[]\"). Generator " "expressions have the form::" msgstr "" -#: ../../howto/functional.rst:371 +#: ../../howto/functional.rst:378 msgid "" "Again, for a list comprehension only the outside brackets are different " "(square brackets instead of parentheses)." msgstr "" -#: ../../howto/functional.rst:374 +#: ../../howto/functional.rst:381 msgid "" "The elements of the generated output will be the successive values of " "``expression``. The ``if`` clauses are all optional; if present, " @@ -476,14 +476,14 @@ msgid "" "is true." msgstr "" -#: ../../howto/functional.rst:378 +#: ../../howto/functional.rst:385 msgid "" "Generator expressions always have to be written inside parentheses, but the " "parentheses signalling a function call also count. If you want to create an " "iterator that will be immediately passed to a function you can write::" msgstr "" -#: ../../howto/functional.rst:384 +#: ../../howto/functional.rst:391 msgid "" "The ``for...in`` clauses contain the sequences to be iterated over. The " "sequences do not have to be the same length, because they are iterated over " @@ -493,13 +493,13 @@ msgid "" "``sequence2``." msgstr "" -#: ../../howto/functional.rst:390 +#: ../../howto/functional.rst:397 msgid "" "To put it another way, a list comprehension or generator expression is " "equivalent to the following Python code::" msgstr "" -#: ../../howto/functional.rst:407 +#: ../../howto/functional.rst:414 msgid "" "This means that when there are multiple ``for...in`` clauses but no ``if`` " "clauses, the length of the resulting output will be equal to the product of " @@ -507,25 +507,25 @@ msgid "" "output list is 9 elements long:" msgstr "" -#: ../../howto/functional.rst:419 +#: ../../howto/functional.rst:426 msgid "" "To avoid introducing an ambiguity into Python's grammar, if ``expression`` " "is creating a tuple, it must be surrounded with parentheses. The first list " "comprehension below is a syntax error, while the second one is correct::" msgstr "" -#: ../../howto/functional.rst:430 +#: ../../howto/functional.rst:437 msgid "Generators" msgstr "" -#: ../../howto/functional.rst:432 +#: ../../howto/functional.rst:439 msgid "" "Generators are a special class of functions that simplify the task of " "writing iterators. Regular functions compute a value and return it, but " "generators return an iterator that returns a stream of values." msgstr "" -#: ../../howto/functional.rst:436 +#: ../../howto/functional.rst:443 msgid "" "You're doubtless familiar with how regular function calls work in Python or " "C. When you call a function, it gets a private namespace where its local " @@ -538,18 +538,18 @@ msgid "" "thought of as resumable functions." msgstr "" -#: ../../howto/functional.rst:445 +#: ../../howto/functional.rst:452 msgid "Here's the simplest example of a generator function:" msgstr "" -#: ../../howto/functional.rst:451 +#: ../../howto/functional.rst:458 msgid "" "Any function containing a :keyword:`yield` keyword is a generator function; " "this is detected by Python's :term:`bytecode` compiler which compiles the " "function specially as a result." msgstr "" -#: ../../howto/functional.rst:455 +#: ../../howto/functional.rst:462 msgid "" "When you call a generator function, it doesn't return a single value; " "instead it returns a generator object that supports the iterator protocol. " @@ -561,17 +561,17 @@ msgid "" "method, the function will resume executing." msgstr "" -#: ../../howto/functional.rst:464 +#: ../../howto/functional.rst:471 msgid "Here's a sample usage of the ``generate_ints()`` generator:" msgstr "" -#: ../../howto/functional.rst:481 +#: ../../howto/functional.rst:488 msgid "" "You could equally write ``for i in generate_ints(5)``, or ``a, b, c = " "generate_ints(3)``." msgstr "" -#: ../../howto/functional.rst:484 +#: ../../howto/functional.rst:491 msgid "" "Inside a generator function, ``return value`` causes " "``StopIteration(value)`` to be raised from the :meth:`~generator.__next__` " @@ -579,7 +579,7 @@ msgid "" "procession of values ends and the generator cannot yield any further values." msgstr "" -#: ../../howto/functional.rst:489 +#: ../../howto/functional.rst:496 msgid "" "You could achieve the effect of generators manually by writing your own " "class and storing all the local variables of the generator as instance " @@ -589,7 +589,7 @@ msgid "" "complicated generator, writing a corresponding class can be much messier." msgstr "" -#: ../../howto/functional.rst:497 +#: ../../howto/functional.rst:504 msgid "" "The test suite included with Python's library, :source:`Lib/test/" "test_generators.py`, contains a number of more interesting examples. Here's " @@ -597,7 +597,7 @@ msgid "" "generators recursively. ::" msgstr "" -#: ../../howto/functional.rst:513 +#: ../../howto/functional.rst:520 msgid "" "Two other examples in ``test_generators.py`` produce solutions for the N-" "Queens problem (placing N queens on an NxN chess board so that no queen " @@ -606,11 +606,11 @@ msgid "" "twice)." msgstr "" -#: ../../howto/functional.rst:521 +#: ../../howto/functional.rst:528 msgid "Passing values into a generator" msgstr "" -#: ../../howto/functional.rst:523 +#: ../../howto/functional.rst:530 msgid "" "In Python 2.4 and earlier, generators only produced output. Once a " "generator's code was invoked to create an iterator, there was no way to pass " @@ -620,14 +620,14 @@ msgid "" "these approaches are messy." msgstr "" -#: ../../howto/functional.rst:530 +#: ../../howto/functional.rst:537 msgid "" "In Python 2.5 there's a simple way to pass values into a generator. :keyword:" "`yield` became an expression, returning a value that can be assigned to a " "variable or otherwise operated on::" msgstr "" -#: ../../howto/functional.rst:536 +#: ../../howto/functional.rst:543 msgid "" "I recommend that you **always** put parentheses around a ``yield`` " "expression when you're doing something with the returned value, as in the " @@ -635,7 +635,7 @@ msgid "" "always add them instead of having to remember when they're needed." msgstr "" -#: ../../howto/functional.rst:541 +#: ../../howto/functional.rst:548 msgid "" "(:pep:`342` explains the exact rules, which are that a ``yield``-expression " "must always be parenthesized except when it occurs at the top-level " @@ -644,7 +644,7 @@ msgid "" "operation, as in ``val = (yield i) + 12``.)" msgstr "" -#: ../../howto/functional.rst:547 +#: ../../howto/functional.rst:554 msgid "" "Values are sent into a generator by calling its :meth:`send(value) " "` method. This method resumes the generator's code and the " @@ -652,17 +652,17 @@ msgid "" "`~generator.__next__` method is called, the ``yield`` returns ``None``." msgstr "" -#: ../../howto/functional.rst:552 +#: ../../howto/functional.rst:559 msgid "" "Here's a simple counter that increments by 1 and allows changing the value " "of the internal counter." msgstr "" -#: ../../howto/functional.rst:567 +#: ../../howto/functional.rst:574 msgid "And here's an example of changing the counter:" msgstr "" -#: ../../howto/functional.rst:584 +#: ../../howto/functional.rst:591 msgid "" "Because ``yield`` will often be returning ``None``, you should always check " "for this case. Don't just use its value in expressions unless you're sure " @@ -670,20 +670,20 @@ msgid "" "resume your generator function." msgstr "" -#: ../../howto/functional.rst:589 +#: ../../howto/functional.rst:596 msgid "" "In addition to :meth:`~generator.send`, there are two other methods on " "generators:" msgstr "" -#: ../../howto/functional.rst:592 +#: ../../howto/functional.rst:599 msgid "" ":meth:`throw(value) ` is used to raise an exception inside " "the generator; the exception is raised by the ``yield`` expression where the " "generator's execution is paused." msgstr "" -#: ../../howto/functional.rst:596 +#: ../../howto/functional.rst:603 msgid "" ":meth:`~generator.close` raises a :exc:`GeneratorExit` exception inside the " "generator to terminate the iteration. On receiving this exception, the " @@ -694,20 +694,20 @@ msgid "" "collected." msgstr "" -#: ../../howto/functional.rst:604 +#: ../../howto/functional.rst:611 msgid "" "If you need to run cleanup code when a :exc:`GeneratorExit` occurs, I " "suggest using a ``try: ... finally:`` suite instead of catching :exc:" "`GeneratorExit`." msgstr "" -#: ../../howto/functional.rst:607 +#: ../../howto/functional.rst:614 msgid "" "The cumulative effect of these changes is to turn generators from one-way " "producers of information into both producers and consumers." msgstr "" -#: ../../howto/functional.rst:610 +#: ../../howto/functional.rst:617 msgid "" "Generators also become **coroutines**, a more generalized form of " "subroutines. Subroutines are entered at one point and exited at another " @@ -716,36 +716,36 @@ msgid "" "statements)." msgstr "" -#: ../../howto/functional.rst:617 +#: ../../howto/functional.rst:624 msgid "Built-in functions" msgstr "" -#: ../../howto/functional.rst:619 +#: ../../howto/functional.rst:626 msgid "" "Let's look in more detail at built-in functions often used with iterators." msgstr "" -#: ../../howto/functional.rst:621 +#: ../../howto/functional.rst:628 msgid "" "Two of Python's built-in functions, :func:`map` and :func:`filter` duplicate " "the features of generator expressions:" msgstr "" -#: ../../howto/functional.rst:633 +#: ../../howto/functional.rst:640 msgid "" ":func:`map(f, iterA, iterB, ...) ` returns an iterator over the sequence" msgstr "" -#: ../../howto/functional.rst:625 +#: ../../howto/functional.rst:632 msgid "" "``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``." msgstr "" -#: ../../howto/functional.rst:635 +#: ../../howto/functional.rst:642 msgid "You can of course achieve the same effect with a list comprehension." msgstr "" -#: ../../howto/functional.rst:637 +#: ../../howto/functional.rst:644 msgid "" ":func:`filter(predicate, iter) ` returns an iterator over all the " "sequence elements that meet a certain condition, and is similarly duplicated " @@ -754,24 +754,24 @@ msgid "" "must take a single value." msgstr "" -#: ../../howto/functional.rst:650 +#: ../../howto/functional.rst:657 msgid "This can also be written as a list comprehension:" msgstr "" -#: ../../howto/functional.rst:656 +#: ../../howto/functional.rst:663 msgid "" ":func:`enumerate(iter, start=0) ` counts off the elements in the " "iterable returning 2-tuples containing the count (from *start*) and each " "element. ::" msgstr "" -#: ../../howto/functional.rst:666 +#: ../../howto/functional.rst:673 msgid "" ":func:`enumerate` is often used when looping through a list and recording " "the indexes at which certain conditions are met::" msgstr "" -#: ../../howto/functional.rst:674 +#: ../../howto/functional.rst:681 msgid "" ":func:`sorted(iterable, key=None, reverse=False) ` collects all the " "elements of the iterable into a list, sorts the list, and returns the sorted " @@ -779,12 +779,12 @@ msgid "" "constructed list's :meth:`~list.sort` method. ::" msgstr "" -#: ../../howto/functional.rst:689 +#: ../../howto/functional.rst:696 msgid "" "(For a more detailed discussion of sorting, see the :ref:`sortinghowto`.)" msgstr "" -#: ../../howto/functional.rst:692 +#: ../../howto/functional.rst:699 msgid "" "The :func:`any(iter) ` and :func:`all(iter) ` built-ins look at " "the truth values of an iterable's contents. :func:`any` returns ``True`` if " @@ -792,13 +792,13 @@ msgid "" "``True`` if all of the elements are true values:" msgstr "" -#: ../../howto/functional.rst:711 +#: ../../howto/functional.rst:718 msgid "" ":func:`zip(iterA, iterB, ...) ` takes one element from each iterable " "and returns them in a tuple::" msgstr "" -#: ../../howto/functional.rst:717 +#: ../../howto/functional.rst:724 msgid "" "It doesn't construct an in-memory list and exhaust all the input iterators " "before returning; instead tuples are constructed and returned only if " @@ -806,56 +806,56 @@ msgid "" "evaluation `__.)" msgstr "" -#: ../../howto/functional.rst:722 +#: ../../howto/functional.rst:729 msgid "" "This iterator is intended to be used with iterables that are all of the same " "length. If the iterables are of different lengths, the resulting stream " "will be the same length as the shortest iterable. ::" msgstr "" -#: ../../howto/functional.rst:729 +#: ../../howto/functional.rst:736 msgid "" "You should avoid doing this, though, because an element may be taken from " "the longer iterators and discarded. This means you can't go on to use the " "iterators further because you risk skipping a discarded element." msgstr "" -#: ../../howto/functional.rst:735 +#: ../../howto/functional.rst:742 msgid "The itertools module" msgstr "" -#: ../../howto/functional.rst:737 +#: ../../howto/functional.rst:744 msgid "" "The :mod:`itertools` module contains a number of commonly-used iterators as " "well as functions for combining several iterators. This section will " "introduce the module's contents by showing small examples." msgstr "" -#: ../../howto/functional.rst:741 +#: ../../howto/functional.rst:748 msgid "The module's functions fall into a few broad classes:" msgstr "" -#: ../../howto/functional.rst:743 +#: ../../howto/functional.rst:750 msgid "Functions that create a new iterator based on an existing iterator." msgstr "" -#: ../../howto/functional.rst:744 +#: ../../howto/functional.rst:751 msgid "Functions for treating an iterator's elements as function arguments." msgstr "" -#: ../../howto/functional.rst:745 +#: ../../howto/functional.rst:752 msgid "Functions for selecting portions of an iterator's output." msgstr "" -#: ../../howto/functional.rst:746 +#: ../../howto/functional.rst:753 msgid "A function for grouping an iterator's output." msgstr "" -#: ../../howto/functional.rst:749 +#: ../../howto/functional.rst:756 msgid "Creating new iterators" msgstr "" -#: ../../howto/functional.rst:751 +#: ../../howto/functional.rst:758 msgid "" ":func:`itertools.count(start, step) ` returns an infinite " "stream of evenly spaced values. You can optionally supply the starting " @@ -863,7 +863,7 @@ msgid "" "defaults to 1::" msgstr "" -#: ../../howto/functional.rst:762 +#: ../../howto/functional.rst:769 msgid "" ":func:`itertools.cycle(iter) ` saves a copy of the contents " "of a provided iterable and returns a new iterator that returns its elements " @@ -871,14 +871,14 @@ msgid "" "infinitely. ::" msgstr "" -#: ../../howto/functional.rst:769 +#: ../../howto/functional.rst:776 msgid "" ":func:`itertools.repeat(elem, [n]) ` returns the provided " "element *n* times, or returns the element endlessly if *n* is not " "provided. ::" msgstr "" -#: ../../howto/functional.rst:777 +#: ../../howto/functional.rst:784 msgid "" ":func:`itertools.chain(iterA, iterB, ...) ` takes an " "arbitrary number of iterables as input, and returns all the elements of the " @@ -886,7 +886,7 @@ msgid "" "the iterables have been exhausted. ::" msgstr "" -#: ../../howto/functional.rst:785 +#: ../../howto/functional.rst:792 msgid "" ":func:`itertools.islice(iter, [start], stop, [step]) ` " "returns a stream that's a slice of the iterator. With a single *stop* " @@ -897,7 +897,7 @@ msgid "" "*step*. ::" msgstr "" -#: ../../howto/functional.rst:799 +#: ../../howto/functional.rst:806 msgid "" ":func:`itertools.tee(iter, [n]) ` replicates an iterator; it " "returns *n* independent iterators that will all return the contents of the " @@ -907,11 +907,11 @@ msgid "" "and one of the new iterators is consumed more than the others. ::" msgstr "" -#: ../../howto/functional.rst:818 +#: ../../howto/functional.rst:825 msgid "Calling functions on elements" msgstr "" -#: ../../howto/functional.rst:820 +#: ../../howto/functional.rst:827 msgid "" "The :mod:`operator` module contains a set of functions corresponding to " "Python's operators. Some examples are :func:`operator.add(a, b) ` assumes that the " "iterable will return a stream of tuples, and calls *func* using these tuples " "as the arguments::" msgstr "" -#: ../../howto/functional.rst:838 +#: ../../howto/functional.rst:845 msgid "Selecting elements" msgstr "" -#: ../../howto/functional.rst:840 +#: ../../howto/functional.rst:847 msgid "" "Another group of functions chooses a subset of an iterator's elements based " "on a predicate." msgstr "" -#: ../../howto/functional.rst:843 +#: ../../howto/functional.rst:850 msgid "" ":func:`itertools.filterfalse(predicate, iter) ` is " "the opposite of :func:`filter`, returning all elements for which the " "predicate returns false::" msgstr "" -#: ../../howto/functional.rst:850 +#: ../../howto/functional.rst:857 msgid "" ":func:`itertools.takewhile(predicate, iter) ` returns " "elements for as long as the predicate returns true. Once the predicate " "returns false, the iterator will signal the end of its results. ::" msgstr "" -#: ../../howto/functional.rst:863 +#: ../../howto/functional.rst:870 msgid "" ":func:`itertools.dropwhile(predicate, iter) ` discards " "elements while the predicate returns true, and then returns the rest of the " "iterable's results. ::" msgstr "" -#: ../../howto/functional.rst:873 +#: ../../howto/functional.rst:880 msgid "" ":func:`itertools.compress(data, selectors) ` takes two " "iterators and returns only those elements of *data* for which the " @@ -966,18 +966,18 @@ msgid "" "is exhausted::" msgstr "" -#: ../../howto/functional.rst:882 +#: ../../howto/functional.rst:889 msgid "Combinatoric functions" msgstr "" -#: ../../howto/functional.rst:884 +#: ../../howto/functional.rst:891 msgid "" "The :func:`itertools.combinations(iterable, r) ` " "returns an iterator giving all possible *r*-tuple combinations of the " "elements contained in *iterable*. ::" msgstr "" -#: ../../howto/functional.rst:899 +#: ../../howto/functional.rst:906 msgid "" "The elements within each tuple remain in the same order as *iterable* " "returned them. For example, the number 1 is always before 2, 3, 4, or 5 in " @@ -986,25 +986,25 @@ msgid "" "constraint on the order, returning all possible arrangements of length *r*::" msgstr "" -#: ../../howto/functional.rst:918 +#: ../../howto/functional.rst:925 msgid "" "If you don't supply a value for *r* the length of the iterable is used, " "meaning that all the elements are permuted." msgstr "" -#: ../../howto/functional.rst:921 +#: ../../howto/functional.rst:928 msgid "" "Note that these functions produce all of the possible combinations by " "position and don't require that the contents of *iterable* are unique::" msgstr "" -#: ../../howto/functional.rst:928 +#: ../../howto/functional.rst:935 msgid "" "The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " "strings came from different positions." msgstr "" -#: ../../howto/functional.rst:931 +#: ../../howto/functional.rst:938 msgid "" "The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " @@ -1013,11 +1013,11 @@ msgid "" "the second element is selected. ::" msgstr "" -#: ../../howto/functional.rst:946 +#: ../../howto/functional.rst:953 msgid "Grouping elements" msgstr "" -#: ../../howto/functional.rst:948 +#: ../../howto/functional.rst:955 msgid "" "The last function I'll discuss, :func:`itertools.groupby(iter, " "key_func=None) `, is the most complicated. " @@ -1026,14 +1026,14 @@ msgid "" "key is simply each element itself." msgstr "" -#: ../../howto/functional.rst:953 +#: ../../howto/functional.rst:960 msgid "" ":func:`~itertools.groupby` collects all the consecutive elements from the " "underlying iterable that have the same key value, and returns a stream of 2-" "tuples containing a key value and an iterator for the elements with that key." msgstr "" -#: ../../howto/functional.rst:981 +#: ../../howto/functional.rst:988 msgid "" ":func:`~itertools.groupby` assumes that the underlying iterable's contents " "will already be sorted based on the key. Note that the returned iterators " @@ -1041,11 +1041,11 @@ msgid "" "iterator-1 before requesting iterator-2 and its corresponding key." msgstr "" -#: ../../howto/functional.rst:988 +#: ../../howto/functional.rst:995 msgid "The functools module" msgstr "" -#: ../../howto/functional.rst:990 +#: ../../howto/functional.rst:997 msgid "" "The :mod:`functools` module in Python 2.5 contains some higher-order " "functions. A **higher-order function** takes one or more functions as input " @@ -1053,7 +1053,7 @@ msgid "" "func:`functools.partial` function." msgstr "" -#: ../../howto/functional.rst:995 +#: ../../howto/functional.rst:1002 msgid "" "For programs written in a functional style, you'll sometimes want to " "construct variants of existing functions that have some of the parameters " @@ -1063,7 +1063,7 @@ msgid "" "\"partial function application\"." msgstr "" -#: ../../howto/functional.rst:1001 +#: ../../howto/functional.rst:1008 msgid "" "The constructor for :func:`~functools.partial` takes the arguments " "``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " @@ -1071,14 +1071,14 @@ msgid "" "with the filled-in arguments." msgstr "" -#: ../../howto/functional.rst:1006 +#: ../../howto/functional.rst:1013 msgid "Here's a small but realistic example::" msgstr "" "以下是個很小但實際的範例:\n" "\n" "::" -#: ../../howto/functional.rst:1018 +#: ../../howto/functional.rst:1025 msgid "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "cumulatively performs an operation on all the iterable's elements and, " @@ -1093,20 +1093,20 @@ msgid "" "``func(initial_value, A)`` is the first calculation. ::" msgstr "" -#: ../../howto/functional.rst:1042 +#: ../../howto/functional.rst:1049 msgid "" "If you use :func:`operator.add` with :func:`functools.reduce`, you'll add up " "all the elements of the iterable. This case is so common that there's a " "special built-in called :func:`sum` to compute it:" msgstr "" -#: ../../howto/functional.rst:1054 +#: ../../howto/functional.rst:1061 msgid "" "For many uses of :func:`functools.reduce`, though, it can be clearer to just " "write the obvious :keyword:`for` loop::" msgstr "" -#: ../../howto/functional.rst:1066 +#: ../../howto/functional.rst:1073 msgid "" "A related function is :func:`itertools.accumulate(iterable, func=operator." "add) `. It performs the same calculation, but instead " @@ -1114,11 +1114,11 @@ msgid "" "that also yields each partial result::" msgstr "" -#: ../../howto/functional.rst:1079 +#: ../../howto/functional.rst:1086 msgid "The operator module" msgstr "" -#: ../../howto/functional.rst:1081 +#: ../../howto/functional.rst:1088 msgid "" "The :mod:`operator` module was mentioned earlier. It contains a set of " "functions corresponding to Python's operators. These functions are often " @@ -1126,54 +1126,54 @@ msgid "" "functions that perform a single operation." msgstr "" -#: ../../howto/functional.rst:1086 +#: ../../howto/functional.rst:1093 msgid "Some of the functions in this module are:" msgstr "" -#: ../../howto/functional.rst:1088 +#: ../../howto/functional.rst:1095 msgid "" "Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " "``abs()``, ..." msgstr "" -#: ../../howto/functional.rst:1089 +#: ../../howto/functional.rst:1096 msgid "Logical operations: ``not_()``, ``truth()``." msgstr "" -#: ../../howto/functional.rst:1090 +#: ../../howto/functional.rst:1097 msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." msgstr "" -#: ../../howto/functional.rst:1091 +#: ../../howto/functional.rst:1098 msgid "" "Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." msgstr "" -#: ../../howto/functional.rst:1092 +#: ../../howto/functional.rst:1099 msgid "Object identity: ``is_()``, ``is_not()``." msgstr "" -#: ../../howto/functional.rst:1094 +#: ../../howto/functional.rst:1101 msgid "Consult the operator module's documentation for a complete list." msgstr "" -#: ../../howto/functional.rst:1098 +#: ../../howto/functional.rst:1105 msgid "Small functions and the lambda expression" msgstr "" -#: ../../howto/functional.rst:1100 +#: ../../howto/functional.rst:1107 msgid "" "When writing functional-style programs, you'll often need little functions " "that act as predicates or that combine elements in some way." msgstr "" -#: ../../howto/functional.rst:1103 +#: ../../howto/functional.rst:1110 msgid "" "If there's a Python built-in or a module function that's suitable, you don't " "need to define a new function at all::" msgstr "" -#: ../../howto/functional.rst:1109 +#: ../../howto/functional.rst:1116 msgid "" "If the function you need doesn't exist, you need to write it. One way to " "write small functions is to use the :keyword:`lambda` expression. " @@ -1182,19 +1182,19 @@ msgid "" "expression::" msgstr "" -#: ../../howto/functional.rst:1118 +#: ../../howto/functional.rst:1125 msgid "" "An alternative is to just use the ``def`` statement and define a function in " "the usual way::" msgstr "" -#: ../../howto/functional.rst:1127 +#: ../../howto/functional.rst:1134 msgid "" "Which alternative is preferable? That's a style question; my usual course " "is to avoid using ``lambda``." msgstr "" -#: ../../howto/functional.rst:1130 +#: ../../howto/functional.rst:1137 msgid "" "One reason for my preference is that ``lambda`` is quite limited in the " "functions it can define. The result has to be computable as a single " @@ -1204,66 +1204,66 @@ msgid "" "that's hard to read. Quick, what's the following code doing? ::" msgstr "" -#: ../../howto/functional.rst:1140 +#: ../../howto/functional.rst:1147 msgid "" "You can figure it out, but it takes time to disentangle the expression to " "figure out what's going on. Using a short nested ``def`` statements makes " "things a little bit better::" msgstr "" -#: ../../howto/functional.rst:1150 +#: ../../howto/functional.rst:1157 msgid "But it would be best of all if I had simply used a ``for`` loop::" msgstr "" -#: ../../howto/functional.rst:1156 +#: ../../howto/functional.rst:1163 msgid "Or the :func:`sum` built-in and a generator expression::" msgstr "" -#: ../../howto/functional.rst:1160 +#: ../../howto/functional.rst:1167 msgid "" "Many uses of :func:`functools.reduce` are clearer when written as ``for`` " "loops." msgstr "" -#: ../../howto/functional.rst:1162 +#: ../../howto/functional.rst:1169 msgid "" "Fredrik Lundh once suggested the following set of rules for refactoring uses " "of ``lambda``:" msgstr "" -#: ../../howto/functional.rst:1165 +#: ../../howto/functional.rst:1172 msgid "Write a lambda function." msgstr "" -#: ../../howto/functional.rst:1166 +#: ../../howto/functional.rst:1173 msgid "Write a comment explaining what the heck that lambda does." msgstr "" -#: ../../howto/functional.rst:1167 +#: ../../howto/functional.rst:1174 msgid "" "Study the comment for a while, and think of a name that captures the essence " "of the comment." msgstr "" -#: ../../howto/functional.rst:1169 +#: ../../howto/functional.rst:1176 msgid "Convert the lambda to a def statement, using that name." msgstr "" -#: ../../howto/functional.rst:1170 +#: ../../howto/functional.rst:1177 msgid "Remove the comment." msgstr "" -#: ../../howto/functional.rst:1172 +#: ../../howto/functional.rst:1179 msgid "" "I really like these rules, but you're free to disagree about whether this " "lambda-free style is better." msgstr "" -#: ../../howto/functional.rst:1177 +#: ../../howto/functional.rst:1184 msgid "Revision History and Acknowledgements" msgstr "" -#: ../../howto/functional.rst:1179 +#: ../../howto/functional.rst:1186 msgid "" "The author would like to thank the following people for offering " "suggestions, corrections and assistance with various drafts of this article: " @@ -1271,40 +1271,40 @@ msgid "" "Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake Winton." msgstr "" -#: ../../howto/functional.rst:1184 +#: ../../howto/functional.rst:1191 msgid "Version 0.1: posted June 30 2006." msgstr "" -#: ../../howto/functional.rst:1186 +#: ../../howto/functional.rst:1193 msgid "Version 0.11: posted July 1 2006. Typo fixes." msgstr "" -#: ../../howto/functional.rst:1188 +#: ../../howto/functional.rst:1195 msgid "" "Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " "one. Typo fixes." msgstr "" -#: ../../howto/functional.rst:1191 +#: ../../howto/functional.rst:1198 msgid "" "Version 0.21: Added more references suggested on the tutor mailing list." msgstr "" -#: ../../howto/functional.rst:1193 +#: ../../howto/functional.rst:1200 msgid "" "Version 0.30: Adds a section on the ``functional`` module written by Collin " "Winter; adds short section on the operator module; a few other edits." msgstr "" -#: ../../howto/functional.rst:1198 +#: ../../howto/functional.rst:1205 msgid "References" msgstr "" -#: ../../howto/functional.rst:1201 +#: ../../howto/functional.rst:1208 msgid "General" msgstr "" -#: ../../howto/functional.rst:1203 +#: ../../howto/functional.rst:1210 msgid "" "**Structure and Interpretation of Computer Programs**, by Harold Abelson and " "Gerald Jay Sussman with Julie Sussman. Full text at https://mitpress.mit." @@ -1315,33 +1315,33 @@ msgid "" "Python code." msgstr "" -#: ../../howto/functional.rst:1211 +#: ../../howto/functional.rst:1218 msgid "" "http://www.defmacro.org/ramblings/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " "introduction." msgstr "" -#: ../../howto/functional.rst:1214 +#: ../../howto/functional.rst:1221 msgid "" "https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia " "entry describing functional programming." msgstr "" -#: ../../howto/functional.rst:1217 +#: ../../howto/functional.rst:1224 msgid "https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines." msgstr "" -#: ../../howto/functional.rst:1219 +#: ../../howto/functional.rst:1226 msgid "" "https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying." msgstr "" -#: ../../howto/functional.rst:1222 +#: ../../howto/functional.rst:1229 msgid "Python-specific" msgstr "" -#: ../../howto/functional.rst:1224 +#: ../../howto/functional.rst:1231 msgid "" "http://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" "reference:`Text Processing in Python` discusses functional programming for " @@ -1349,7 +1349,7 @@ msgid "" "Text Processing\"." msgstr "" -#: ../../howto/functional.rst:1229 +#: ../../howto/functional.rst:1236 msgid "" "Mertz also wrote a 3-part series of articles on functional programming for " "IBM's DeveloperWorks site; see `part 1 `__," msgstr "" -#: ../../howto/functional.rst:1237 +#: ../../howto/functional.rst:1244 msgid "Python documentation" msgstr "" -#: ../../howto/functional.rst:1239 +#: ../../howto/functional.rst:1246 msgid "Documentation for the :mod:`itertools` module." msgstr "" -#: ../../howto/functional.rst:1241 +#: ../../howto/functional.rst:1248 msgid "Documentation for the :mod:`functools` module." msgstr "" -#: ../../howto/functional.rst:1243 +#: ../../howto/functional.rst:1250 msgid "Documentation for the :mod:`operator` module." msgstr "" -#: ../../howto/functional.rst:1245 +#: ../../howto/functional.rst:1252 msgid ":pep:`289`: \"Generator Expressions\"" msgstr "" -#: ../../howto/functional.rst:1247 +#: ../../howto/functional.rst:1254 msgid "" ":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " "generator features in Python 2.5." diff --git a/library/dis.po b/library/dis.po index e062c2f149..0fd97a5643 100644 --- a/library/dis.po +++ b/library/dis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-08 16:23+0000\n" +"POT-Creation-Date: 2022-06-26 00:18+0000\n" "PO-Revision-Date: 2018-07-27 16:55+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -600,8 +600,8 @@ msgstr "" #: ../../library/dis.rst:594 msgid "" -"Implements ``PUSH(get_awaitable(TOS.__anext__()))``. See ``GET_AWAITABLE`` " -"for details about ``get_awaitable``" +"Pushes ``get_awaitable(TOS.__anext__())`` to the stack. See " +"``GET_AWAITABLE`` for details about ``get_awaitable``." msgstr "" #: ../../library/dis.rst:602 diff --git a/library/sqlite3.po b/library/sqlite3.po index f0f0edee41..e6d7e47412 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-20 00:14+0000\n" +"POT-Creation-Date: 2022-06-26 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -191,42 +191,42 @@ msgid "" "html#threadsafe>`_ do not match the DB-API 2.0 ``threadsafety`` levels." msgstr "" -#: ../../library/sqlite3.rst:184 ../../library/sqlite3.rst:197 +#: ../../library/sqlite3.rst:184 msgid "" -"This constant is meant to be used with the *detect_types* parameter of the :" -"func:`connect` function." +"Pass this flag value to the *detect_types* parameter of :func:`connect` to " +"look up a converter function using the declared types for each column. The " +"types are declared when the database table is created. ``sqlite3`` will look " +"up a converter function using the first word of the declared type as the " +"converter dictionary key. For example:" msgstr "" -#: ../../library/sqlite3.rst:187 +#: ../../library/sqlite3.rst:201 msgid "" -"Setting it makes the :mod:`sqlite3` module parse the declared type for each " -"column it returns. It will parse out the first word of the declared type, " -"i. e. for \"integer primary key\", it will parse out \"integer\", or for " -"\"number(10)\" it will parse out \"number\". Then for that column, it will " -"look into the converters dictionary and use the converter function " -"registered for that type there." +"This flag may be combined with :const:`PARSE_COLNAMES` using the ``|`` " +"(bitwise or) operator." msgstr "" -#: ../../library/sqlite3.rst:200 +#: ../../library/sqlite3.rst:207 msgid "" -"Setting this makes the SQLite interface parse the column name for each " -"column it returns. It will look for a string formed [mytype] in there, and " -"then decide that 'mytype' is the type of the column. It will try to find an " -"entry of 'mytype' in the converters dictionary and then use the converter " -"function found there to return the value. The column name found in :attr:" -"`Cursor.description` does not include the type, i. e. if you use something " -"like ``'as \"Expiration date [datetime]\"'`` in your SQL, then we will parse " -"out everything until the first ``'['`` for the column name and strip the " -"preceding space: the column name would simply be \"Expiration date\"." +"Pass this flag value to the *detect_types* parameter of :func:`connect` to " +"look up a converter function by using the type name, parsed from the query " +"column name, as the converter dictionary key. The type name must be wrapped " +"in square brackets (``[]``)." msgstr "" -#: ../../library/sqlite3.rst:213 +#: ../../library/sqlite3.rst:217 +msgid "" +"This flag may be combined with :const:`PARSE_DECLTYPES` using the ``|`` " +"(bitwise or) operator." +msgstr "" + +#: ../../library/sqlite3.rst:223 msgid "" "Opens a connection to the SQLite database file *database*. By default " "returns a :class:`Connection` object, unless a custom *factory* is given." msgstr "" -#: ../../library/sqlite3.rst:216 +#: ../../library/sqlite3.rst:226 msgid "" "*database* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the database file to be " @@ -234,7 +234,7 @@ msgid "" "database that resides in RAM instead of on disk." msgstr "" -#: ../../library/sqlite3.rst:221 +#: ../../library/sqlite3.rst:231 msgid "" "When a database is accessed by multiple connections, and one of the " "processes modifies the database, the SQLite database is locked until that " @@ -243,31 +243,31 @@ msgid "" "The default for the timeout parameter is 5.0 (five seconds)." msgstr "" -#: ../../library/sqlite3.rst:227 +#: ../../library/sqlite3.rst:237 msgid "" "For the *isolation_level* parameter, please see the :attr:`~Connection." "isolation_level` property of :class:`Connection` objects." msgstr "" -#: ../../library/sqlite3.rst:230 +#: ../../library/sqlite3.rst:240 msgid "" "SQLite natively supports only the types TEXT, INTEGER, REAL, BLOB and NULL. " "If you want to use other types you must add support for them yourself. The " -"*detect_types* parameter and the using custom **converters** registered with " -"the module-level :func:`register_converter` function allow you to easily do " -"that." +"*detect_types* parameter and using custom **converters** registered with the " +"module-level :func:`register_converter` function allow you to easily do that." msgstr "" -#: ../../library/sqlite3.rst:235 +#: ../../library/sqlite3.rst:245 msgid "" -"*detect_types* defaults to 0 (i. e. off, no type detection), you can set it " -"to any combination of :const:`PARSE_DECLTYPES` and :const:`PARSE_COLNAMES` " -"to turn type detection on. Due to SQLite behaviour, types can't be detected " -"for generated fields (for example ``max(data)``), even when *detect_types* " -"parameter is set. In such case, the returned type is :class:`str`." +"*detect_types* defaults to 0 (type detection disabled). Set it to any " +"combination (using ``|``, bitwise or) of :const:`PARSE_DECLTYPES` and :const:" +"`PARSE_COLNAMES` to enable type detection. Column names takes precedence " +"over declared types if both flags are set. Types cannot be detected for " +"generated fields (for example ``max(data)``), even when the *detect_types* " +"parameter is set. In such cases, the returned type is :class:`str`." msgstr "" -#: ../../library/sqlite3.rst:241 +#: ../../library/sqlite3.rst:254 msgid "" "By default, *check_same_thread* is :const:`True` and only the creating " "thread may use the connection. If set :const:`False`, the returned " @@ -276,7 +276,7 @@ msgid "" "the user to avoid data corruption." msgstr "" -#: ../../library/sqlite3.rst:246 +#: ../../library/sqlite3.rst:259 msgid "" "By default, the :mod:`sqlite3` module uses its :class:`Connection` class for " "the connect call. You can, however, subclass the :class:`Connection` class " @@ -284,11 +284,11 @@ msgid "" "the *factory* parameter." msgstr "" -#: ../../library/sqlite3.rst:251 +#: ../../library/sqlite3.rst:264 msgid "Consult the section :ref:`sqlite3-types` of this manual for details." msgstr "" -#: ../../library/sqlite3.rst:253 +#: ../../library/sqlite3.rst:266 msgid "" "The :mod:`sqlite3` module internally uses a statement cache to avoid SQL " "parsing overhead. If you want to explicitly set the number of statements " @@ -296,7 +296,7 @@ msgid "" "parameter. The currently implemented default is to cache 100 statements." msgstr "" -#: ../../library/sqlite3.rst:258 +#: ../../library/sqlite3.rst:271 msgid "" "If *uri* is :const:`True`, *database* is interpreted as a :abbr:`URI " "(Uniform Resource Identifier)` with a file path and an optional query " @@ -305,57 +305,63 @@ msgid "" "parameters to SQLite. Some useful URI tricks include::" msgstr "" -#: ../../library/sqlite3.rst:277 +#: ../../library/sqlite3.rst:290 msgid "" "More information about this feature, including a list of recognized " "parameters, can be found in the `SQLite URI documentation `_." msgstr "" -#: ../../library/sqlite3.rst:281 +#: ../../library/sqlite3.rst:294 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect`` with argument " "``database``." msgstr "" -#: ../../library/sqlite3.rst:282 +#: ../../library/sqlite3.rst:295 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect/handle`` with " "argument ``connection_handle``." msgstr "" -#: ../../library/sqlite3.rst:284 +#: ../../library/sqlite3.rst:297 msgid "Added the *uri* parameter." msgstr "新增 *uri* 參數。" -#: ../../library/sqlite3.rst:287 +#: ../../library/sqlite3.rst:300 msgid "" "*database* can now also be a :term:`path-like object`, not only a string." msgstr "" -#: ../../library/sqlite3.rst:290 +#: ../../library/sqlite3.rst:303 msgid "Added the ``sqlite3.connect/handle`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:296 +#: ../../library/sqlite3.rst:309 msgid "" -"Registers a callable to convert a bytestring from the database into a custom " -"Python type. The callable will be invoked for all database values that are " -"of the type *typename*. Confer the parameter *detect_types* of the :func:" -"`connect` function for how the type detection works. Note that *typename* " -"and the name of the type in your query are matched in case-insensitive " -"manner." +"Register the *converter* callable to convert SQLite objects of type " +"*typename* into a Python object of a specific type. The converter is invoked " +"for all SQLite values of type *typename*; it is passed a :class:`bytes` " +"object and should return an object of the desired Python type. Consult the " +"parameter *detect_types* of :func:`connect` for information regarding how " +"type detection works." msgstr "" -#: ../../library/sqlite3.rst:305 +#: ../../library/sqlite3.rst:317 msgid "" -"Registers a callable to convert the custom Python type *type* into one of " -"SQLite's supported types. The callable *callable* accepts as single " -"parameter the Python value, and must return a value of the following types: " -"int, float, str or bytes." +"Note: *typename* and the name of the type in your query are matched case-" +"insensitively." msgstr "" -#: ../../library/sqlite3.rst:313 +#: ../../library/sqlite3.rst:323 +msgid "" +"Register an *adapter* callable to adapt the Python type *type* into an " +"SQLite type. The adapter is called with a Python object of type *type* as " +"its sole argument, and must return a value of a :ref:`type that SQLite " +"natively understands`." +msgstr "" + +#: ../../library/sqlite3.rst:332 msgid "" "Returns :const:`True` if the string *statement* contains one or more " "complete SQL statements terminated by semicolons. It does not verify that " @@ -363,12 +369,12 @@ msgid "" "literals and the statement is terminated by a semicolon." msgstr "" -#: ../../library/sqlite3.rst:318 +#: ../../library/sqlite3.rst:337 msgid "" "This can be used to build a shell for SQLite, as in the following example:" msgstr "" -#: ../../library/sqlite3.rst:326 +#: ../../library/sqlite3.rst:345 msgid "" "By default you will not get any tracebacks in user-defined functions, " "aggregates, converters, authorizer callbacks etc. If you want to debug them, " @@ -377,72 +383,72 @@ msgid "" "disable the feature again." msgstr "" -#: ../../library/sqlite3.rst:336 +#: ../../library/sqlite3.rst:355 msgid "Connection Objects" msgstr "" -#: ../../library/sqlite3.rst:340 +#: ../../library/sqlite3.rst:359 msgid "An SQLite database connection has the following attributes and methods:" msgstr "" -#: ../../library/sqlite3.rst:344 +#: ../../library/sqlite3.rst:363 msgid "" "Get or set the current default isolation level. :const:`None` for autocommit " "mode or one of \"DEFERRED\", \"IMMEDIATE\" or \"EXCLUSIVE\". See section :" "ref:`sqlite3-controlling-transactions` for a more detailed explanation." msgstr "" -#: ../../library/sqlite3.rst:350 +#: ../../library/sqlite3.rst:369 msgid "" ":const:`True` if a transaction is active (there are uncommitted changes), :" "const:`False` otherwise. Read-only attribute." msgstr "" -#: ../../library/sqlite3.rst:357 +#: ../../library/sqlite3.rst:376 msgid "" "The cursor method accepts a single optional parameter *factory*. If " "supplied, this must be a callable returning an instance of :class:`Cursor` " "or its subclasses." msgstr "" -#: ../../library/sqlite3.rst:363 +#: ../../library/sqlite3.rst:382 msgid "" "Commit any pending transaction to the database. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:368 +#: ../../library/sqlite3.rst:387 msgid "" "Roll back to the start of any pending transaction. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:373 +#: ../../library/sqlite3.rst:392 msgid "" "Close the database connection. Any pending transaction is not committed " "implicitly; make sure to :meth:`commit` before closing to avoid losing " "pending changes." msgstr "" -#: ../../library/sqlite3.rst:380 +#: ../../library/sqlite3.rst:399 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " "with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:386 +#: ../../library/sqlite3.rst:405 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " "it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:392 +#: ../../library/sqlite3.rst:411 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " "on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:398 +#: ../../library/sqlite3.rst:417 msgid "" "Creates a user-defined function that you can later use from within SQL " "statements under the function name *name*. *narg* is the number of " @@ -455,26 +461,26 @@ msgid "" "versions." msgstr "" -#: ../../library/sqlite3.rst:408 +#: ../../library/sqlite3.rst:427 msgid "" "The function can return any of the types supported by SQLite: bytes, str, " "int, float and ``None``." msgstr "" -#: ../../library/sqlite3.rst:411 +#: ../../library/sqlite3.rst:430 msgid "The *deterministic* parameter was added." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:414 ../../library/sqlite3.rst:431 -#: ../../library/sqlite3.rst:560 ../../library/sqlite3.rst:711 +#: ../../library/sqlite3.rst:433 ../../library/sqlite3.rst:450 +#: ../../library/sqlite3.rst:579 ../../library/sqlite3.rst:730 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:421 +#: ../../library/sqlite3.rst:440 msgid "Creates a user-defined aggregate function." msgstr "" -#: ../../library/sqlite3.rst:423 +#: ../../library/sqlite3.rst:442 msgid "" "The aggregate class must implement a ``step`` method, which accepts the " "number of parameters *n_arg* (if *n_arg* is -1, the function may take any " @@ -482,47 +488,47 @@ msgid "" "result of the aggregate." msgstr "" -#: ../../library/sqlite3.rst:428 +#: ../../library/sqlite3.rst:447 msgid "" "The ``finalize`` method can return any of the types supported by SQLite: " "bytes, str, int, float and ``None``." msgstr "" -#: ../../library/sqlite3.rst:438 +#: ../../library/sqlite3.rst:457 msgid "" "Create a collation named *name* using the collating function *callable*. " "*callable* is passed two :class:`string ` arguments, and it should " "return an :class:`integer `:" msgstr "" -#: ../../library/sqlite3.rst:442 +#: ../../library/sqlite3.rst:461 msgid "``1`` if the first is ordered higher than the second" msgstr "" -#: ../../library/sqlite3.rst:443 +#: ../../library/sqlite3.rst:462 msgid "``-1`` if the first is ordered lower than the second" msgstr "" -#: ../../library/sqlite3.rst:444 +#: ../../library/sqlite3.rst:463 msgid "``0`` if they are ordered equal" msgstr "" -#: ../../library/sqlite3.rst:446 +#: ../../library/sqlite3.rst:465 msgid "The following example shows a reverse sorting collation:" msgstr "" -#: ../../library/sqlite3.rst:450 +#: ../../library/sqlite3.rst:469 msgid "Remove a collation function by setting *callable* to :const:`None`." msgstr "" -#: ../../library/sqlite3.rst:455 +#: ../../library/sqlite3.rst:474 msgid "" "You can call this method from a different thread to abort any queries that " "might be executing on the connection. The query will then abort and the " "caller will get an exception." msgstr "" -#: ../../library/sqlite3.rst:462 +#: ../../library/sqlite3.rst:481 msgid "" "This routine registers a callback. The callback is invoked for each attempt " "to access a column of a table in the database. The callback should return :" @@ -532,7 +538,7 @@ msgid "" "in the :mod:`sqlite3` module." msgstr "" -#: ../../library/sqlite3.rst:469 +#: ../../library/sqlite3.rst:488 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or :const:`None` " @@ -543,7 +549,7 @@ msgid "" "code." msgstr "" -#: ../../library/sqlite3.rst:476 +#: ../../library/sqlite3.rst:495 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -551,7 +557,7 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:483 +#: ../../library/sqlite3.rst:502 msgid "" "This routine registers a callback. The callback is invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -559,26 +565,26 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:488 +#: ../../library/sqlite3.rst:507 msgid "" "If you want to clear any previously installed progress handler, call the " "method with :const:`None` for *progress_handler*." msgstr "" -#: ../../library/sqlite3.rst:491 +#: ../../library/sqlite3.rst:510 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise an :exc:`OperationalError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:498 +#: ../../library/sqlite3.rst:517 msgid "" "Registers *trace_callback* to be called for each SQL statement that is " "actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:501 +#: ../../library/sqlite3.rst:520 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -588,19 +594,19 @@ msgid "" "of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:509 +#: ../../library/sqlite3.rst:528 msgid "" "Passing :const:`None` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:512 +#: ../../library/sqlite3.rst:531 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:522 +#: ../../library/sqlite3.rst:541 msgid "" "This routine allows/disallows the SQLite engine to load SQLite extensions " "from shared libraries. SQLite extensions can define new functions, " @@ -608,38 +614,38 @@ msgid "" "extension is the fulltext-search extension distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:527 ../../library/sqlite3.rst:544 +#: ../../library/sqlite3.rst:546 ../../library/sqlite3.rst:563 msgid "Loadable extensions are disabled by default. See [#f1]_." msgstr "" -#: ../../library/sqlite3.rst:529 +#: ../../library/sqlite3.rst:548 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.enable_load_extension`` " "with arguments ``connection``, ``enabled``." msgstr "" -#: ../../library/sqlite3.rst:533 +#: ../../library/sqlite3.rst:552 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:540 +#: ../../library/sqlite3.rst:559 msgid "" "This routine loads an SQLite extension from a shared library. You have to " "enable extension loading with :meth:`enable_load_extension` before you can " "use this routine." msgstr "" -#: ../../library/sqlite3.rst:546 +#: ../../library/sqlite3.rst:565 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.load_extension`` with " "arguments ``connection``, ``path``." msgstr "" -#: ../../library/sqlite3.rst:550 +#: ../../library/sqlite3.rst:569 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:555 +#: ../../library/sqlite3.rst:574 msgid "" "You can change this attribute to a callable that accepts the cursor and the " "original row as a tuple and will return the real result row. This way, you " @@ -647,7 +653,7 @@ msgid "" "object that can also access columns by name." msgstr "" -#: ../../library/sqlite3.rst:564 +#: ../../library/sqlite3.rst:583 msgid "" "If returning a tuple doesn't suffice and you want name-based access to " "columns, you should consider setting :attr:`row_factory` to the highly-" @@ -657,7 +663,7 @@ msgid "" "approach or even a db_row based solution." msgstr "" -#: ../../library/sqlite3.rst:576 +#: ../../library/sqlite3.rst:595 msgid "" "Using this attribute you can control what objects are returned for the " "``TEXT`` data type. By default, this attribute is set to :class:`str` and " @@ -665,23 +671,23 @@ msgid "" "you want to return :class:`bytes` instead, you can set it to :class:`bytes`." msgstr "" -#: ../../library/sqlite3.rst:581 +#: ../../library/sqlite3.rst:600 msgid "" "You can also set it to any other callable that accepts a single bytestring " "parameter and returns the resulting object." msgstr "" -#: ../../library/sqlite3.rst:584 +#: ../../library/sqlite3.rst:603 msgid "See the following example code for illustration:" msgstr "" -#: ../../library/sqlite3.rst:591 +#: ../../library/sqlite3.rst:610 msgid "" "Returns the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:597 +#: ../../library/sqlite3.rst:616 msgid "" "Returns an iterator to dump the database in an SQL text format. Useful when " "saving an in-memory database for later restoration. This function provides " @@ -689,14 +695,14 @@ msgid "" "shell." msgstr "" -#: ../../library/sqlite3.rst:602 +#: ../../library/sqlite3.rst:621 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/sqlite3.rst:616 +#: ../../library/sqlite3.rst:635 msgid "" "This method makes a backup of an SQLite database even while it's being " "accessed by other clients, or concurrently by the same connection. The copy " @@ -704,14 +710,14 @@ msgid "" "class:`Connection` instance." msgstr "" -#: ../../library/sqlite3.rst:621 +#: ../../library/sqlite3.rst:640 msgid "" "By default, or when *pages* is either ``0`` or a negative integer, the " "entire database is copied in a single step; otherwise the method performs a " "loop copying up to *pages* pages at a time." msgstr "" -#: ../../library/sqlite3.rst:625 +#: ../../library/sqlite3.rst:644 msgid "" "If *progress* is specified, it must either be ``None`` or a callable object " "that will be executed at each iteration with three integer arguments, " @@ -719,7 +725,7 @@ msgid "" "pages still to be copied and the *total* number of pages." msgstr "" -#: ../../library/sqlite3.rst:630 +#: ../../library/sqlite3.rst:649 msgid "" "The *name* argument specifies the database name that will be copied: it must " "be a string containing either ``\"main\"``, the default, to indicate the " @@ -728,36 +734,36 @@ msgid "" "an attached database." msgstr "" -#: ../../library/sqlite3.rst:636 +#: ../../library/sqlite3.rst:655 msgid "" "The *sleep* argument specifies the number of seconds to sleep by between " "successive attempts to backup remaining pages, can be specified either as an " "integer or a floating point value." msgstr "" -#: ../../library/sqlite3.rst:640 +#: ../../library/sqlite3.rst:659 msgid "Example 1, copy an existing database into another::" msgstr "" -#: ../../library/sqlite3.rst:654 +#: ../../library/sqlite3.rst:673 msgid "Example 2, copy an existing database into a transient copy::" msgstr "" -#: ../../library/sqlite3.rst:668 +#: ../../library/sqlite3.rst:687 msgid "Cursor Objects" msgstr "" -#: ../../library/sqlite3.rst:672 +#: ../../library/sqlite3.rst:691 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:679 +#: ../../library/sqlite3.rst:698 msgid "" "Executes an SQL statement. Values may be bound to the statement using :ref:" "`placeholders `." msgstr "" -#: ../../library/sqlite3.rst:682 +#: ../../library/sqlite3.rst:701 msgid "" ":meth:`execute` will only execute a single SQL statement. If you try to " "execute more than one statement with it, it will raise a :exc:`Warning`. " @@ -765,7 +771,7 @@ msgid "" "with one call." msgstr "" -#: ../../library/sqlite3.rst:690 +#: ../../library/sqlite3.rst:709 msgid "" "Executes a :ref:`parameterized ` SQL command against " "all parameter sequences or mappings found in the sequence " @@ -773,11 +779,11 @@ msgid "" "`iterator` yielding parameters instead of a sequence." msgstr "" -#: ../../library/sqlite3.rst:697 +#: ../../library/sqlite3.rst:716 msgid "Here's a shorter example using a :term:`generator`:" msgstr "" -#: ../../library/sqlite3.rst:704 +#: ../../library/sqlite3.rst:723 msgid "" "This is a nonstandard convenience method for executing multiple SQL " "statements at once. It issues a ``COMMIT`` statement first, then executes " @@ -785,23 +791,23 @@ msgid "" "`isolation_level`; any transaction control must be added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:709 +#: ../../library/sqlite3.rst:728 msgid "*sql_script* can be an instance of :class:`str`." msgstr "" -#: ../../library/sqlite3.rst:718 +#: ../../library/sqlite3.rst:737 msgid "" "Fetches the next row of a query result set, returning a single sequence, or :" "const:`None` when no more data is available." msgstr "" -#: ../../library/sqlite3.rst:724 +#: ../../library/sqlite3.rst:743 msgid "" "Fetches the next set of rows of a query result, returning a list. An empty " "list is returned when no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:727 +#: ../../library/sqlite3.rst:746 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If it is not given, the cursor's arraysize determines the number of rows to " @@ -810,7 +816,7 @@ msgid "" "not being available, fewer rows may be returned." msgstr "" -#: ../../library/sqlite3.rst:733 +#: ../../library/sqlite3.rst:752 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -818,42 +824,42 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:740 +#: ../../library/sqlite3.rst:759 msgid "" "Fetches all (remaining) rows of a query result, returning a list. Note that " "the cursor's arraysize attribute can affect the performance of this " "operation. An empty list is returned when no rows are available." msgstr "" -#: ../../library/sqlite3.rst:746 +#: ../../library/sqlite3.rst:765 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:748 +#: ../../library/sqlite3.rst:767 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:753 ../../library/sqlite3.rst:757 +#: ../../library/sqlite3.rst:772 ../../library/sqlite3.rst:776 msgid "Required by the DB-API. Does nothing in :mod:`sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:761 +#: ../../library/sqlite3.rst:780 msgid "" "Although the :class:`Cursor` class of the :mod:`sqlite3` module implements " "this attribute, the database engine's own support for the determination of " "\"rows affected\"/\"rows selected\" is quirky." msgstr "" -#: ../../library/sqlite3.rst:765 +#: ../../library/sqlite3.rst:784 msgid "" "For :meth:`executemany` statements, the number of modifications are summed " "up into :attr:`rowcount`." msgstr "" -#: ../../library/sqlite3.rst:768 +#: ../../library/sqlite3.rst:787 msgid "" "As required by the Python DB API Spec, the :attr:`rowcount` attribute \"is " "-1 in case no ``executeXX()`` has been performed on the cursor or the " @@ -862,7 +868,7 @@ msgid "" "rows a query produced until all rows were fetched." msgstr "" -#: ../../library/sqlite3.rst:776 +#: ../../library/sqlite3.rst:795 msgid "" "This read-only attribute provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -872,33 +878,33 @@ msgid "" "const:`None`." msgstr "" -#: ../../library/sqlite3.rst:784 +#: ../../library/sqlite3.rst:803 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:786 +#: ../../library/sqlite3.rst:805 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:791 +#: ../../library/sqlite3.rst:810 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:796 +#: ../../library/sqlite3.rst:815 msgid "" "This read-only attribute provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are :const:`None`." msgstr "" -#: ../../library/sqlite3.rst:800 +#: ../../library/sqlite3.rst:819 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:804 +#: ../../library/sqlite3.rst:823 msgid "" "This read-only attribute provides the SQLite database :class:`Connection` " "used by the :class:`Cursor` object. A :class:`Cursor` object created by " @@ -906,56 +912,56 @@ msgid "" "`connection` attribute that refers to *con*::" msgstr "" -#: ../../library/sqlite3.rst:817 +#: ../../library/sqlite3.rst:836 msgid "Row Objects" msgstr "" -#: ../../library/sqlite3.rst:821 +#: ../../library/sqlite3.rst:840 msgid "" "A :class:`Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It tries to mimic a tuple in " "most of its features." msgstr "" -#: ../../library/sqlite3.rst:825 +#: ../../library/sqlite3.rst:844 msgid "" "It supports mapping access by column name and index, iteration, " "representation, equality testing and :func:`len`." msgstr "" -#: ../../library/sqlite3.rst:828 +#: ../../library/sqlite3.rst:847 msgid "" "If two :class:`Row` objects have exactly the same columns and their members " "are equal, they compare equal." msgstr "" -#: ../../library/sqlite3.rst:833 +#: ../../library/sqlite3.rst:852 msgid "" "This method returns a list of column names. Immediately after a query, it is " "the first member of each tuple in :attr:`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:836 +#: ../../library/sqlite3.rst:855 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:839 +#: ../../library/sqlite3.rst:858 msgid "Let's assume we initialize a table as in the example given above::" msgstr "" -#: ../../library/sqlite3.rst:851 +#: ../../library/sqlite3.rst:870 msgid "Now we plug :class:`Row` in::" msgstr "" -#: ../../library/sqlite3.rst:883 +#: ../../library/sqlite3.rst:902 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:885 +#: ../../library/sqlite3.rst:904 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:889 +#: ../../library/sqlite3.rst:908 msgid "" "This exception is raised by ``sqlite3`` if an SQL query is not a :class:" "`string `, or if multiple statements are passed to :meth:`~Cursor." @@ -963,21 +969,21 @@ msgid "" "`Exception`." msgstr "" -#: ../../library/sqlite3.rst:896 +#: ../../library/sqlite3.rst:915 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:902 +#: ../../library/sqlite3.rst:921 msgid "" "This exception is raised by ``sqlite3`` for fetch across rollback, or if " "``sqlite3`` is unable to bind parameters. ``InterfaceError`` is a subclass " "of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:908 +#: ../../library/sqlite3.rst:927 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -985,14 +991,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:915 +#: ../../library/sqlite3.rst:934 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:921 +#: ../../library/sqlite3.rst:940 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -1000,20 +1006,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:929 +#: ../../library/sqlite3.rst:948 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:934 +#: ../../library/sqlite3.rst:953 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:941 +#: ../../library/sqlite3.rst:960 msgid "" "Exception raised for ``sqlite3`` API programming errors, for example trying " "to operate on a closed :class:`Connection`, or trying to execute non-DML " @@ -1021,7 +1027,7 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:948 +#: ../../library/sqlite3.rst:967 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to :const:" @@ -1030,82 +1036,82 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:958 +#: ../../library/sqlite3.rst:977 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:962 +#: ../../library/sqlite3.rst:981 msgid "Introduction" msgstr "簡介" -#: ../../library/sqlite3.rst:964 +#: ../../library/sqlite3.rst:983 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:967 +#: ../../library/sqlite3.rst:986 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:970 ../../library/sqlite3.rst:987 +#: ../../library/sqlite3.rst:989 ../../library/sqlite3.rst:1006 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:970 ../../library/sqlite3.rst:987 +#: ../../library/sqlite3.rst:989 ../../library/sqlite3.rst:1006 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:972 ../../library/sqlite3.rst:989 +#: ../../library/sqlite3.rst:991 ../../library/sqlite3.rst:1008 msgid ":const:`None`" msgstr ":const:`None`" -#: ../../library/sqlite3.rst:972 ../../library/sqlite3.rst:989 +#: ../../library/sqlite3.rst:991 ../../library/sqlite3.rst:1008 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:974 ../../library/sqlite3.rst:991 +#: ../../library/sqlite3.rst:993 ../../library/sqlite3.rst:1010 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:974 ../../library/sqlite3.rst:991 +#: ../../library/sqlite3.rst:993 ../../library/sqlite3.rst:1010 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:976 ../../library/sqlite3.rst:993 +#: ../../library/sqlite3.rst:995 ../../library/sqlite3.rst:1012 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:976 ../../library/sqlite3.rst:993 +#: ../../library/sqlite3.rst:995 ../../library/sqlite3.rst:1012 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:978 +#: ../../library/sqlite3.rst:997 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:978 ../../library/sqlite3.rst:995 +#: ../../library/sqlite3.rst:997 ../../library/sqlite3.rst:1014 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:980 ../../library/sqlite3.rst:998 +#: ../../library/sqlite3.rst:999 ../../library/sqlite3.rst:1017 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:980 ../../library/sqlite3.rst:998 +#: ../../library/sqlite3.rst:999 ../../library/sqlite3.rst:1017 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:984 +#: ../../library/sqlite3.rst:1003 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:995 +#: ../../library/sqlite3.rst:1014 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1001 +#: ../../library/sqlite3.rst:1020 msgid "" "The type system of the :mod:`sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via object " @@ -1113,157 +1119,142 @@ msgid "" "to different Python types via converters." msgstr "" -#: ../../library/sqlite3.rst:1008 -msgid "Using adapters to store additional Python types in SQLite databases" +#: ../../library/sqlite3.rst:1027 +msgid "Using adapters to store custom Python types in SQLite databases" msgstr "" -#: ../../library/sqlite3.rst:1010 +#: ../../library/sqlite3.rst:1029 msgid "" -"As described before, SQLite supports only a limited set of types natively. " -"To use other Python types with SQLite, you must **adapt** them to one of the " -"sqlite3 module's supported types for SQLite: one of NoneType, int, float, " -"str, bytes." +"SQLite supports only a limited set of data types natively. To store custom " +"Python types in SQLite databases, *adapt* them to one of the :ref:`Python " +"types SQLite natively understands`." msgstr "" -#: ../../library/sqlite3.rst:1015 +#: ../../library/sqlite3.rst:1033 msgid "" -"There are two ways to enable the :mod:`sqlite3` module to adapt a custom " -"Python type to one of the supported ones." +"There are two ways to adapt Python objects to SQLite types: letting your " +"object adapt itself, or using an *adapter callable*. The latter will take " +"precedence above the former. For a library that exports a custom type, it " +"may make sense to enable that type to adapt itself. As an application " +"developer, it may make more sense to take direct control by registering " +"custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:1020 +#: ../../library/sqlite3.rst:1043 msgid "Letting your object adapt itself" msgstr "" -#: ../../library/sqlite3.rst:1022 -msgid "" -"This is a good approach if you write the class yourself. Let's suppose you " -"have a class like this::" -msgstr "" - -#: ../../library/sqlite3.rst:1029 +#: ../../library/sqlite3.rst:1045 msgid "" -"Now you want to store the point in a single SQLite column. First you'll " -"have to choose one of the supported types to be used for representing the " -"point. Let's just use str and separate the coordinates using a semicolon. " -"Then you need to give your class a method ``__conform__(self, protocol)`` " -"which must return the converted value. The parameter *protocol* will be :" -"class:`PrepareProtocol`." +"Suppose we have a ``Point`` class that represents a pair of coordinates, " +"``x`` and ``y``, in a Cartesian coordinate system. The coordinate pair will " +"be stored as a text string in the database, using a semicolon to separate " +"the coordinates. This can be implemented by adding a ``__conform__(self, " +"protocol)`` method which returns the adapted value. The object passed to " +"*protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1039 +#: ../../library/sqlite3.rst:1057 msgid "Registering an adapter callable" msgstr "" -#: ../../library/sqlite3.rst:1041 +#: ../../library/sqlite3.rst:1059 msgid "" -"The other possibility is to create a function that converts the type to the " -"string representation and register the function with :meth:" -"`register_adapter`." +"The other possibility is to create a function that converts the Python " +"object to an SQLite-compatible type. This function can then be registered " +"using :func:`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1046 -msgid "" -"The :mod:`sqlite3` module has two default adapters for Python's built-in :" -"class:`datetime.date` and :class:`datetime.datetime` types. Now let's " -"suppose we want to store :class:`datetime.datetime` objects not in ISO " -"representation, but as a Unix timestamp." -msgstr "" - -#: ../../library/sqlite3.rst:1055 +#: ../../library/sqlite3.rst:1067 msgid "Converting SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1057 +#: ../../library/sqlite3.rst:1069 msgid "" -"Writing an adapter lets you send custom Python types to SQLite. But to make " -"it really useful we need to make the Python to SQLite to Python roundtrip " -"work." +"Writing an adapter lets you convert *from* custom Python types *to* SQLite " +"values. To be able to convert *from* SQLite values *to* custom Python types, " +"we use *converters*." msgstr "" -#: ../../library/sqlite3.rst:1060 -msgid "Enter converters." -msgstr "" - -#: ../../library/sqlite3.rst:1062 +#: ../../library/sqlite3.rst:1074 msgid "" "Let's go back to the :class:`Point` class. We stored the x and y coordinates " "separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1065 +#: ../../library/sqlite3.rst:1077 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1070 +#: ../../library/sqlite3.rst:1082 msgid "" -"Converter functions **always** get called with a :class:`bytes` object, no " -"matter under which data type you sent the value to SQLite." +"Converter functions are **always** passed a :class:`bytes` object, no matter " +"the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:1079 +#: ../../library/sqlite3.rst:1091 msgid "" -"Now you need to make the :mod:`sqlite3` module know that what you select " -"from the database is actually a point. There are two ways of doing this:" +"We now need to tell ``sqlite3`` when it should convert a given SQLite value. " +"This is done when connecting to a database, using the *detect_types* " +"parameter of :func:`connect`. There are three options:" msgstr "" -#: ../../library/sqlite3.rst:1082 -msgid "Implicitly via the declared type" +#: ../../library/sqlite3.rst:1095 +msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:1084 -msgid "Explicitly via the column name" +#: ../../library/sqlite3.rst:1096 +msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:1086 +#: ../../library/sqlite3.rst:1097 msgid "" -"Both ways are described in section :ref:`sqlite3-module-contents`, in the " -"entries for the constants :const:`PARSE_DECLTYPES` and :const:" -"`PARSE_COLNAMES`." +"Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." +"PARSE_COLNAMES``. Colum names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:1089 -msgid "The following example illustrates both approaches." +#: ../../library/sqlite3.rst:1101 +msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:1095 +#: ../../library/sqlite3.rst:1107 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1097 +#: ../../library/sqlite3.rst:1109 msgid "" "There are default adapters for the date and datetime types in the datetime " "module. They will be sent as ISO dates/ISO timestamps to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1100 +#: ../../library/sqlite3.rst:1112 msgid "" "The default converters are registered under the name \"date\" for :class:" "`datetime.date` and under the name \"timestamp\" for :class:`datetime." "datetime`." msgstr "" -#: ../../library/sqlite3.rst:1104 +#: ../../library/sqlite3.rst:1116 msgid "" "This way, you can use date/timestamps from Python without any additional " "fiddling in most cases. The format of the adapters is also compatible with " "the experimental SQLite date/time functions." msgstr "" -#: ../../library/sqlite3.rst:1108 +#: ../../library/sqlite3.rst:1120 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1112 +#: ../../library/sqlite3.rst:1124 msgid "" "If a timestamp stored in SQLite has a fractional part longer than 6 numbers, " "its value will be truncated to microsecond precision by the timestamp " "converter." msgstr "" -#: ../../library/sqlite3.rst:1118 +#: ../../library/sqlite3.rst:1130 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1271,17 +1262,25 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1126 +#: ../../library/sqlite3.rst:1139 +msgid "Adapter and Converter Recipes" +msgstr "" + +#: ../../library/sqlite3.rst:1141 +msgid "This section shows recipes for common adapters and converters." +msgstr "" + +#: ../../library/sqlite3.rst:1184 msgid "Controlling Transactions" msgstr "" -#: ../../library/sqlite3.rst:1128 +#: ../../library/sqlite3.rst:1186 msgid "" "The underlying ``sqlite3`` library operates in ``autocommit`` mode by " "default, but the Python :mod:`sqlite3` module by default does not." msgstr "" -#: ../../library/sqlite3.rst:1131 +#: ../../library/sqlite3.rst:1189 msgid "" "``autocommit`` mode means that statements that modify the database take " "effect immediately. A ``BEGIN`` or ``SAVEPOINT`` statement disables " @@ -1289,14 +1288,14 @@ msgid "" "ends the outermost transaction, turns ``autocommit`` mode back on." msgstr "" -#: ../../library/sqlite3.rst:1136 +#: ../../library/sqlite3.rst:1194 msgid "" "The Python :mod:`sqlite3` module by default issues a ``BEGIN`` statement " "implicitly before a Data Modification Language (DML) statement (i.e. " "``INSERT``/``UPDATE``/``DELETE``/``REPLACE``)." msgstr "" -#: ../../library/sqlite3.rst:1140 +#: ../../library/sqlite3.rst:1198 msgid "" "You can control which kind of ``BEGIN`` statements :mod:`sqlite3` implicitly " "executes via the *isolation_level* parameter to the :func:`connect` call, or " @@ -1306,7 +1305,7 @@ msgid "" "``EXCLUSIVE``." msgstr "" -#: ../../library/sqlite3.rst:1147 +#: ../../library/sqlite3.rst:1205 msgid "" "You can disable the :mod:`sqlite3` module's implicit transaction management " "by setting :attr:`isolation_level` to ``None``. This will leave the " @@ -1316,27 +1315,27 @@ msgid "" "code." msgstr "" -#: ../../library/sqlite3.rst:1153 +#: ../../library/sqlite3.rst:1211 msgid "" "Note that :meth:`~Cursor.executescript` disregards :attr:`isolation_level`; " "any transaction control must be added explicitly." msgstr "" -#: ../../library/sqlite3.rst:1156 +#: ../../library/sqlite3.rst:1214 msgid "" ":mod:`sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: ../../library/sqlite3.rst:1162 +#: ../../library/sqlite3.rst:1220 msgid "Using :mod:`sqlite3` efficiently" msgstr "" -#: ../../library/sqlite3.rst:1166 +#: ../../library/sqlite3.rst:1224 msgid "Using shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:1168 +#: ../../library/sqlite3.rst:1226 msgid "" "Using the nonstandard :meth:`execute`, :meth:`executemany` and :meth:" "`executescript` methods of the :class:`Connection` object, your code can be " @@ -1348,27 +1347,27 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:1180 +#: ../../library/sqlite3.rst:1238 msgid "Accessing columns by name instead of by index" msgstr "" -#: ../../library/sqlite3.rst:1182 +#: ../../library/sqlite3.rst:1240 msgid "" "One useful feature of the :mod:`sqlite3` module is the built-in :class:" "`sqlite3.Row` class designed to be used as a row factory." msgstr "" -#: ../../library/sqlite3.rst:1185 +#: ../../library/sqlite3.rst:1243 msgid "" "Rows wrapped with this class can be accessed both by index (like tuples) and " "case-insensitively by name:" msgstr "" -#: ../../library/sqlite3.rst:1194 +#: ../../library/sqlite3.rst:1252 msgid "Using the connection as a context manager" msgstr "" -#: ../../library/sqlite3.rst:1196 +#: ../../library/sqlite3.rst:1254 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -1378,23 +1377,23 @@ msgid "" "exception, the transaction is rolled back." msgstr "" -#: ../../library/sqlite3.rst:1205 +#: ../../library/sqlite3.rst:1263 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, the context manager is a no-op." msgstr "" -#: ../../library/sqlite3.rst:1210 +#: ../../library/sqlite3.rst:1268 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection." msgstr "" -#: ../../library/sqlite3.rst:1217 +#: ../../library/sqlite3.rst:1275 msgid "Footnotes" msgstr "註解" -#: ../../library/sqlite3.rst:1218 +#: ../../library/sqlite3.rst:1276 msgid "" "The sqlite3 module is not built with loadable extension support by default, " "because some platforms (notably macOS) have SQLite libraries which are " From d9638dca04646e659077cd55ab96cedea0c82aa6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 Jun 2022 00:18:38 +0000 Subject: [PATCH 10/11] sync with cpython fd26f29c --- c-api/typeobj.po | 8 +- faq/programming.po | 604 ++++++++++++++++++++++----------------------- 2 files changed, 307 insertions(+), 305 deletions(-) diff --git a/c-api/typeobj.po b/c-api/typeobj.po index a24a7a806f..bacda0b2c3 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-11 00:15+0000\n" +"POT-Creation-Date: 2022-06-27 00:16+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3351,11 +3351,13 @@ msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`\\ 。" #: ../../c-api/typeobj.rst:2525 -msgid "See :c:member:`~PyTypeObject.tp_descrget`." +#, fuzzy +msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "請見 :c:member:`~PyTypeObject.tp_descrget`\\ 。" #: ../../c-api/typeobj.rst:2529 -msgid "See :c:member:`~PyTypeObject.tp_descrset`." +#, fuzzy +msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "請見 :c:member:`~PyTypeObject.tp_descrset`\\ 。" #: ../../c-api/typeobj.rst:2533 diff --git a/faq/programming.po b/faq/programming.po index d5042fadf4..e5f47a105c 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-06-27 00:16+0000\n" "PO-Revision-Date: 2018-05-23 14:35+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -543,39 +543,39 @@ msgstr "" msgid "" ":term:`Parameters ` are defined by the names that appear in a " "function definition, whereas :term:`arguments ` are the values " -"actually passed to a function when calling it. Parameters define what types " -"of arguments a function can accept. For example, given the function " -"definition::" +"actually passed to a function when calling it. Parameters define what :term:" +"`kind of arguments ` a function can accept. For example, given " +"the function definition::" msgstr "" -#: ../../faq/programming.rst:418 +#: ../../faq/programming.rst:419 msgid "" "*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " "``func``, for example::" msgstr "" -#: ../../faq/programming.rst:423 +#: ../../faq/programming.rst:424 msgid "the values ``42``, ``314``, and ``somevar`` are arguments." msgstr "" -#: ../../faq/programming.rst:427 +#: ../../faq/programming.rst:428 msgid "Why did changing list 'y' also change list 'x'?" msgstr "" -#: ../../faq/programming.rst:429 +#: ../../faq/programming.rst:430 msgid "If you wrote code like::" msgstr "" -#: ../../faq/programming.rst:439 +#: ../../faq/programming.rst:440 msgid "" "you might be wondering why appending an element to ``y`` changed ``x`` too." msgstr "" -#: ../../faq/programming.rst:441 +#: ../../faq/programming.rst:442 msgid "There are two factors that produce this result:" msgstr "" -#: ../../faq/programming.rst:443 +#: ../../faq/programming.rst:444 msgid "" "Variables are simply names that refer to objects. Doing ``y = x`` doesn't " "create a copy of the list -- it creates a new variable ``y`` that refers to " @@ -583,23 +583,23 @@ msgid "" "(the list), and both ``x`` and ``y`` refer to it." msgstr "" -#: ../../faq/programming.rst:447 +#: ../../faq/programming.rst:448 msgid "" "Lists are :term:`mutable`, which means that you can change their content." msgstr "" -#: ../../faq/programming.rst:449 +#: ../../faq/programming.rst:450 msgid "" "After the call to :meth:`~list.append`, the content of the mutable object " "has changed from ``[]`` to ``[10]``. Since both the variables refer to the " "same object, using either name accesses the modified value ``[10]``." msgstr "" -#: ../../faq/programming.rst:453 +#: ../../faq/programming.rst:454 msgid "If we instead assign an immutable object to ``x``::" msgstr "" -#: ../../faq/programming.rst:463 +#: ../../faq/programming.rst:464 msgid "" "we can see that in this case ``x`` and ``y`` are not equal anymore. This is " "because integers are :term:`immutable`, and when we do ``x = x + 1`` we are " @@ -610,7 +610,7 @@ msgid "" "(``x`` now refers to ``6`` but ``y`` still refers to ``5``)." msgstr "" -#: ../../faq/programming.rst:471 +#: ../../faq/programming.rst:472 msgid "" "Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the " "object, whereas superficially similar operations (for example ``y = y + " @@ -622,7 +622,7 @@ msgid "" "your program to generate an easily diagnosed error." msgstr "" -#: ../../faq/programming.rst:480 +#: ../../faq/programming.rst:481 msgid "" "However, there is one class of operations where the same operation sometimes " "has different behaviors with different types: the augmented assignment " @@ -632,18 +632,18 @@ msgid "" "1`` create new objects)." msgstr "" -#: ../../faq/programming.rst:487 +#: ../../faq/programming.rst:488 msgid "In other words:" msgstr "" -#: ../../faq/programming.rst:489 +#: ../../faq/programming.rst:490 msgid "" "If we have a mutable object (:class:`list`, :class:`dict`, :class:`set`, " "etc.), we can use some specific operations to mutate it and all the " "variables that refer to it will see the change." msgstr "" -#: ../../faq/programming.rst:492 +#: ../../faq/programming.rst:493 msgid "" "If we have an immutable object (:class:`str`, :class:`int`, :class:`tuple`, " "etc.), all the variables that refer to it will always see the same value, " @@ -651,17 +651,17 @@ msgid "" "new object." msgstr "" -#: ../../faq/programming.rst:497 +#: ../../faq/programming.rst:498 msgid "" "If you want to know if two variables refer to the same object or not, you " "can use the :keyword:`is` operator, or the built-in function :func:`id`." msgstr "" -#: ../../faq/programming.rst:502 +#: ../../faq/programming.rst:503 msgid "How do I write a function with output parameters (call by reference)?" msgstr "" -#: ../../faq/programming.rst:504 +#: ../../faq/programming.rst:505 msgid "" "Remember that arguments are passed by assignment in Python. Since " "assignment just creates references to objects, there's no alias between an " @@ -669,44 +669,44 @@ msgid "" "You can achieve the desired effect in a number of ways." msgstr "" -#: ../../faq/programming.rst:509 +#: ../../faq/programming.rst:510 msgid "By returning a tuple of the results::" msgstr "" -#: ../../faq/programming.rst:520 +#: ../../faq/programming.rst:521 msgid "This is almost always the clearest solution." msgstr "" -#: ../../faq/programming.rst:522 +#: ../../faq/programming.rst:523 msgid "" "By using global variables. This isn't thread-safe, and is not recommended." msgstr "" -#: ../../faq/programming.rst:524 +#: ../../faq/programming.rst:525 msgid "By passing a mutable (changeable in-place) object::" msgstr "" -#: ../../faq/programming.rst:535 +#: ../../faq/programming.rst:536 msgid "By passing in a dictionary that gets mutated::" msgstr "" -#: ../../faq/programming.rst:546 +#: ../../faq/programming.rst:547 msgid "Or bundle up values in a class instance::" msgstr "" -#: ../../faq/programming.rst:563 +#: ../../faq/programming.rst:564 msgid "There's almost never a good reason to get this complicated." msgstr "" -#: ../../faq/programming.rst:565 +#: ../../faq/programming.rst:566 msgid "Your best choice is to return a tuple containing the multiple results." msgstr "" -#: ../../faq/programming.rst:569 +#: ../../faq/programming.rst:570 msgid "How do you make a higher order function in Python?" msgstr "" -#: ../../faq/programming.rst:571 +#: ../../faq/programming.rst:572 msgid "" "You have two choices: you can use nested scopes or you can use callable " "objects. For example, suppose you wanted to define ``linear(a,b)`` which " @@ -714,71 +714,71 @@ msgid "" "scopes::" msgstr "" -#: ../../faq/programming.rst:580 +#: ../../faq/programming.rst:581 msgid "Or using a callable object::" msgstr "" -#: ../../faq/programming.rst:590 +#: ../../faq/programming.rst:591 msgid "In both cases, ::" msgstr "" -#: ../../faq/programming.rst:594 +#: ../../faq/programming.rst:595 msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." msgstr "" -#: ../../faq/programming.rst:596 +#: ../../faq/programming.rst:597 msgid "" "The callable object approach has the disadvantage that it is a bit slower " "and results in slightly longer code. However, note that a collection of " "callables can share their signature via inheritance::" msgstr "" -#: ../../faq/programming.rst:605 +#: ../../faq/programming.rst:606 msgid "Object can encapsulate state for several methods::" msgstr "" -#: ../../faq/programming.rst:623 +#: ../../faq/programming.rst:624 msgid "" "Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " "same counting variable." msgstr "" -#: ../../faq/programming.rst:628 +#: ../../faq/programming.rst:629 msgid "How do I copy an object in Python?" msgstr "" -#: ../../faq/programming.rst:630 +#: ../../faq/programming.rst:631 msgid "" "In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general " "case. Not all objects can be copied, but most can." msgstr "" -#: ../../faq/programming.rst:633 +#: ../../faq/programming.rst:634 msgid "" "Some objects can be copied more easily. Dictionaries have a :meth:`~dict." "copy` method::" msgstr "" -#: ../../faq/programming.rst:638 +#: ../../faq/programming.rst:639 msgid "Sequences can be copied by slicing::" msgstr "" -#: ../../faq/programming.rst:644 +#: ../../faq/programming.rst:645 msgid "How can I find the methods or attributes of an object?" msgstr "" -#: ../../faq/programming.rst:646 +#: ../../faq/programming.rst:647 msgid "" "For an instance x of a user-defined class, ``dir(x)`` returns an " "alphabetized list of the names containing the instance attributes and " "methods and attributes defined by its class." msgstr "" -#: ../../faq/programming.rst:652 +#: ../../faq/programming.rst:653 msgid "How can my code discover the name of an object?" msgstr "" -#: ../../faq/programming.rst:654 +#: ../../faq/programming.rst:655 msgid "" "Generally speaking, it can't, because objects don't really have names. " "Essentially, assignment always binds a name to a value; the same is true of " @@ -786,7 +786,7 @@ msgid "" "Consider the following code::" msgstr "" -#: ../../faq/programming.rst:670 +#: ../../faq/programming.rst:671 msgid "" "Arguably the class has a name: even though it is bound to two names and " "invoked through the name B the created instance is still reported as an " @@ -794,7 +794,7 @@ msgid "" "instance's name is a or b, since both names are bound to the same value." msgstr "" -#: ../../faq/programming.rst:675 +#: ../../faq/programming.rst:676 msgid "" "Generally speaking it should not be necessary for your code to \"know the " "names\" of particular values. Unless you are deliberately writing " @@ -802,13 +802,13 @@ msgid "" "approach might be beneficial." msgstr "" -#: ../../faq/programming.rst:680 +#: ../../faq/programming.rst:681 msgid "" "In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " "to this question:" msgstr "" -#: ../../faq/programming.rst:683 +#: ../../faq/programming.rst:684 msgid "" "The same way as you get the name of that cat you found on your porch: the " "cat (object) itself cannot tell you its name, and it doesn't really care -- " @@ -816,77 +816,77 @@ msgid "" "(namespaces) if it's their cat (object)..." msgstr "" -#: ../../faq/programming.rst:688 +#: ../../faq/programming.rst:689 msgid "" "....and don't be surprised if you'll find that it's known by many names, or " "no name at all!" msgstr "" -#: ../../faq/programming.rst:693 +#: ../../faq/programming.rst:694 msgid "What's up with the comma operator's precedence?" msgstr "" -#: ../../faq/programming.rst:695 +#: ../../faq/programming.rst:696 msgid "Comma is not an operator in Python. Consider this session::" msgstr "" -#: ../../faq/programming.rst:700 +#: ../../faq/programming.rst:701 msgid "" "Since the comma is not an operator, but a separator between expressions the " "above is evaluated as if you had entered::" msgstr "" -#: ../../faq/programming.rst:705 +#: ../../faq/programming.rst:706 msgid "not::" msgstr "" -#: ../../faq/programming.rst:709 +#: ../../faq/programming.rst:710 msgid "" "The same is true of the various assignment operators (``=``, ``+=`` etc). " "They are not truly operators but syntactic delimiters in assignment " "statements." msgstr "" -#: ../../faq/programming.rst:714 +#: ../../faq/programming.rst:715 msgid "Is there an equivalent of C's \"?:\" ternary operator?" msgstr "" -#: ../../faq/programming.rst:716 +#: ../../faq/programming.rst:717 msgid "Yes, there is. The syntax is as follows::" msgstr "" -#: ../../faq/programming.rst:723 +#: ../../faq/programming.rst:724 msgid "" "Before this syntax was introduced in Python 2.5, a common idiom was to use " "logical operators::" msgstr "" -#: ../../faq/programming.rst:728 +#: ../../faq/programming.rst:729 msgid "" "However, this idiom is unsafe, as it can give wrong results when *on_true* " "has a false boolean value. Therefore, it is always better to use the ``... " "if ... else ...`` form." msgstr "" -#: ../../faq/programming.rst:734 +#: ../../faq/programming.rst:735 msgid "Is it possible to write obfuscated one-liners in Python?" msgstr "" -#: ../../faq/programming.rst:736 +#: ../../faq/programming.rst:737 msgid "" "Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" "lambda`. See the following three examples, due to Ulf Bartelt::" msgstr "" -#: ../../faq/programming.rst:763 +#: ../../faq/programming.rst:764 msgid "Don't try this at home, kids!" msgstr "" -#: ../../faq/programming.rst:769 +#: ../../faq/programming.rst:770 msgid "What does the slash(/) in the parameter list of a function mean?" msgstr "" -#: ../../faq/programming.rst:771 +#: ../../faq/programming.rst:772 msgid "" "A slash in the argument list of a function denotes that the parameters prior " "to it are positional-only. Positional-only parameters are the ones without " @@ -896,53 +896,53 @@ msgid "" "only parameters. Its documentation looks like this::" msgstr "" -#: ../../faq/programming.rst:784 +#: ../../faq/programming.rst:785 msgid "" "The slash at the end of the parameter list means that both parameters are " "positional-only. Thus, calling :func:`divmod` with keyword arguments would " "lead to an error::" msgstr "" -#: ../../faq/programming.rst:795 +#: ../../faq/programming.rst:796 msgid "Numbers and strings" msgstr "" -#: ../../faq/programming.rst:798 +#: ../../faq/programming.rst:799 msgid "How do I specify hexadecimal and octal integers?" msgstr "" -#: ../../faq/programming.rst:800 +#: ../../faq/programming.rst:801 msgid "" "To specify an octal digit, precede the octal value with a zero, and then a " "lower or uppercase \"o\". For example, to set the variable \"a\" to the " "octal value \"10\" (8 in decimal), type::" msgstr "" -#: ../../faq/programming.rst:808 +#: ../../faq/programming.rst:809 msgid "" "Hexadecimal is just as easy. Simply precede the hexadecimal number with a " "zero, and then a lower or uppercase \"x\". Hexadecimal digits can be " "specified in lower or uppercase. For example, in the Python interpreter::" msgstr "" -#: ../../faq/programming.rst:821 +#: ../../faq/programming.rst:822 msgid "Why does -22 // 10 return -3?" msgstr "" -#: ../../faq/programming.rst:823 +#: ../../faq/programming.rst:824 msgid "" "It's primarily driven by the desire that ``i % j`` have the same sign as " "``j``. If you want that, and also want::" msgstr "" -#: ../../faq/programming.rst:828 +#: ../../faq/programming.rst:829 msgid "" "then integer division has to return the floor. C also requires that " "identity to hold, and then compilers that truncate ``i // j`` need to make " "``i % j`` have the same sign as ``i``." msgstr "" -#: ../../faq/programming.rst:832 +#: ../../faq/programming.rst:833 msgid "" "There are few real use cases for ``i % j`` when ``j`` is negative. When " "``j`` is positive, there are many, and in virtually all of them it's more " @@ -951,34 +951,34 @@ msgid "" "bug waiting to bite." msgstr "" -#: ../../faq/programming.rst:840 +#: ../../faq/programming.rst:841 msgid "How do I get int literal attribute instead of SyntaxError?" msgstr "" -#: ../../faq/programming.rst:842 +#: ../../faq/programming.rst:843 msgid "" "Trying to lookup an ``int`` literal attribute in the normal manner gives a " "syntax error because the period is seen as a decimal point::" msgstr "" -#: ../../faq/programming.rst:851 +#: ../../faq/programming.rst:852 msgid "" "The solution is to separate the literal from the period with either a space " "or parentheses." msgstr "" -#: ../../faq/programming.rst:861 +#: ../../faq/programming.rst:862 msgid "How do I convert a string to a number?" msgstr "" -#: ../../faq/programming.rst:863 +#: ../../faq/programming.rst:864 msgid "" "For integers, use the built-in :func:`int` type constructor, e.g. " "``int('144') == 144``. Similarly, :func:`float` converts to floating-point, " "e.g. ``float('144') == 144.0``." msgstr "" -#: ../../faq/programming.rst:867 +#: ../../faq/programming.rst:868 msgid "" "By default, these interpret the number as decimal, so that ``int('0144') == " "144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " @@ -988,7 +988,7 @@ msgid "" "octal, and '0x' indicates a hex number." msgstr "" -#: ../../faq/programming.rst:874 +#: ../../faq/programming.rst:875 msgid "" "Do not use the built-in function :func:`eval` if all you need is to convert " "strings to numbers. :func:`eval` will be significantly slower and it " @@ -998,18 +998,18 @@ msgid "" "directory." msgstr "" -#: ../../faq/programming.rst:881 +#: ../../faq/programming.rst:882 msgid "" ":func:`eval` also has the effect of interpreting numbers as Python " "expressions, so that e.g. ``eval('09')`` gives a syntax error because Python " "does not allow leading '0' in a decimal number (except '0')." msgstr "" -#: ../../faq/programming.rst:887 +#: ../../faq/programming.rst:888 msgid "How do I convert a number to a string?" msgstr "" -#: ../../faq/programming.rst:889 +#: ../../faq/programming.rst:890 msgid "" "To convert, e.g., the number 144 to the string '144', use the built-in type " "constructor :func:`str`. If you want a hexadecimal or octal representation, " @@ -1019,11 +1019,11 @@ msgid "" "format(1.0/3.0)`` yields ``'0.333'``." msgstr "" -#: ../../faq/programming.rst:898 +#: ../../faq/programming.rst:899 msgid "How do I modify a string in place?" msgstr "" -#: ../../faq/programming.rst:900 +#: ../../faq/programming.rst:901 msgid "" "You can't, because strings are immutable. In most situations, you should " "simply construct a new string from the various parts you want to assemble it " @@ -1032,15 +1032,15 @@ msgid "" "module::" msgstr "" -#: ../../faq/programming.rst:930 +#: ../../faq/programming.rst:931 msgid "How do I use strings to call functions/methods?" msgstr "" -#: ../../faq/programming.rst:932 +#: ../../faq/programming.rst:933 msgid "There are various techniques." msgstr "" -#: ../../faq/programming.rst:934 +#: ../../faq/programming.rst:935 msgid "" "The best is to use a dictionary that maps strings to functions. The primary " "advantage of this technique is that the strings do not need to match the " @@ -1048,31 +1048,31 @@ msgid "" "a case construct::" msgstr "" -#: ../../faq/programming.rst:949 +#: ../../faq/programming.rst:950 msgid "Use the built-in function :func:`getattr`::" msgstr "" -#: ../../faq/programming.rst:954 +#: ../../faq/programming.rst:955 msgid "" "Note that :func:`getattr` works on any object, including classes, class " "instances, modules, and so on." msgstr "" -#: ../../faq/programming.rst:957 +#: ../../faq/programming.rst:958 msgid "This is used in several places in the standard library, like this::" msgstr "" -#: ../../faq/programming.rst:970 +#: ../../faq/programming.rst:971 msgid "Use :func:`locals` to resolve the function name::" msgstr "" -#: ../../faq/programming.rst:982 +#: ../../faq/programming.rst:983 msgid "" "Is there an equivalent to Perl's chomp() for removing trailing newlines from " "strings?" msgstr "" -#: ../../faq/programming.rst:984 +#: ../../faq/programming.rst:985 msgid "" "You can use ``S.rstrip(\"\\r\\n\")`` to remove all occurrences of any line " "terminator from the end of the string ``S`` without removing other trailing " @@ -1081,21 +1081,21 @@ msgid "" "removed::" msgstr "" -#: ../../faq/programming.rst:996 +#: ../../faq/programming.rst:997 msgid "" "Since this is typically only desired when reading text one line at a time, " "using ``S.rstrip()`` this way works well." msgstr "" -#: ../../faq/programming.rst:1001 +#: ../../faq/programming.rst:1002 msgid "Is there a scanf() or sscanf() equivalent?" msgstr "" -#: ../../faq/programming.rst:1003 +#: ../../faq/programming.rst:1004 msgid "Not as such." msgstr "" -#: ../../faq/programming.rst:1005 +#: ../../faq/programming.rst:1006 msgid "" "For simple input parsing, the easiest approach is usually to split the line " "into whitespace-delimited words using the :meth:`~str.split` method of " @@ -1105,86 +1105,86 @@ msgid "" "as a separator." msgstr "" -#: ../../faq/programming.rst:1011 +#: ../../faq/programming.rst:1012 msgid "" "For more complicated input parsing, regular expressions are more powerful " "than C's :c:func:`sscanf` and better suited for the task." msgstr "" -#: ../../faq/programming.rst:1016 +#: ../../faq/programming.rst:1017 msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?" msgstr "" -#: ../../faq/programming.rst:1018 +#: ../../faq/programming.rst:1019 msgid "See the :ref:`unicode-howto`." msgstr "" -#: ../../faq/programming.rst:1022 +#: ../../faq/programming.rst:1023 msgid "Performance" msgstr "" -#: ../../faq/programming.rst:1025 +#: ../../faq/programming.rst:1026 msgid "My program is too slow. How do I speed it up?" msgstr "" -#: ../../faq/programming.rst:1027 +#: ../../faq/programming.rst:1028 msgid "" "That's a tough one, in general. First, here are a list of things to " "remember before diving further:" msgstr "" -#: ../../faq/programming.rst:1030 +#: ../../faq/programming.rst:1031 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." msgstr "" -#: ../../faq/programming.rst:1032 +#: ../../faq/programming.rst:1033 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." msgstr "" -#: ../../faq/programming.rst:1034 +#: ../../faq/programming.rst:1035 msgid "" "You should always find the hot spots in your program *before* attempting to " "optimize any code (see the :mod:`profile` module)." msgstr "" -#: ../../faq/programming.rst:1036 +#: ../../faq/programming.rst:1037 msgid "" "Writing benchmark scripts will allow you to iterate quickly when searching " "for improvements (see the :mod:`timeit` module)." msgstr "" -#: ../../faq/programming.rst:1038 +#: ../../faq/programming.rst:1039 msgid "" "It is highly recommended to have good code coverage (through unit testing or " "any other technique) before potentially introducing regressions hidden in " "sophisticated optimizations." msgstr "" -#: ../../faq/programming.rst:1042 +#: ../../faq/programming.rst:1043 msgid "" "That being said, there are many tricks to speed up Python code. Here are " "some general principles which go a long way towards reaching acceptable " "performance levels:" msgstr "" -#: ../../faq/programming.rst:1046 +#: ../../faq/programming.rst:1047 msgid "" "Making your algorithms faster (or changing to faster ones) can yield much " "larger benefits than trying to sprinkle micro-optimization tricks all over " "your code." msgstr "" -#: ../../faq/programming.rst:1050 +#: ../../faq/programming.rst:1051 msgid "" "Use the right data structures. Study documentation for the :ref:`bltin-" "types` and the :mod:`collections` module." msgstr "" -#: ../../faq/programming.rst:1053 +#: ../../faq/programming.rst:1054 msgid "" "When the standard library provides a primitive for doing something, it is " "likely (although not guaranteed) to be faster than any alternative you may " @@ -1195,7 +1195,7 @@ msgid "" "advanced usage)." msgstr "" -#: ../../faq/programming.rst:1061 +#: ../../faq/programming.rst:1062 msgid "" "Abstractions tend to create indirections and force the interpreter to work " "more. If the levels of indirection outweigh the amount of useful work done, " @@ -1204,7 +1204,7 @@ msgid "" "detrimental to readability)." msgstr "" -#: ../../faq/programming.rst:1067 +#: ../../faq/programming.rst:1068 msgid "" "If you have reached the limit of what pure Python can allow, there are tools " "to take you further away. For example, `Cython `_ can " @@ -1216,17 +1216,17 @@ msgid "" "yourself." msgstr "" -#: ../../faq/programming.rst:1077 +#: ../../faq/programming.rst:1078 msgid "" "The wiki page devoted to `performance tips `_." msgstr "" -#: ../../faq/programming.rst:1083 +#: ../../faq/programming.rst:1084 msgid "What is the most efficient way to concatenate many strings together?" msgstr "" -#: ../../faq/programming.rst:1085 +#: ../../faq/programming.rst:1086 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -1234,38 +1234,38 @@ msgid "" "quadratic in the total string length." msgstr "" -#: ../../faq/programming.rst:1090 +#: ../../faq/programming.rst:1091 msgid "" "To accumulate many :class:`str` objects, the recommended idiom is to place " "them into a list and call :meth:`str.join` at the end::" msgstr "" -#: ../../faq/programming.rst:1098 +#: ../../faq/programming.rst:1099 msgid "(another reasonably efficient idiom is to use :class:`io.StringIO`)" msgstr "" -#: ../../faq/programming.rst:1100 +#: ../../faq/programming.rst:1101 msgid "" "To accumulate many :class:`bytes` objects, the recommended idiom is to " "extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " "operator)::" msgstr "" -#: ../../faq/programming.rst:1109 +#: ../../faq/programming.rst:1110 msgid "Sequences (Tuples/Lists)" msgstr "" -#: ../../faq/programming.rst:1112 +#: ../../faq/programming.rst:1113 msgid "How do I convert between tuples and lists?" msgstr "" -#: ../../faq/programming.rst:1114 +#: ../../faq/programming.rst:1115 msgid "" "The type constructor ``tuple(seq)`` converts any sequence (actually, any " "iterable) into a tuple with the same items in the same order." msgstr "" -#: ../../faq/programming.rst:1117 +#: ../../faq/programming.rst:1118 msgid "" "For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` " "yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a " @@ -1273,7 +1273,7 @@ msgid "" "you aren't sure that an object is already a tuple." msgstr "" -#: ../../faq/programming.rst:1122 +#: ../../faq/programming.rst:1123 msgid "" "The type constructor ``list(seq)`` converts any sequence or iterable into a " "list with the same items in the same order. For example, ``list((1, 2, " @@ -1281,11 +1281,11 @@ msgid "" "If the argument is a list, it makes a copy just like ``seq[:]`` would." msgstr "" -#: ../../faq/programming.rst:1129 +#: ../../faq/programming.rst:1130 msgid "What's a negative index?" msgstr "" -#: ../../faq/programming.rst:1131 +#: ../../faq/programming.rst:1132 msgid "" "Python sequences are indexed with positive numbers and negative numbers. " "For positive numbers 0 is the first index 1 is the second index and so " @@ -1294,62 +1294,62 @@ msgid "" "``seq[len(seq)-n]``." msgstr "" -#: ../../faq/programming.rst:1136 +#: ../../faq/programming.rst:1137 msgid "" "Using negative indices can be very convenient. For example ``S[:-1]`` is " "all of the string except for its last character, which is useful for " "removing the trailing newline from a string." msgstr "" -#: ../../faq/programming.rst:1142 +#: ../../faq/programming.rst:1143 msgid "How do I iterate over a sequence in reverse order?" msgstr "" -#: ../../faq/programming.rst:1144 +#: ../../faq/programming.rst:1145 msgid "Use the :func:`reversed` built-in function::" msgstr "" -#: ../../faq/programming.rst:1149 +#: ../../faq/programming.rst:1150 msgid "" "This won't touch your original sequence, but build a new copy with reversed " "order to iterate over." msgstr "" -#: ../../faq/programming.rst:1154 +#: ../../faq/programming.rst:1155 msgid "How do you remove duplicates from a list?" msgstr "" -#: ../../faq/programming.rst:1156 +#: ../../faq/programming.rst:1157 msgid "See the Python Cookbook for a long discussion of many ways to do this:" msgstr "" -#: ../../faq/programming.rst:1158 +#: ../../faq/programming.rst:1159 msgid "https://code.activestate.com/recipes/52560/" msgstr "https://code.activestate.com/recipes/52560/" -#: ../../faq/programming.rst:1160 +#: ../../faq/programming.rst:1161 msgid "" "If you don't mind reordering the list, sort it and then scan from the end of " "the list, deleting duplicates as you go::" msgstr "" -#: ../../faq/programming.rst:1172 +#: ../../faq/programming.rst:1173 msgid "" "If all elements of the list may be used as set keys (i.e. they are all :term:" "`hashable`) this is often faster ::" msgstr "" -#: ../../faq/programming.rst:1177 +#: ../../faq/programming.rst:1178 msgid "" "This converts the list into a set, thereby removing duplicates, and then " "back into a list." msgstr "" -#: ../../faq/programming.rst:1182 +#: ../../faq/programming.rst:1183 msgid "How do you remove multiple items from a list" msgstr "" -#: ../../faq/programming.rst:1184 +#: ../../faq/programming.rst:1185 msgid "" "As with removing duplicates, explicitly iterating in reverse with a delete " "condition is one possibility. However, it is easier and faster to use slice " @@ -1357,26 +1357,26 @@ msgid "" "variations.::" msgstr "" -#: ../../faq/programming.rst:1193 +#: ../../faq/programming.rst:1194 msgid "The list comprehension may be fastest." msgstr "" -#: ../../faq/programming.rst:1197 +#: ../../faq/programming.rst:1198 msgid "How do you make an array in Python?" msgstr "" -#: ../../faq/programming.rst:1199 +#: ../../faq/programming.rst:1200 msgid "Use a list::" msgstr "" -#: ../../faq/programming.rst:1203 +#: ../../faq/programming.rst:1204 msgid "" "Lists are equivalent to C or Pascal arrays in their time complexity; the " "primary difference is that a Python list can contain objects of many " "different types." msgstr "" -#: ../../faq/programming.rst:1206 +#: ../../faq/programming.rst:1207 msgid "" "The ``array`` module also provides methods for creating arrays of fixed " "types with compact representations, but they are slower to index than " @@ -1384,12 +1384,12 @@ msgid "" "like structures with various characteristics as well." msgstr "" -#: ../../faq/programming.rst:1211 +#: ../../faq/programming.rst:1212 msgid "" "To get Lisp-style linked lists, you can emulate cons cells using tuples::" msgstr "" -#: ../../faq/programming.rst:1215 +#: ../../faq/programming.rst:1216 msgid "" "If mutability is desired, you could use lists instead of tuples. Here the " "analogue of lisp car is ``lisp_list[0]`` and the analogue of cdr is " @@ -1397,23 +1397,23 @@ msgid "" "it's usually a lot slower than using Python lists." msgstr "" -#: ../../faq/programming.rst:1224 +#: ../../faq/programming.rst:1225 msgid "How do I create a multidimensional list?" msgstr "" -#: ../../faq/programming.rst:1226 +#: ../../faq/programming.rst:1227 msgid "You probably tried to make a multidimensional array like this::" msgstr "" -#: ../../faq/programming.rst:1230 +#: ../../faq/programming.rst:1231 msgid "This looks correct if you print it:" msgstr "" -#: ../../faq/programming.rst:1241 +#: ../../faq/programming.rst:1242 msgid "But when you assign a value, it shows up in multiple places:" msgstr "" -#: ../../faq/programming.rst:1253 +#: ../../faq/programming.rst:1254 msgid "" "The reason is that replicating a list with ``*`` doesn't create copies, it " "only creates references to the existing objects. The ``*3`` creates a list " @@ -1421,56 +1421,56 @@ msgid "" "will show in all rows, which is almost certainly not what you want." msgstr "" -#: ../../faq/programming.rst:1258 +#: ../../faq/programming.rst:1259 msgid "" "The suggested approach is to create a list of the desired length first and " "then fill in each element with a newly created list::" msgstr "" -#: ../../faq/programming.rst:1265 +#: ../../faq/programming.rst:1266 msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" msgstr "" -#: ../../faq/programming.rst:1271 +#: ../../faq/programming.rst:1272 msgid "" "Or, you can use an extension that provides a matrix datatype; `NumPy `_ is the best known." msgstr "" -#: ../../faq/programming.rst:1276 +#: ../../faq/programming.rst:1277 msgid "How do I apply a method to a sequence of objects?" msgstr "" -#: ../../faq/programming.rst:1278 +#: ../../faq/programming.rst:1279 msgid "Use a list comprehension::" msgstr "" -#: ../../faq/programming.rst:1285 +#: ../../faq/programming.rst:1286 msgid "" "Why does a_tuple[i] += ['item'] raise an exception when the addition works?" msgstr "" -#: ../../faq/programming.rst:1287 +#: ../../faq/programming.rst:1288 msgid "" "This is because of a combination of the fact that augmented assignment " "operators are *assignment* operators, and the difference between mutable and " "immutable objects in Python." msgstr "" -#: ../../faq/programming.rst:1291 +#: ../../faq/programming.rst:1292 msgid "" "This discussion applies in general when augmented assignment operators are " "applied to elements of a tuple that point to mutable objects, but we'll use " "a ``list`` and ``+=`` as our exemplar." msgstr "" -#: ../../faq/programming.rst:1295 +#: ../../faq/programming.rst:1296 msgid "If you wrote::" msgstr "" -#: ../../faq/programming.rst:1303 +#: ../../faq/programming.rst:1304 msgid "" "The reason for the exception should be immediately clear: ``1`` is added to " "the object ``a_tuple[0]`` points to (``1``), producing the result object, " @@ -1479,29 +1479,29 @@ msgid "" "an element of a tuple points to." msgstr "" -#: ../../faq/programming.rst:1309 +#: ../../faq/programming.rst:1310 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" msgstr "" -#: ../../faq/programming.rst:1318 +#: ../../faq/programming.rst:1319 msgid "" "It is the assignment part of the operation that produces the error, since a " "tuple is immutable." msgstr "" -#: ../../faq/programming.rst:1321 +#: ../../faq/programming.rst:1322 msgid "When you write something like::" msgstr "" -#: ../../faq/programming.rst:1329 +#: ../../faq/programming.rst:1330 msgid "" "The exception is a bit more surprising, and even more surprising is the fact " "that even though there was an error, the append worked::" msgstr "" -#: ../../faq/programming.rst:1335 +#: ../../faq/programming.rst:1336 msgid "" "To see why this happens, you need to know that (a) if an object implements " "an ``__iadd__`` magic method, it gets called when the ``+=`` augmented " @@ -1511,14 +1511,14 @@ msgid "" "that for lists, ``+=`` is a \"shorthand\" for ``list.extend``::" msgstr "" -#: ../../faq/programming.rst:1347 +#: ../../faq/programming.rst:1348 msgid "This is equivalent to::" msgstr "" "這等價於:\n" "\n" "::" -#: ../../faq/programming.rst:1352 +#: ../../faq/programming.rst:1353 msgid "" "The object pointed to by a_list has been mutated, and the pointer to the " "mutated object is assigned back to ``a_list``. The end result of the " @@ -1526,11 +1526,11 @@ msgid "" "``a_list`` was previously pointing to, but the assignment still happens." msgstr "" -#: ../../faq/programming.rst:1357 +#: ../../faq/programming.rst:1358 msgid "Thus, in our tuple example what is happening is equivalent to::" msgstr "" -#: ../../faq/programming.rst:1365 +#: ../../faq/programming.rst:1366 msgid "" "The ``__iadd__`` succeeds, and thus the list is extended, but even though " "``result`` points to the same object that ``a_tuple[0]`` already points to, " @@ -1538,13 +1538,13 @@ msgid "" "immutable." msgstr "" -#: ../../faq/programming.rst:1371 +#: ../../faq/programming.rst:1372 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" msgstr "" -#: ../../faq/programming.rst:1373 +#: ../../faq/programming.rst:1374 msgid "" "The technique, attributed to Randal Schwartz of the Perl community, sorts " "the elements of a list by a metric which maps each element to its \"sort " @@ -1552,25 +1552,25 @@ msgid "" "method::" msgstr "" -#: ../../faq/programming.rst:1382 +#: ../../faq/programming.rst:1383 msgid "How can I sort one list by values from another list?" msgstr "" -#: ../../faq/programming.rst:1384 +#: ../../faq/programming.rst:1385 msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " "pick out the element you want. ::" msgstr "" -#: ../../faq/programming.rst:1399 +#: ../../faq/programming.rst:1400 msgid "Objects" msgstr "" -#: ../../faq/programming.rst:1402 +#: ../../faq/programming.rst:1403 msgid "What is a class?" msgstr "" -#: ../../faq/programming.rst:1404 +#: ../../faq/programming.rst:1405 msgid "" "A class is the particular object type created by executing a class " "statement. Class objects are used as templates to create instance objects, " @@ -1578,7 +1578,7 @@ msgid "" "datatype." msgstr "" -#: ../../faq/programming.rst:1408 +#: ../../faq/programming.rst:1409 msgid "" "A class can be based on one or more other classes, called its base " "class(es). It then inherits the attributes and methods of its base classes. " @@ -1588,22 +1588,22 @@ msgid "" "``OutlookMailbox`` that handle various specific mailbox formats." msgstr "" -#: ../../faq/programming.rst:1417 +#: ../../faq/programming.rst:1418 msgid "What is a method?" msgstr "" -#: ../../faq/programming.rst:1419 +#: ../../faq/programming.rst:1420 msgid "" "A method is a function on some object ``x`` that you normally call as ``x." "name(arguments...)``. Methods are defined as functions inside the class " "definition::" msgstr "" -#: ../../faq/programming.rst:1429 +#: ../../faq/programming.rst:1430 msgid "What is self?" msgstr "" -#: ../../faq/programming.rst:1431 +#: ../../faq/programming.rst:1432 msgid "" "Self is merely a conventional name for the first argument of a method. A " "method defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, " @@ -1611,17 +1611,17 @@ msgid "" "the called method will think it is called as ``meth(x, a, b, c)``." msgstr "" -#: ../../faq/programming.rst:1436 +#: ../../faq/programming.rst:1437 msgid "See also :ref:`why-self`." msgstr "另請參閱 :ref:`why-self`\\ 。" -#: ../../faq/programming.rst:1440 +#: ../../faq/programming.rst:1441 msgid "" "How do I check if an object is an instance of a given class or of a subclass " "of it?" msgstr "" -#: ../../faq/programming.rst:1442 +#: ../../faq/programming.rst:1443 msgid "" "Use the built-in function ``isinstance(obj, cls)``. You can check if an " "object is an instance of any of a number of classes by providing a tuple " @@ -1630,7 +1630,7 @@ msgid "" "``isinstance(obj, str)`` or ``isinstance(obj, (int, float, complex))``." msgstr "" -#: ../../faq/programming.rst:1448 +#: ../../faq/programming.rst:1449 msgid "" "Note that :func:`isinstance` also checks for virtual inheritance from an :" "term:`abstract base class`. So, the test will return ``True`` for a " @@ -1638,7 +1638,7 @@ msgid "" "To test for \"true inheritance\", scan the :term:`MRO` of the class:" msgstr "" -#: ../../faq/programming.rst:1483 +#: ../../faq/programming.rst:1484 msgid "" "Note that most programs do not use :func:`isinstance` on user-defined " "classes very often. If you are developing the classes yourself, a more " @@ -1648,17 +1648,17 @@ msgid "" "have a function that does something::" msgstr "" -#: ../../faq/programming.rst:1497 +#: ../../faq/programming.rst:1498 msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" msgstr "" -#: ../../faq/programming.rst:1512 +#: ../../faq/programming.rst:1513 msgid "What is delegation?" msgstr "" -#: ../../faq/programming.rst:1514 +#: ../../faq/programming.rst:1515 msgid "" "Delegation is an object oriented technique (also called a design pattern). " "Let's say you have an object ``x`` and want to change the behaviour of just " @@ -1667,14 +1667,14 @@ msgid "" "other methods to the corresponding method of ``x``." msgstr "" -#: ../../faq/programming.rst:1520 +#: ../../faq/programming.rst:1521 msgid "" "Python programmers can easily implement delegation. For example, the " "following class implements a class that behaves like a file but converts all " "written data to uppercase::" msgstr "" -#: ../../faq/programming.rst:1535 +#: ../../faq/programming.rst:1536 msgid "" "Here the ``UpperOut`` class redefines the ``write()`` method to convert the " "argument string to uppercase before calling the underlying ``self._outfile." @@ -1684,7 +1684,7 @@ msgid "" "information about controlling attribute access." msgstr "" -#: ../../faq/programming.rst:1542 +#: ../../faq/programming.rst:1543 msgid "" "Note that for more general cases delegation can get trickier. When " "attributes must be set as well as retrieved, the class must define a :meth:" @@ -1693,23 +1693,23 @@ msgid "" "following::" msgstr "" -#: ../../faq/programming.rst:1553 +#: ../../faq/programming.rst:1554 msgid "" "Most :meth:`__setattr__` implementations must modify ``self.__dict__`` to " "store local state for self without causing an infinite recursion." msgstr "" -#: ../../faq/programming.rst:1558 +#: ../../faq/programming.rst:1559 msgid "" "How do I call a method defined in a base class from a derived class that " "extends it?" msgstr "" -#: ../../faq/programming.rst:1560 +#: ../../faq/programming.rst:1561 msgid "Use the built-in :func:`super` function::" msgstr "" -#: ../../faq/programming.rst:1566 +#: ../../faq/programming.rst:1567 msgid "" "In the example, :func:`super` will automatically determine the instance from " "which it was called (the ``self`` value), look up the :term:`method " @@ -1717,11 +1717,11 @@ msgid "" "line after ``Derived`` in the MRO: ``Base``." msgstr "" -#: ../../faq/programming.rst:1573 +#: ../../faq/programming.rst:1574 msgid "How can I organize my code to make it easier to change the base class?" msgstr "" -#: ../../faq/programming.rst:1575 +#: ../../faq/programming.rst:1576 msgid "" "You could assign the base class to an alias and derive from the alias. Then " "all you have to change is the value assigned to the alias. Incidentally, " @@ -1729,30 +1729,30 @@ msgid "" "on availability of resources) which base class to use. Example::" msgstr "" -#: ../../faq/programming.rst:1590 +#: ../../faq/programming.rst:1591 msgid "How do I create static class data and static class methods?" msgstr "" -#: ../../faq/programming.rst:1592 +#: ../../faq/programming.rst:1593 msgid "" "Both static data and static methods (in the sense of C++ or Java) are " "supported in Python." msgstr "" -#: ../../faq/programming.rst:1595 +#: ../../faq/programming.rst:1596 msgid "" "For static data, simply define a class attribute. To assign a new value to " "the attribute, you have to explicitly use the class name in the assignment::" msgstr "" -#: ../../faq/programming.rst:1607 +#: ../../faq/programming.rst:1608 msgid "" "``c.count`` also refers to ``C.count`` for any ``c`` such that " "``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some " "class on the base-class search path from ``c.__class__`` back to ``C``." msgstr "" -#: ../../faq/programming.rst:1611 +#: ../../faq/programming.rst:1612 msgid "" "Caution: within a method of C, an assignment like ``self.count = 42`` " "creates a new and unrelated instance named \"count\" in ``self``'s own " @@ -1760,59 +1760,59 @@ msgid "" "whether inside a method or not::" msgstr "" -#: ../../faq/programming.rst:1618 +#: ../../faq/programming.rst:1619 msgid "Static methods are possible::" msgstr "" -#: ../../faq/programming.rst:1626 +#: ../../faq/programming.rst:1627 msgid "" "However, a far more straightforward way to get the effect of a static method " "is via a simple module-level function::" msgstr "" -#: ../../faq/programming.rst:1632 +#: ../../faq/programming.rst:1633 msgid "" "If your code is structured so as to define one class (or tightly related " "class hierarchy) per module, this supplies the desired encapsulation." msgstr "" -#: ../../faq/programming.rst:1637 +#: ../../faq/programming.rst:1638 msgid "How can I overload constructors (or methods) in Python?" msgstr "" -#: ../../faq/programming.rst:1639 +#: ../../faq/programming.rst:1640 msgid "" "This answer actually applies to all methods, but the question usually comes " "up first in the context of constructors." msgstr "" -#: ../../faq/programming.rst:1642 +#: ../../faq/programming.rst:1643 msgid "In C++ you'd write" msgstr "" -#: ../../faq/programming.rst:1651 +#: ../../faq/programming.rst:1652 msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" msgstr "" -#: ../../faq/programming.rst:1661 +#: ../../faq/programming.rst:1662 msgid "This is not entirely equivalent, but close enough in practice." msgstr "" -#: ../../faq/programming.rst:1663 +#: ../../faq/programming.rst:1664 msgid "You could also try a variable-length argument list, e.g. ::" msgstr "" -#: ../../faq/programming.rst:1668 +#: ../../faq/programming.rst:1669 msgid "The same approach works for all method definitions." msgstr "" -#: ../../faq/programming.rst:1672 +#: ../../faq/programming.rst:1673 msgid "I try to use __spam and I get an error about _SomeClassName__spam." msgstr "" -#: ../../faq/programming.rst:1674 +#: ../../faq/programming.rst:1675 msgid "" "Variable names with double leading underscores are \"mangled\" to provide a " "simple but effective way to define class private variables. Any identifier " @@ -1822,7 +1822,7 @@ msgid "" "stripped." msgstr "" -#: ../../faq/programming.rst:1680 +#: ../../faq/programming.rst:1681 msgid "" "This doesn't guarantee privacy: an outside user can still deliberately " "access the \"_classname__spam\" attribute, and private values are visible in " @@ -1830,22 +1830,22 @@ msgid "" "private variable names at all." msgstr "" -#: ../../faq/programming.rst:1687 +#: ../../faq/programming.rst:1688 msgid "My class defines __del__ but it is not called when I delete the object." msgstr "" -#: ../../faq/programming.rst:1689 +#: ../../faq/programming.rst:1690 msgid "There are several possible reasons for this." msgstr "" -#: ../../faq/programming.rst:1691 +#: ../../faq/programming.rst:1692 msgid "" "The del statement does not necessarily call :meth:`__del__` -- it simply " "decrements the object's reference count, and if this reaches zero :meth:" "`__del__` is called." msgstr "" -#: ../../faq/programming.rst:1695 +#: ../../faq/programming.rst:1696 msgid "" "If your data structures contain circular links (e.g. a tree where each child " "has a parent reference and each parent has a list of children) the reference " @@ -1859,7 +1859,7 @@ msgid "" "cases where objects will never be collected." msgstr "" -#: ../../faq/programming.rst:1706 +#: ../../faq/programming.rst:1707 msgid "" "Despite the cycle collector, it's still a good idea to define an explicit " "``close()`` method on objects to be called whenever you're done with them. " @@ -1869,7 +1869,7 @@ msgid "" "once for the same object." msgstr "" -#: ../../faq/programming.rst:1713 +#: ../../faq/programming.rst:1714 msgid "" "Another way to avoid cyclical references is to use the :mod:`weakref` " "module, which allows you to point to objects without incrementing their " @@ -1877,28 +1877,28 @@ msgid "" "references for their parent and sibling references (if they need them!)." msgstr "" -#: ../../faq/programming.rst:1726 +#: ../../faq/programming.rst:1727 msgid "" "Finally, if your :meth:`__del__` method raises an exception, a warning " "message is printed to :data:`sys.stderr`." msgstr "" -#: ../../faq/programming.rst:1731 +#: ../../faq/programming.rst:1732 msgid "How do I get a list of all instances of a given class?" msgstr "" -#: ../../faq/programming.rst:1733 +#: ../../faq/programming.rst:1734 msgid "" "Python does not keep track of all instances of a class (or of a built-in " "type). You can program the class's constructor to keep track of all " "instances by keeping a list of weak references to each instance." msgstr "" -#: ../../faq/programming.rst:1739 +#: ../../faq/programming.rst:1740 msgid "Why does the result of ``id()`` appear to be not unique?" msgstr "" -#: ../../faq/programming.rst:1741 +#: ../../faq/programming.rst:1742 msgid "" "The :func:`id` builtin returns an integer that is guaranteed to be unique " "during the lifetime of the object. Since in CPython, this is the object's " @@ -1907,7 +1907,7 @@ msgid "" "memory. This is illustrated by this example:" msgstr "" -#: ../../faq/programming.rst:1752 +#: ../../faq/programming.rst:1753 msgid "" "The two ids belong to different integer objects that are created before, and " "deleted immediately after execution of the ``id()`` call. To be sure that " @@ -1915,17 +1915,17 @@ msgid "" "reference to the object:" msgstr "" -#: ../../faq/programming.rst:1765 +#: ../../faq/programming.rst:1766 msgid "When can I rely on identity tests with the *is* operator?" msgstr "" -#: ../../faq/programming.rst:1767 +#: ../../faq/programming.rst:1768 msgid "" "The ``is`` operator tests for object identity. The test ``a is b`` is " "equivalent to ``id(a) == id(b)``." msgstr "" -#: ../../faq/programming.rst:1770 +#: ../../faq/programming.rst:1771 msgid "" "The most important property of an identity test is that an object is always " "identical to itself, ``a is a`` always returns ``True``. Identity tests are " @@ -1933,34 +1933,34 @@ msgid "" "tests are guaranteed to return a boolean ``True`` or ``False``." msgstr "" -#: ../../faq/programming.rst:1775 +#: ../../faq/programming.rst:1776 msgid "" "However, identity tests can *only* be substituted for equality tests when " "object identity is assured. Generally, there are three circumstances where " "identity is guaranteed:" msgstr "" -#: ../../faq/programming.rst:1779 +#: ../../faq/programming.rst:1780 msgid "" "1) Assignments create new names but do not change object identity. After " "the assignment ``new = old``, it is guaranteed that ``new is old``." msgstr "" -#: ../../faq/programming.rst:1782 +#: ../../faq/programming.rst:1783 msgid "" "2) Putting an object in a container that stores object references does not " "change object identity. After the list assignment ``s[0] = x``, it is " "guaranteed that ``s[0] is x``." msgstr "" -#: ../../faq/programming.rst:1786 +#: ../../faq/programming.rst:1787 msgid "" "3) If an object is a singleton, it means that only one instance of that " "object can exist. After the assignments ``a = None`` and ``b = None``, it " "is guaranteed that ``a is b`` because ``None`` is a singleton." msgstr "" -#: ../../faq/programming.rst:1790 +#: ../../faq/programming.rst:1791 msgid "" "In most other circumstances, identity tests are inadvisable and equality " "tests are preferred. In particular, identity tests should not be used to " @@ -1968,17 +1968,17 @@ msgid "" "guaranteed to be singletons::" msgstr "" -#: ../../faq/programming.rst:1807 +#: ../../faq/programming.rst:1808 msgid "Likewise, new instances of mutable containers are never identical::" msgstr "" -#: ../../faq/programming.rst:1814 +#: ../../faq/programming.rst:1815 msgid "" "In the standard library code, you will see several common patterns for " "correctly using identity tests:" msgstr "" -#: ../../faq/programming.rst:1817 +#: ../../faq/programming.rst:1818 msgid "" "1) As recommended by :pep:`8`, an identity test is the preferred way to " "check for ``None``. This reads like plain English in code and avoids " @@ -1986,7 +1986,7 @@ msgid "" "false." msgstr "" -#: ../../faq/programming.rst:1821 +#: ../../faq/programming.rst:1822 msgid "" "2) Detecting optional arguments can be tricky when ``None`` is a valid input " "value. In those situations, you can create a singleton sentinel object " @@ -1994,25 +1994,25 @@ msgid "" "implement a method that behaves like :meth:`dict.pop`::" msgstr "" -#: ../../faq/programming.rst:1837 +#: ../../faq/programming.rst:1838 msgid "" "3) Container implementations sometimes need to augment equality tests with " "identity tests. This prevents the code from being confused by objects such " "as ``float('NaN')`` that are not equal to themselves." msgstr "" -#: ../../faq/programming.rst:1841 +#: ../../faq/programming.rst:1842 msgid "" "For example, here is the implementation of :meth:`collections.abc.Sequence." "__contains__`::" msgstr "" -#: ../../faq/programming.rst:1852 +#: ../../faq/programming.rst:1853 msgid "" "How can a subclass control what data is stored in an immutable instance?" msgstr "" -#: ../../faq/programming.rst:1854 +#: ../../faq/programming.rst:1855 msgid "" "When subclassing an immutable type, override the :meth:`__new__` method " "instead of the :meth:`__init__` method. The latter only runs *after* an " @@ -2020,35 +2020,35 @@ msgid "" "instance." msgstr "" -#: ../../faq/programming.rst:1859 +#: ../../faq/programming.rst:1860 msgid "" "All of these immutable classes have a different signature than their parent " "class:" msgstr "" -#: ../../faq/programming.rst:1885 +#: ../../faq/programming.rst:1886 msgid "The classes can be used like this:" msgstr "" -#: ../../faq/programming.rst:1900 +#: ../../faq/programming.rst:1901 msgid "How do I cache method calls?" msgstr "" -#: ../../faq/programming.rst:1902 +#: ../../faq/programming.rst:1903 msgid "" "The two principal tools for caching methods are :func:`functools." "cached_property` and :func:`functools.lru_cache`. The former stores results " "at the instance level and the latter at the class level." msgstr "" -#: ../../faq/programming.rst:1907 +#: ../../faq/programming.rst:1908 msgid "" "The *cached_property* approach only works with methods that do not take any " "arguments. It does not create a reference to the instance. The cached " "method result will be kept only as long as the instance is alive." msgstr "" -#: ../../faq/programming.rst:1911 +#: ../../faq/programming.rst:1912 msgid "" "The advantage is that when an instance is no longer used, the cached method " "result will be released right away. The disadvantage is that if instances " @@ -2056,47 +2056,47 @@ msgid "" "without bound." msgstr "" -#: ../../faq/programming.rst:1916 +#: ../../faq/programming.rst:1917 msgid "" "The *lru_cache* approach works with methods that have hashable arguments. " "It creates a reference to the instance unless special efforts are made to " "pass in weak references." msgstr "" -#: ../../faq/programming.rst:1920 +#: ../../faq/programming.rst:1921 msgid "" "The advantage of the least recently used algorithm is that the cache is " "bounded by the specified *maxsize*. The disadvantage is that instances are " "kept alive until they age out of the cache or until the cache is cleared." msgstr "" -#: ../../faq/programming.rst:1925 +#: ../../faq/programming.rst:1926 msgid "This example shows the various techniques::" msgstr "" -#: ../../faq/programming.rst:1949 +#: ../../faq/programming.rst:1950 msgid "" "The above example assumes that the *station_id* never changes. If the " "relevant instance attributes are mutable, the *cached_property* approach " "can't be made to work because it cannot detect changes to the attributes." msgstr "" -#: ../../faq/programming.rst:1954 +#: ../../faq/programming.rst:1955 msgid "" "The *lru_cache* approach can be made to work, but the class needs to define " "the *__eq__* and *__hash__* methods so the cache can detect relevant " "attribute updates::" msgstr "" -#: ../../faq/programming.rst:1980 +#: ../../faq/programming.rst:1981 msgid "Modules" msgstr "模組" -#: ../../faq/programming.rst:1983 +#: ../../faq/programming.rst:1984 msgid "How do I create a .pyc file?" msgstr "" -#: ../../faq/programming.rst:1985 +#: ../../faq/programming.rst:1986 msgid "" "When a module is imported for the first time (or when the source file has " "changed since the current compiled file was created) a ``.pyc`` file " @@ -2107,7 +2107,7 @@ msgid "" "particular ``python`` binary that created it. (See :pep:`3147` for details.)" msgstr "" -#: ../../faq/programming.rst:1993 +#: ../../faq/programming.rst:1994 msgid "" "One reason that a ``.pyc`` file may not be created is a permissions problem " "with the directory containing the source file, meaning that the " @@ -2116,7 +2116,7 @@ msgid "" "testing with a web server." msgstr "" -#: ../../faq/programming.rst:1998 +#: ../../faq/programming.rst:1999 msgid "" "Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " "creation of a .pyc file is automatic if you're importing a module and Python " @@ -2125,7 +2125,7 @@ msgid "" "subdirectory." msgstr "" -#: ../../faq/programming.rst:2003 +#: ../../faq/programming.rst:2004 msgid "" "Running Python on a top level script is not considered an import and no ``." "pyc`` will be created. For example, if you have a top-level module ``foo." @@ -2135,27 +2135,27 @@ msgid "" "for ``foo`` since ``foo.py`` isn't being imported." msgstr "" -#: ../../faq/programming.rst:2010 +#: ../../faq/programming.rst:2011 msgid "" "If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a ``." "pyc`` file for a module that is not imported -- you can, using the :mod:" "`py_compile` and :mod:`compileall` modules." msgstr "" -#: ../../faq/programming.rst:2014 +#: ../../faq/programming.rst:2015 msgid "" "The :mod:`py_compile` module can manually compile any module. One way is to " "use the ``compile()`` function in that module interactively::" msgstr "" -#: ../../faq/programming.rst:2020 +#: ../../faq/programming.rst:2021 msgid "" "This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same " "location as ``foo.py`` (or you can override that with the optional parameter " "``cfile``)." msgstr "" -#: ../../faq/programming.rst:2024 +#: ../../faq/programming.rst:2025 msgid "" "You can also automatically compile all files in a directory or directories " "using the :mod:`compileall` module. You can do it from the shell prompt by " @@ -2163,11 +2163,11 @@ msgid "" "Python files to compile::" msgstr "" -#: ../../faq/programming.rst:2033 +#: ../../faq/programming.rst:2034 msgid "How do I find the current module name?" msgstr "" -#: ../../faq/programming.rst:2035 +#: ../../faq/programming.rst:2036 msgid "" "A module can find out its own module name by looking at the predefined " "global variable ``__name__``. If this has the value ``'__main__'``, the " @@ -2176,85 +2176,85 @@ msgid "" "only execute this code after checking ``__name__``::" msgstr "" -#: ../../faq/programming.rst:2050 +#: ../../faq/programming.rst:2051 msgid "How can I have modules that mutually import each other?" msgstr "" -#: ../../faq/programming.rst:2052 +#: ../../faq/programming.rst:2053 msgid "Suppose you have the following modules:" msgstr "" -#: ../../faq/programming.rst:2054 +#: ../../faq/programming.rst:2055 msgid ":file:`foo.py`::" msgstr "" ":file:`foo.py`:\n" "\n" "::" -#: ../../faq/programming.rst:2059 +#: ../../faq/programming.rst:2060 msgid ":file:`bar.py`::" msgstr "" ":file:`bar.py`:\n" "\n" "::" -#: ../../faq/programming.rst:2064 +#: ../../faq/programming.rst:2065 msgid "The problem is that the interpreter will perform the following steps:" msgstr "" -#: ../../faq/programming.rst:2066 +#: ../../faq/programming.rst:2067 msgid "main imports ``foo``" msgstr "" -#: ../../faq/programming.rst:2067 +#: ../../faq/programming.rst:2068 msgid "Empty globals for ``foo`` are created" msgstr "" -#: ../../faq/programming.rst:2068 +#: ../../faq/programming.rst:2069 msgid "``foo`` is compiled and starts executing" msgstr "" -#: ../../faq/programming.rst:2069 +#: ../../faq/programming.rst:2070 msgid "``foo`` imports ``bar``" msgstr "" -#: ../../faq/programming.rst:2070 +#: ../../faq/programming.rst:2071 msgid "Empty globals for ``bar`` are created" msgstr "" -#: ../../faq/programming.rst:2071 +#: ../../faq/programming.rst:2072 msgid "``bar`` is compiled and starts executing" msgstr "" -#: ../../faq/programming.rst:2072 +#: ../../faq/programming.rst:2073 msgid "" "``bar`` imports ``foo`` (which is a no-op since there already is a module " "named ``foo``)" msgstr "" -#: ../../faq/programming.rst:2073 +#: ../../faq/programming.rst:2074 msgid "" "The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " "``bar.foo_var = foo.foo_var``" msgstr "" -#: ../../faq/programming.rst:2075 +#: ../../faq/programming.rst:2076 msgid "" "The last step fails, because Python isn't done with interpreting ``foo`` yet " "and the global symbol dictionary for ``foo`` is still empty." msgstr "" -#: ../../faq/programming.rst:2078 +#: ../../faq/programming.rst:2079 msgid "" "The same thing happens when you use ``import foo``, and then try to access " "``foo.foo_var`` in global code." msgstr "" -#: ../../faq/programming.rst:2081 +#: ../../faq/programming.rst:2082 msgid "There are (at least) three possible workarounds for this problem." msgstr "" -#: ../../faq/programming.rst:2083 +#: ../../faq/programming.rst:2084 msgid "" "Guido van Rossum recommends avoiding all uses of ``from import ..." "``, and placing all code inside functions. Initializations of global " @@ -2263,59 +2263,59 @@ msgid "" "``.``." msgstr "" -#: ../../faq/programming.rst:2088 +#: ../../faq/programming.rst:2089 msgid "" "Jim Roskind suggests performing steps in the following order in each module:" msgstr "" -#: ../../faq/programming.rst:2090 +#: ../../faq/programming.rst:2091 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" msgstr "" -#: ../../faq/programming.rst:2092 +#: ../../faq/programming.rst:2093 msgid "``import`` statements" msgstr "" -#: ../../faq/programming.rst:2093 +#: ../../faq/programming.rst:2094 msgid "" "active code (including globals that are initialized from imported values)." msgstr "" -#: ../../faq/programming.rst:2095 +#: ../../faq/programming.rst:2096 msgid "" "Van Rossum doesn't like this approach much because the imports appear in a " "strange place, but it does work." msgstr "" -#: ../../faq/programming.rst:2098 +#: ../../faq/programming.rst:2099 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." msgstr "" -#: ../../faq/programming.rst:2101 +#: ../../faq/programming.rst:2102 msgid "These solutions are not mutually exclusive." msgstr "" -#: ../../faq/programming.rst:2105 +#: ../../faq/programming.rst:2106 msgid "__import__('x.y.z') returns ; how do I get z?" msgstr "" -#: ../../faq/programming.rst:2107 +#: ../../faq/programming.rst:2108 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" msgstr "" -#: ../../faq/programming.rst:2114 +#: ../../faq/programming.rst:2115 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" msgstr "" -#: ../../faq/programming.rst:2116 +#: ../../faq/programming.rst:2117 msgid "" "For reasons of efficiency as well as consistency, Python only reads the " "module file on the first time a module is imported. If it didn't, in a " @@ -2324,13 +2324,13 @@ msgid "" "re-reading of a changed module, do this::" msgstr "" -#: ../../faq/programming.rst:2126 +#: ../../faq/programming.rst:2127 msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " "containing statements like ::" msgstr "" -#: ../../faq/programming.rst:2131 +#: ../../faq/programming.rst:2132 msgid "" "will continue to work with the old version of the imported objects. If the " "module contains class definitions, existing class instances will *not* be " @@ -2338,7 +2338,7 @@ msgid "" "paradoxical behaviour::" msgstr "" -#: ../../faq/programming.rst:2144 +#: ../../faq/programming.rst:2145 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" From 8e4ce30ecdf066d326e0dd888371b1a7e9e658af Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Mon, 27 Jun 2022 09:52:47 +0800 Subject: [PATCH 11/11] fix: resolve fuzzy entries --- c-api/typeobj.po | 30 ++++++++++++++--------------- howto/urllib2.po | 41 ++++++++++++++++++++-------------------- installing/index.po | 10 +++++----- library/html.entities.po | 5 ++++- license.po | 11 +++++------ tutorial/inputoutput.po | 7 +++---- tutorial/whatnow.po | 17 +++-------------- using/unix.po | 3 +-- using/windows.po | 6 ++---- whatsnew/2.5.po | 18 ++++++------------ whatsnew/2.7.po | 5 ++--- 11 files changed, 65 insertions(+), 88 deletions(-) diff --git a/c-api/typeobj.po b/c-api/typeobj.po index bacda0b2c3..c719140aef 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -1125,7 +1125,7 @@ msgstr ":c:type:`releasebufferproc`" #: ../../c-api/typeobj.rst:460 msgid "See :ref:`slot-typedefs` below for more detail." -msgstr "更多細節請見下方的 :ref:`slot-typedefs`\\ 。" +msgstr "更多細節請見下方的 :ref:`slot-typedefs`。" #: ../../c-api/typeobj.rst:464 msgid "PyTypeObject Definition" @@ -3318,19 +3318,19 @@ msgstr "" #: ../../c-api/typeobj.rst:2487 msgid "See :c:member:`~PyTypeObject.tp_free`." -msgstr "請見 :c:member:`~PyTypeObject.tp_free`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_free`。" #: ../../c-api/typeobj.rst:2491 msgid "See :c:member:`~PyTypeObject.tp_new`." -msgstr "請見 :c:member:`~PyTypeObject.tp_new`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_new`。" #: ../../c-api/typeobj.rst:2495 msgid "See :c:member:`~PyTypeObject.tp_init`." -msgstr "請見 :c:member:`~PyTypeObject.tp_init`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_init`。" #: ../../c-api/typeobj.rst:2499 msgid "See :c:member:`~PyTypeObject.tp_repr`." -msgstr "請見 :c:member:`~PyTypeObject.tp_repr`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_repr`。" #: ../../c-api/typeobj.rst:2503 ../../c-api/typeobj.rst:2512 msgid "Return the value of the named attribute for the object." @@ -3344,41 +3344,39 @@ msgstr "" #: ../../c-api/typeobj.rst:2514 msgid "See :c:member:`~PyTypeObject.tp_getattro`." -msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`。" #: ../../c-api/typeobj.rst:2521 msgid "See :c:member:`~PyTypeObject.tp_setattro`." -msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`。" #: ../../c-api/typeobj.rst:2525 -#, fuzzy msgid "See :c:member:`~PyTypeObject.tp_descr_get`." -msgstr "請見 :c:member:`~PyTypeObject.tp_descrget`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_descr_get`。" #: ../../c-api/typeobj.rst:2529 -#, fuzzy msgid "See :c:member:`~PyTypeObject.tp_descr_set`." -msgstr "請見 :c:member:`~PyTypeObject.tp_descrset`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_descr_set`。" #: ../../c-api/typeobj.rst:2533 msgid "See :c:member:`~PyTypeObject.tp_hash`." -msgstr "請見 :c:member:`~PyTypeObject.tp_hash`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_hash`。" #: ../../c-api/typeobj.rst:2537 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." -msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`。" #: ../../c-api/typeobj.rst:2541 msgid "See :c:member:`~PyTypeObject.tp_iter`." -msgstr "請見 :c:member:`~PyTypeObject.tp_iter`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_iter`。" #: ../../c-api/typeobj.rst:2545 msgid "See :c:member:`~PyTypeObject.tp_iternext`." -msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`\\ 。" +msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`。" #: ../../c-api/typeobj.rst:2559 msgid "See :c:member:`~PyAsyncMethods.am_send`." -msgstr "請見 :c:member:`~PyAsyncMethods.am_send`\\ 。" +msgstr "請見 :c:member:`~PyAsyncMethods.am_send`。" #: ../../c-api/typeobj.rst:2575 msgid "Examples" diff --git a/howto/urllib2.po b/howto/urllib2.po index 8c1c5fca76..74776189c3 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-22 00:18+0000\n" -"PO-Revision-Date: 2018-05-23 14:37+0000\n" +"PO-Revision-Date: 2022-06-27 09:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -18,30 +18,30 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.1\n" #: ../../howto/urllib2.rst:5 msgid "HOWTO Fetch Internet Resources Using The urllib Package" -msgstr "如何使用urllib套件取得網路資源" +msgstr "如何使用 urllib 套件取得網路資源" #: ../../howto/urllib2.rst:0 msgid "Author" msgstr "作者" #: ../../howto/urllib2.rst:7 -#, fuzzy msgid "`Michael Foord `_" -msgstr "`Michael Foord `_" +msgstr "`Michael Foord `_" #: ../../howto/urllib2.rst:11 -#, fuzzy msgid "" "There is a French translation of an earlier revision of this HOWTO, " "available at `urllib2 - Le Manuel manquant `_." msgstr "" -"這份指南出自於早期版本的法文翻譯 `urllib2 - Le Manuel manquant `_." +"這份指南出自於早期版本的法文翻譯 `urllib2 - Le Manuel manquant `_\\ 。" #: ../../howto/urllib2.rst:18 msgid "Introduction" @@ -51,20 +51,19 @@ msgstr "簡介" msgid "" "You may also find useful the following article on fetching web resources " "with Python:" -msgstr "以下這些與Python有關的文章說不定能幫到你::" +msgstr "以下這些與 Python 有關的文章說不定能幫到你::" #: ../../howto/urllib2.rst:25 -#, fuzzy msgid "" "`Basic Authentication `_" msgstr "" -"`Basic Authentication `_" +"`Basic Authentication `_" #: ../../howto/urllib2.rst:27 msgid "A tutorial on *Basic Authentication*, with examples in Python." -msgstr "以Python為例的 *Basic Authentication* 教學。" +msgstr "以 Python 為例的 *Basic Authentication* 教學。" #: ../../howto/urllib2.rst:29 msgid "" @@ -75,10 +74,10 @@ msgid "" "common situations - like basic authentication, cookies, proxies and so on. " "These are provided by objects called handlers and openers." msgstr "" -"**urllib.request** 是一個用來從URLs (Uniform Resource Locators)取得資料的" -"Python模組。它提供一個了非常簡單的介面能接受多種不同的協議, *urlopen* 函數。" -"也提供了較複雜的介面用於處理一些常見的狀況,例如:基本的authentication、" -"cookies、proxies等等,這些都可以由handler或opener物件操作。" +"**urllib.request** 是一個用來從 URLs (Uniform Resource Locators) 取得資料的" +"Python模組。它提供一個了非常簡單的介面能接受多種不同的協議,*urlopen* 函數。" +"也提供了較複雜的介面用於處理一些常見的狀況,例如:基本的 authentication、" +"cookies、proxies 等等,這些都可以由 handler 或 opener 物件操作。" #: ../../howto/urllib2.rst:36 msgid "" @@ -101,14 +100,14 @@ msgid "" "is supplementary to them." msgstr "" "一般情形下 *urlopen* 是非常容易使用的,但當你遇到錯誤或者較複雜的情況下,你可" -"能需要對超文本協議HyperText Transfer Protocol有一定的了解。最完整且具參考價值" -"的是 :rfc:`2616`,不過它是一份技術文件並不容易閱讀,以下的教學會提供足夠的" -"HTTP知識來幫助你使用 *urllib*。這份教學並非要取代 :mod:`urllib.request` 這份" -"文件,你還是會需要它!" +"能需要對超文本協議 HyperText Transfer Protocol 有一定的了解。最完整且具參考價" +"值的是 :rfc:`2616`,不過它是一份技術文件並不容易閱讀,以下的教學會提供足夠的 " +"HTTP 知識來幫助你使用 *urllib*。這份教學並非要取代 :mod:`urllib.request` 這份" +"文件,你還是會需要它。" #: ../../howto/urllib2.rst:51 msgid "Fetching URLs" -msgstr "從URL取得資源" +msgstr "從 URL 取得資源" #: ../../howto/urllib2.rst:53 msgid "The simplest way to use urllib.request is as follows::" diff --git a/installing/index.po b/installing/index.po index b59ed91153..4cf1564287 100644 --- a/installing/index.po +++ b/installing/index.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-22 00:18+0000\n" -"PO-Revision-Date: 2021-10-03 09:41+0800\n" +"PO-Revision-Date: 2022-06-27 09:37+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -20,7 +20,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.4.3\n" +"X-Generator: Poedit 3.1\n" #: ../../installing/index.rst:7 msgid "Installing Python Modules" @@ -386,14 +386,14 @@ msgstr "" "::" #: ../../installing/index.rst:216 -#, fuzzy msgid "" "There are also additional resources for `installing pip. `__" msgstr "" -"這裡還有其他關於\\ `安裝 pip `__\\ 的資源。" +"這裡還有其他關於\\ `安裝 pip `__\\ 的資源。" #: ../../installing/index.rst:221 msgid "Installing binary extensions" diff --git a/library/html.entities.po b/library/html.entities.po index 4befd713b1..14d4288207 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-22 00:18+0000\n" -"PO-Revision-Date: 2017-09-22 18:26+0000\n" +"PO-Revision-Date: 2022-06-27 09:38+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.1\n" #: ../../library/html.entities.rst:2 msgid ":mod:`html.entities` --- Definitions of HTML general entities" @@ -65,3 +66,5 @@ msgid "" "See https://html.spec.whatwg.org/multipage/named-characters.html#named-" "character-references" msgstr "" +"請見 https://html.spec.whatwg.org/multipage/named-characters.html#named-" +"character-references" diff --git a/license.po b/license.po index c9c82df708..d7d50f2a9a 100644 --- a/license.po +++ b/license.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-22 00:18+0000\n" -"PO-Revision-Date: 2021-07-04 01:18+0800\n" +"PO-Revision-Date: 2022-06-27 09:40+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -19,7 +19,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.4.3\n" +"X-Generator: Poedit 3.1\n" #: ../../license.rst:7 msgid "History and License" @@ -94,7 +94,7 @@ msgstr "擁有者" #: ../../license.rst:35 msgid "GPL compatible?" -msgstr "GPL 相容性" +msgstr "GPL 相容性?" #: ../../license.rst:37 msgid "0.9.0 thru 1.2" @@ -429,7 +429,6 @@ msgid "strtod and dtoa" msgstr "strtod 與 dtoa" #: ../../license.rst:626 -#, fuzzy msgid "" "The file :file:`Python/dtoa.c`, which supplies C functions dtoa and strtod " "for conversion of C doubles to and from strings, is derived from the file of " @@ -440,8 +439,8 @@ msgid "" msgstr "" ":file:`Python/dtoa.c` 檔案提供了 C 的 dtoa 和 strtod 函式,用於將 C 的雙精度" "浮點數和字串互相轉換。該檔案是衍生自 David M. Gay 建立的同名檔案,後者現在可" -"以從 http://www.netlib.org/fp/ 下載。於 2009 年 3 月 16 日所檢索的原始檔案包" -"含以下版權與授權聲明:\n" +"以從 https://web.archive.org/web/20220517033456/http://www.netlib.org/fp/" +"dtoa.c 下載。於 2009 年 3 月 16 日所檢索的原始檔案包含以下版權與授權聲明:\n" "\n" "::" diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index 92c9233ac3..c109dc5727 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-22 00:18+0000\n" -"PO-Revision-Date: 2022-06-07 17:05+0800\n" +"PO-Revision-Date: 2022-06-27 09:44+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -19,7 +19,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0.1\n" +"X-Generator: Poedit 3.1\n" #: ../../tutorial/inputoutput.rst:5 msgid "Input and Output" @@ -246,12 +246,11 @@ msgstr "" "::" #: ../../tutorial/inputoutput.rst:182 -#, fuzzy msgid "" "This could also be done by passing the ``table`` dictionary as keyword " "arguments with the ``**`` notation. ::" msgstr "" -"用 '**' 符號,把 table 當作關鍵字引數來傳遞,也有一樣的結果。\n" +"用 '**' 符號,把 ``table`` 字典當作關鍵字引數來傳遞,也有一樣的結果。\n" "\n" "::" diff --git a/tutorial/whatnow.po b/tutorial/whatnow.po index f66b01765f..710f198ee8 100644 --- a/tutorial/whatnow.po +++ b/tutorial/whatnow.po @@ -85,6 +85,8 @@ msgid "" "https://www.python.org: The major Python web site. It contains code, " "documentation, and pointers to Python-related pages around the web." msgstr "" +"https://www.python.org:Python 的主要網站。它包含程式碼、文件以及連結到 " +"Python 相關聯的網頁。" #: ../../tutorial/whatnow.rst:36 msgid "https://docs.python.org: Fast access to Python's documentation." @@ -114,12 +116,11 @@ msgstr "" "0-596-00797-3.) 的書籍中。" #: ../../tutorial/whatnow.rst:48 -#, fuzzy msgid "" "https://pyvideo.org collects links to Python-related videos from conferences " "and user-group meetings." msgstr "" -"http://www.pyvideo.org 從研討會與使用者群組聚會裡收集與 Python 相關的影片連" +"https://pyvideo.org 從研討會與使用者群組聚會裡收集與 Python 相關的影片連" "結。" #: ../../tutorial/whatnow.rst:51 @@ -171,15 +172,3 @@ msgid "" msgstr "" "「Cheese Shop(起司店)」是 Monty Python 的一個短劇:一位顧客進入一家起司店," "但無論他要哪種起司,店員都說沒有貨。" - -#~ msgid "" -#~ "https://www.python.org: The major Python web site. It contains code, " -#~ "documentation, and pointers to Python-related pages around the web. This " -#~ "web site is mirrored in various places around the world, such as Europe, " -#~ "Japan, and Australia; a mirror may be faster than the main site, " -#~ "depending on your geographical location." -#~ msgstr "" -#~ "https://www.python.org:Python 的主要網站。它包含程式碼、文件以及連結到 " -#~ "Python 相關聯的網頁。網站為鏡像的並設置於世界各地,像是歐洲、日本以及澳大" -#~ "利亞;鏡像網站也許會比主網站來得更快,不過具體速度則還是取決於你所在的地理" -#~ "位置。" diff --git a/using/unix.po b/using/unix.po index 5780721060..727dd943d2 100644 --- a/using/unix.po +++ b/using/unix.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-22 00:18+0000\n" -"PO-Revision-Date: 2022-06-11 14:28+0800\n" +"PO-Revision-Date: 2022-06-27 09:41+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -130,7 +130,6 @@ msgid "Building Python" msgstr "建置 Python" #: ../../using/unix.rst:69 -#, fuzzy msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " diff --git a/using/windows.po b/using/windows.po index 0e4238f300..6310a6ef23 100644 --- a/using/windows.po +++ b/using/windows.po @@ -872,9 +872,8 @@ msgid "" msgstr "" #: ../../using/windows.rst:503 -#, fuzzy msgid "`Enthought Deployment Manager `_" -msgstr "`Canopy `_" +msgstr "`Enthought Deployment Manager `_" #: ../../using/windows.rst:500 msgid "\"The Next Generation Python Environment and Package Manager\"." @@ -1757,9 +1756,8 @@ msgid "by Tim Golden" msgstr "由 Tim Golden 所著" #: ../../using/windows.rst:1098 -#, fuzzy msgid "`Python and COM `_" -msgstr "`Python and COM `_" +msgstr "`Python and COM `_" #: ../../using/windows.rst:1099 msgid "by David and Paul Boddie" diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 47097fc402..8f745374b6 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -2055,6 +2055,8 @@ msgid "" "https://web.archive.org/web/20180410025338/http://starship.python.net/crew/" "theller/ctypes/" msgstr "" +"https://web.archive.org/web/20180410025338/http://starship.python.net/crew/" +"theller/ctypes/" #: ../../whatsnew/2.5.rst:1750 msgid "The pre-stdlib ctypes web page, with a tutorial, reference, and FAQ." @@ -2260,6 +2262,8 @@ msgid "" "https://web.archive.org/web/20201124024954/http://effbot.org/zone/element-" "index.htm" msgstr "" +"https://web.archive.org/web/20201124024954/http://effbot.org/zone/element-" +"index.htm" #: ../../whatsnew/2.5.rst:1869 msgid "Official documentation for ElementTree." @@ -2444,6 +2448,8 @@ msgid "" "https://web.archive.org/web/20160331090247/http://wsgi.readthedocs.org/en/" "latest/" msgstr "" +"https://web.archive.org/web/20160331090247/http://wsgi.readthedocs.org/en/" +"latest/" #: ../../whatsnew/2.5.rst:2069 msgid "A central web site for WSGI-related resources." @@ -2742,15 +2748,3 @@ msgid "" "Paul Prescod, James Pryor, Mike Rovner, Scott Weikart, Barry Warsaw, Thomas " "Wouters." msgstr "" - -#~ msgid "http://www.sidhe.org/~dan/blog/archives/000178.html" -#~ msgstr "http://www.sidhe.org/~dan/blog/archives/000178.html" - -#~ msgid "http://starship.python.net/crew/theller/ctypes/" -#~ msgstr "http://starship.python.net/crew/theller/ctypes/" - -#~ msgid "http://www.wsgi.org" -#~ msgstr "http://www.wsgi.org" - -#~ msgid "http://effbot.org/zone/element-index.htm" -#~ msgstr "http://effbot.org/zone/element-index.htm" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 039d91e9e7..cde2879bd7 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -2338,6 +2338,8 @@ msgid "" "https://web.archive.org/web/20210619163128/http://www.voidspace.org.uk/" "python/articles/unittest2.shtml" msgstr "" +"https://web.archive.org/web/20210619163128/http://www.voidspace.org.uk/" +"python/articles/unittest2.shtml" #: ../../whatsnew/2.7.rst:2005 msgid "" @@ -3316,6 +3318,3 @@ msgid "" "Nick Coghlan, Philip Jenvey, Ryan Lovett, R. David Murray, Hugh Secker-" "Walker." msgstr "" - -#~ msgid "http://www.voidspace.org.uk/python/articles/unittest2.shtml" -#~ msgstr "http://www.voidspace.org.uk/python/articles/unittest2.shtml"