From 73e384fb93f35807200b4a85efb2d98c6817fcdc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 May 2024 00:05:26 +0000 Subject: [PATCH 01/13] sync with cpython eb29e2f5 --- library/os.po | 1239 +++++++++++++++++++++++----------------------- whatsnew/3.12.po | 1137 +++++++++++++++++++++--------------------- 2 files changed, 1202 insertions(+), 1174 deletions(-) diff --git a/library/os.po b/library/os.po index 2443b748b8a..46ac43863ec 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-10 00:04+0000\n" "PO-Revision-Date: 2024-04-29 15:24+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -319,28 +319,28 @@ msgstr "" #: ../../library/os.rst:1608 ../../library/os.rst:1628 #: ../../library/os.rst:1637 ../../library/os.rst:2021 #: ../../library/os.rst:2110 ../../library/os.rst:2150 -#: ../../library/os.rst:2433 ../../library/os.rst:2455 -#: ../../library/os.rst:4036 ../../library/os.rst:4043 -#: ../../library/os.rst:4050 ../../library/os.rst:4057 -#: ../../library/os.rst:4064 ../../library/os.rst:4071 -#: ../../library/os.rst:4078 ../../library/os.rst:4086 -#: ../../library/os.rst:4094 ../../library/os.rst:4101 -#: ../../library/os.rst:4108 ../../library/os.rst:4117 -#: ../../library/os.rst:4125 ../../library/os.rst:4133 -#: ../../library/os.rst:4140 ../../library/os.rst:4147 -#: ../../library/os.rst:4223 ../../library/os.rst:4263 -#: ../../library/os.rst:4270 ../../library/os.rst:4300 -#: ../../library/os.rst:4427 ../../library/os.rst:4476 -#: ../../library/os.rst:4713 ../../library/os.rst:4747 -#: ../../library/os.rst:4808 ../../library/os.rst:4822 -#: ../../library/os.rst:4839 ../../library/os.rst:4854 -#: ../../library/os.rst:4865 ../../library/os.rst:4877 -#: ../../library/os.rst:4890 ../../library/os.rst:4899 -#: ../../library/os.rst:4909 ../../library/os.rst:4922 -#: ../../library/os.rst:4973 ../../library/os.rst:4984 -#: ../../library/os.rst:4996 ../../library/os.rst:5003 -#: ../../library/os.rst:5012 ../../library/os.rst:5021 -#: ../../library/os.rst:5030 ../../library/os.rst:5039 +#: ../../library/os.rst:2440 ../../library/os.rst:2462 +#: ../../library/os.rst:4043 ../../library/os.rst:4050 +#: ../../library/os.rst:4057 ../../library/os.rst:4064 +#: ../../library/os.rst:4071 ../../library/os.rst:4078 +#: ../../library/os.rst:4085 ../../library/os.rst:4093 +#: ../../library/os.rst:4101 ../../library/os.rst:4108 +#: ../../library/os.rst:4115 ../../library/os.rst:4124 +#: ../../library/os.rst:4132 ../../library/os.rst:4140 +#: ../../library/os.rst:4147 ../../library/os.rst:4154 +#: ../../library/os.rst:4230 ../../library/os.rst:4270 +#: ../../library/os.rst:4277 ../../library/os.rst:4307 +#: ../../library/os.rst:4434 ../../library/os.rst:4483 +#: ../../library/os.rst:4720 ../../library/os.rst:4754 +#: ../../library/os.rst:4815 ../../library/os.rst:4829 +#: ../../library/os.rst:4846 ../../library/os.rst:4861 +#: ../../library/os.rst:4872 ../../library/os.rst:4884 +#: ../../library/os.rst:4897 ../../library/os.rst:4906 +#: ../../library/os.rst:4916 ../../library/os.rst:4929 +#: ../../library/os.rst:4980 ../../library/os.rst:4991 +#: ../../library/os.rst:5003 ../../library/os.rst:5010 +#: ../../library/os.rst:5019 ../../library/os.rst:5028 +#: ../../library/os.rst:5037 ../../library/os.rst:5046 msgid ":ref:`Availability `: Unix, not Emscripten, not WASI." msgstr ":ref:`適用 `:Unix、非 Emscripten、非 WASI。" @@ -498,10 +498,10 @@ msgstr "" #: ../../library/os.rst:322 ../../library/os.rst:1086 ../../library/os.rst:1097 #: ../../library/os.rst:1110 ../../library/os.rst:1357 #: ../../library/os.rst:1649 ../../library/os.rst:1797 -#: ../../library/os.rst:2533 ../../library/os.rst:3375 -#: ../../library/os.rst:3412 ../../library/os.rst:4028 -#: ../../library/os.rst:4564 ../../library/os.rst:4575 -#: ../../library/os.rst:4692 +#: ../../library/os.rst:2540 ../../library/os.rst:3382 +#: ../../library/os.rst:3419 ../../library/os.rst:4035 +#: ../../library/os.rst:4571 ../../library/os.rst:4582 +#: ../../library/os.rst:4699 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" @@ -529,12 +529,12 @@ msgstr "" #: ../../library/os.rst:1493 ../../library/os.rst:1708 #: ../../library/os.rst:1735 ../../library/os.rst:1770 #: ../../library/os.rst:2093 ../../library/os.rst:2124 -#: ../../library/os.rst:2181 ../../library/os.rst:2499 -#: ../../library/os.rst:2511 ../../library/os.rst:3241 -#: ../../library/os.rst:3398 ../../library/os.rst:3631 -#: ../../library/os.rst:5187 ../../library/os.rst:5196 -#: ../../library/os.rst:5217 ../../library/os.rst:5227 -#: ../../library/os.rst:5236 +#: ../../library/os.rst:2181 ../../library/os.rst:2506 +#: ../../library/os.rst:2518 ../../library/os.rst:3248 +#: ../../library/os.rst:3405 ../../library/os.rst:3638 +#: ../../library/os.rst:5194 ../../library/os.rst:5203 +#: ../../library/os.rst:5224 ../../library/os.rst:5234 +#: ../../library/os.rst:5243 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" @@ -606,10 +606,10 @@ msgid "" "getpwuid(os.getuid())[0]`` to get the login name of the current real user id." msgstr "" -#: ../../library/os.rst:426 ../../library/os.rst:462 ../../library/os.rst:3993 -#: ../../library/os.rst:4247 ../../library/os.rst:4545 -#: ../../library/os.rst:4669 ../../library/os.rst:4788 -#: ../../library/os.rst:4957 +#: ../../library/os.rst:426 ../../library/os.rst:462 ../../library/os.rst:4000 +#: ../../library/os.rst:4254 ../../library/os.rst:4552 +#: ../../library/os.rst:4676 ../../library/os.rst:4795 +#: ../../library/os.rst:4964 msgid "" ":ref:`Availability `: Unix, Windows, not Emscripten, not WASI." msgstr ":ref:`適用 `:Unix、Windows、非 Emscripten、非 WASI。" @@ -907,7 +907,7 @@ msgid "" "or even ``socket.gethostbyaddr(socket.gethostname())``." msgstr "" -#: ../../library/os.rst:789 ../../library/os.rst:4694 +#: ../../library/os.rst:789 ../../library/os.rst:4701 msgid "" "Return type changed from a tuple to a tuple-like object with named " "attributes." @@ -1148,7 +1148,7 @@ msgstr "" #: ../../library/os.rst:1006 ../../library/os.rst:1021 #: ../../library/os.rst:1112 ../../library/os.rst:1651 #: ../../library/os.rst:2066 ../../library/os.rst:2095 -#: ../../library/os.rst:3377 +#: ../../library/os.rst:3384 msgid "" "The function is limited on Emscripten and WASI, see :ref:`wasm-availability` " "for more information." @@ -1191,7 +1191,7 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:1046 ../../library/os.rst:2491 +#: ../../library/os.rst:1046 ../../library/os.rst:2498 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -1253,7 +1253,7 @@ msgstr "" "引發一個附帶引數 ``fd``、``length`` 的\\ :ref:`稽核事件 ` ``os." "truncate``。" -#: ../../library/os.rst:1099 ../../library/os.rst:3416 +#: ../../library/os.rst:1099 ../../library/os.rst:3423 msgid "Added support for Windows" msgstr "新增對 Windows 的支援" @@ -1451,15 +1451,15 @@ msgid "" msgstr "" #: ../../library/os.rst:1254 ../../library/os.rst:2331 -#: ../../library/os.rst:2367 ../../library/os.rst:2435 -#: ../../library/os.rst:2457 ../../library/os.rst:2538 -#: ../../library/os.rst:2568 ../../library/os.rst:2675 -#: ../../library/os.rst:3432 +#: ../../library/os.rst:2371 ../../library/os.rst:2442 +#: ../../library/os.rst:2464 ../../library/os.rst:2545 +#: ../../library/os.rst:2575 ../../library/os.rst:2682 +#: ../../library/os.rst:3439 msgid "Added the *dir_fd* parameter." msgstr "新增 *dir_fd* 參數。" #: ../../library/os.rst:1257 ../../library/os.rst:1576 -#: ../../library/os.rst:1752 ../../library/os.rst:4790 +#: ../../library/os.rst:1752 ../../library/os.rst:4797 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -1471,16 +1471,16 @@ msgstr "" #: ../../library/os.rst:2075 ../../library/os.rst:2112 #: ../../library/os.rst:2152 ../../library/os.rst:2170 #: ../../library/os.rst:2183 ../../library/os.rst:2242 -#: ../../library/os.rst:2334 ../../library/os.rst:2370 -#: ../../library/os.rst:2411 ../../library/os.rst:2438 -#: ../../library/os.rst:2460 ../../library/os.rst:2501 -#: ../../library/os.rst:2571 ../../library/os.rst:2590 -#: ../../library/os.rst:2678 ../../library/os.rst:2968 -#: ../../library/os.rst:3255 ../../library/os.rst:3419 -#: ../../library/os.rst:3435 ../../library/os.rst:3475 -#: ../../library/os.rst:3574 ../../library/os.rst:3635 -#: ../../library/os.rst:3819 ../../library/os.rst:3999 -#: ../../library/os.rst:4552 +#: ../../library/os.rst:2334 ../../library/os.rst:2374 +#: ../../library/os.rst:2418 ../../library/os.rst:2445 +#: ../../library/os.rst:2467 ../../library/os.rst:2508 +#: ../../library/os.rst:2578 ../../library/os.rst:2597 +#: ../../library/os.rst:2685 ../../library/os.rst:2975 +#: ../../library/os.rst:3262 ../../library/os.rst:3426 +#: ../../library/os.rst:3442 ../../library/os.rst:3482 +#: ../../library/os.rst:3581 ../../library/os.rst:3642 +#: ../../library/os.rst:3826 ../../library/os.rst:4006 +#: ../../library/os.rst:4559 msgid "Accepts a :term:`path-like object`." msgstr "" @@ -2023,8 +2023,8 @@ msgid "Get the \"inheritable\" flag of the specified handle (a boolean)." msgstr "" #: ../../library/os.rst:1849 ../../library/os.rst:1855 -#: ../../library/os.rst:3924 ../../library/os.rst:4587 -#: ../../library/os.rst:4632 +#: ../../library/os.rst:3931 ../../library/os.rst:4594 +#: ../../library/os.rst:4639 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" @@ -2343,7 +2343,7 @@ msgid ":const:`stat.S_IXOTH`" msgstr ":const:`stat.S_IXOTH`" #: ../../library/os.rst:2056 ../../library/os.rst:2084 -#: ../../library/os.rst:3465 +#: ../../library/os.rst:3472 msgid "" "This function can support :ref:`specifying a file descriptor `, :" "ref:`paths relative to directory descriptors ` and :ref:`not " @@ -2464,7 +2464,7 @@ msgstr "" msgid ":ref:`Availability `: Unix, Windows, not Emscripten." msgstr ":ref:`適用 `:Unix、Windows、非 Emscripten。" -#: ../../library/os.rst:2199 ../../library/os.rst:4249 +#: ../../library/os.rst:2199 ../../library/os.rst:4256 msgid "Added Windows support." msgstr "新支援 Windows。" @@ -2472,8 +2472,8 @@ msgstr "新支援 Windows。" msgid "Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* parameters." msgstr "新增 *src_dir_fd*、*dst_dir_fd* 與 *follow_symlinks* 參數。" -#: ../../library/os.rst:2205 ../../library/os.rst:2622 -#: ../../library/os.rst:2659 ../../library/os.rst:3387 +#: ../../library/os.rst:2205 ../../library/os.rst:2629 +#: ../../library/os.rst:2666 ../../library/os.rst:3394 msgid "Accepts a :term:`path-like object` for *src* and *dst*." msgstr "" @@ -2494,7 +2494,7 @@ msgid "" "circumstances, they will be of type ``str``." msgstr "" -#: ../../library/os.rst:2222 ../../library/os.rst:2707 +#: ../../library/os.rst:2222 ../../library/os.rst:2714 msgid "" "This function can also support :ref:`specifying a file descriptor " "`; the file descriptor must refer to a directory." @@ -2521,7 +2521,7 @@ msgstr "" msgid "The *path* parameter became optional." msgstr "" -#: ../../library/os.rst:2239 ../../library/os.rst:3246 +#: ../../library/os.rst:2239 ../../library/os.rst:3253 msgid "Added support for specifying *path* as an open file descriptor." msgstr "" @@ -2627,16 +2627,16 @@ msgid "" "follow_symlinks=False)``." msgstr "" -#: ../../library/os.rst:2321 ../../library/os.rst:2359 -#: ../../library/os.rst:2424 ../../library/os.rst:2452 -#: ../../library/os.rst:2526 +#: ../../library/os.rst:2321 ../../library/os.rst:2363 +#: ../../library/os.rst:2431 ../../library/os.rst:2459 +#: ../../library/os.rst:2533 msgid "" "This function can also support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../library/os.rst:2328 ../../library/os.rst:2535 -#: ../../library/os.rst:3380 +#: ../../library/os.rst:2328 ../../library/os.rst:2542 +#: ../../library/os.rst:3387 msgid "Added support for Windows 6.0 (Vista) symbolic links." msgstr "" @@ -2668,13 +2668,20 @@ msgid "" "call :func:`chmod` explicitly to set them." msgstr "" -#: ../../library/os.rst:2362 +#: ../../library/os.rst:2359 +msgid "" +"On Windows, a *mode* of ``0o700`` is specifically handled to apply access " +"control to the new directory such that only the current user and " +"administrators have access. Other values of *mode* are ignored." +msgstr "" + +#: ../../library/os.rst:2366 msgid "" "It is also possible to create temporary directories; see the :mod:`tempfile` " "module's :func:`tempfile.mkdtemp` function." msgstr "" -#: ../../library/os.rst:2365 ../../library/os.rst:2399 +#: ../../library/os.rst:2369 ../../library/os.rst:2406 msgid "" "Raises an :ref:`auditing event ` ``os.mkdir`` with arguments " "``path``, ``mode``, ``dir_fd``." @@ -2682,13 +2689,17 @@ msgstr "" "引發一個附帶引數 ``path``、``mode``、``dir_fd`` 的\\ :ref:`稽核事件 " "` ``os.mkdir``。" -#: ../../library/os.rst:2380 +#: ../../library/os.rst:2377 +msgid "Windows now handles a *mode* of ``0o700``." +msgstr "" + +#: ../../library/os.rst:2387 msgid "" "Recursive directory creation function. Like :func:`mkdir`, but makes all " "intermediate-level directories needed to contain the leaf directory." msgstr "" -#: ../../library/os.rst:2383 +#: ../../library/os.rst:2390 msgid "" "The *mode* parameter is passed to :func:`mkdir` for creating the leaf " "directory; see :ref:`the mkdir() description ` for how it is " @@ -2697,27 +2708,27 @@ msgid "" "file permission bits of existing parent directories are not changed." msgstr "" -#: ../../library/os.rst:2389 +#: ../../library/os.rst:2396 msgid "" "If *exist_ok* is ``False`` (the default), a :exc:`FileExistsError` is raised " "if the target directory already exists." msgstr "" -#: ../../library/os.rst:2394 +#: ../../library/os.rst:2401 msgid "" ":func:`makedirs` will become confused if the path elements to create " "include :data:`pardir` (eg. \"..\" on UNIX systems)." msgstr "" -#: ../../library/os.rst:2397 +#: ../../library/os.rst:2404 msgid "This function handles UNC paths correctly." msgstr "" -#: ../../library/os.rst:2401 +#: ../../library/os.rst:2408 msgid "Added the *exist_ok* parameter." msgstr "新增 *exist_ok* 參數。" -#: ../../library/os.rst:2406 +#: ../../library/os.rst:2413 msgid "" "Before Python 3.4.1, if *exist_ok* was ``True`` and the directory existed, :" "func:`makedirs` would still raise an error if *mode* did not match the mode " @@ -2725,19 +2736,19 @@ msgid "" "safely, it was removed in Python 3.4.1. See :issue:`21082`." msgstr "" -#: ../../library/os.rst:2414 +#: ../../library/os.rst:2421 msgid "" "The *mode* argument no longer affects the file permission bits of newly " "created intermediate-level directories." msgstr "" -#: ../../library/os.rst:2421 +#: ../../library/os.rst:2428 msgid "" "Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The " "current umask value is first masked out from the mode." msgstr "" -#: ../../library/os.rst:2427 +#: ../../library/os.rst:2434 msgid "" "FIFOs are pipes that can be accessed like regular files. FIFOs exist until " "they are deleted (for example with :func:`os.unlink`). Generally, FIFOs are " @@ -2747,7 +2758,7 @@ msgid "" "rendezvous point." msgstr "" -#: ../../library/os.rst:2444 +#: ../../library/os.rst:2451 msgid "" "Create a filesystem node (file, device special file or named pipe) named " "*path*. *mode* specifies both the permissions to use and the type of node to " @@ -2758,23 +2769,23 @@ msgid "" "`os.makedev`), otherwise it is ignored." msgstr "" -#: ../../library/os.rst:2466 +#: ../../library/os.rst:2473 msgid "" "Extract the device major number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" -#: ../../library/os.rst:2472 +#: ../../library/os.rst:2479 msgid "" "Extract the device minor number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" -#: ../../library/os.rst:2478 +#: ../../library/os.rst:2485 msgid "Compose a raw device number from the major and minor device numbers." msgstr "" -#: ../../library/os.rst:2483 +#: ../../library/os.rst:2490 msgid "" "Return system configuration information relevant to a named file. *name* " "specifies the configuration value to retrieve; it may be a string which is " @@ -2785,20 +2796,20 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:2496 ../../library/os.rst:3239 -#: ../../library/os.rst:3408 +#: ../../library/os.rst:2503 ../../library/os.rst:3246 +#: ../../library/os.rst:3415 msgid "" "This function can support :ref:`specifying a file descriptor `." msgstr "" -#: ../../library/os.rst:2507 +#: ../../library/os.rst:2514 msgid "" "Dictionary mapping names accepted by :func:`pathconf` and :func:`fpathconf` " "to the integer values defined for those names by the host operating system. " "This can be used to determine the set of names known to the system." msgstr "" -#: ../../library/os.rst:2516 +#: ../../library/os.rst:2523 msgid "" "Return a string representing the path to which the symbolic link points. " "The result may be either an absolute or relative pathname; if it is " @@ -2806,7 +2817,7 @@ msgid "" "join(os.path.dirname(path), result)``." msgstr "" -#: ../../library/os.rst:2521 +#: ../../library/os.rst:2528 msgid "" "If the *path* is a string object (directly or indirectly through a :class:" "`PathLike` interface), the result will also be a string object, and the call " @@ -2814,42 +2825,42 @@ msgid "" "indirectly), the result will be a bytes object." msgstr "" -#: ../../library/os.rst:2529 +#: ../../library/os.rst:2536 msgid "" "When trying to resolve a path that may contain links, use :func:`~os.path." "realpath` to properly handle recursion and platform differences." msgstr "" -#: ../../library/os.rst:2541 +#: ../../library/os.rst:2548 msgid "Accepts a :term:`path-like object` on Unix." msgstr "" -#: ../../library/os.rst:2544 +#: ../../library/os.rst:2551 msgid "Accepts a :term:`path-like object` and a bytes object on Windows." msgstr "" -#: ../../library/os.rst:2547 +#: ../../library/os.rst:2554 msgid "" "Added support for directory junctions, and changed to return the " "substitution path (which typically includes ``\\\\?\\`` prefix) rather than " "the optional \"print name\" field that was previously returned." msgstr "" -#: ../../library/os.rst:2553 +#: ../../library/os.rst:2560 msgid "" "Remove (delete) the file *path*. If *path* is a directory, an :exc:" "`OSError` is raised. Use :func:`rmdir` to remove directories. If the file " "does not exist, a :exc:`FileNotFoundError` is raised." msgstr "" -#: ../../library/os.rst:2557 ../../library/os.rst:2670 -#: ../../library/os.rst:3359 +#: ../../library/os.rst:2564 ../../library/os.rst:2677 +#: ../../library/os.rst:3366 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../library/os.rst:2560 +#: ../../library/os.rst:2567 msgid "" "On Windows, attempting to remove a file that is in use causes an exception " "to be raised; on Unix, the directory entry is removed but the storage " @@ -2857,12 +2868,12 @@ msgid "" "longer in use." msgstr "" -#: ../../library/os.rst:2564 +#: ../../library/os.rst:2571 msgid "This function is semantically identical to :func:`unlink`." msgstr "" -#: ../../library/os.rst:2566 ../../library/os.rst:2588 -#: ../../library/os.rst:3430 +#: ../../library/os.rst:2573 ../../library/os.rst:2595 +#: ../../library/os.rst:3437 msgid "" "Raises an :ref:`auditing event ` ``os.remove`` with arguments " "``path``, ``dir_fd``." @@ -2870,7 +2881,7 @@ msgstr "" "引發一個附帶引數 ``path``、``dir_fd`` 的\\ :ref:`稽核事件 ` ``os." "remove``。" -#: ../../library/os.rst:2579 +#: ../../library/os.rst:2586 msgid "" "Remove directories recursively. Works like :func:`rmdir` except that, if " "the leaf directory is successfully removed, :func:`removedirs` tries to " @@ -2882,20 +2893,20 @@ msgid "" "could not be successfully removed." msgstr "" -#: ../../library/os.rst:2596 +#: ../../library/os.rst:2603 msgid "" "Rename the file or directory *src* to *dst*. If *dst* exists, the operation " "will fail with an :exc:`OSError` subclass in a number of cases:" msgstr "" -#: ../../library/os.rst:2599 +#: ../../library/os.rst:2606 msgid "" "On Windows, if *dst* exists a :exc:`FileExistsError` is always raised. The " "operation may fail if *src* and *dst* are on different filesystems. Use :" "func:`shutil.move` to support moves to a different filesystem." msgstr "" -#: ../../library/os.rst:2603 +#: ../../library/os.rst:2610 msgid "" "On Unix, if *src* is a file and *dst* is a directory or vice-versa, an :exc:" "`IsADirectoryError` or a :exc:`NotADirectoryError` will be raised " @@ -2907,20 +2918,20 @@ msgid "" "operation (this is a POSIX requirement)." msgstr "" -#: ../../library/os.rst:2612 ../../library/os.rst:2652 +#: ../../library/os.rst:2619 ../../library/os.rst:2659 msgid "" "This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to " "supply :ref:`paths relative to directory descriptors `." msgstr "" -#: ../../library/os.rst:2615 +#: ../../library/os.rst:2622 msgid "" "If you want cross-platform overwriting of the destination, use :func:" "`replace`." msgstr "" -#: ../../library/os.rst:2617 ../../library/os.rst:2638 -#: ../../library/os.rst:2655 +#: ../../library/os.rst:2624 ../../library/os.rst:2645 +#: ../../library/os.rst:2662 msgid "" "Raises an :ref:`auditing event ` ``os.rename`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." @@ -2928,11 +2939,11 @@ msgstr "" "引發一個附帶引數 ``src``、``dst``、``src_dir_fd``、``dst_dir_fd`` 的\\ :ref:`" "稽核事件 ` ``os.rename``。" -#: ../../library/os.rst:2619 +#: ../../library/os.rst:2626 msgid "Added the *src_dir_fd* and *dst_dir_fd* parameters." msgstr "新增 *src_dir_fd* 與 *dst_dir_fd* 參數。" -#: ../../library/os.rst:2628 +#: ../../library/os.rst:2635 msgid "" "Recursive directory or file renaming function. Works like :func:`rename`, " "except creation of any intermediate directories needed to make the new " @@ -2941,17 +2952,17 @@ msgid "" "using :func:`removedirs`." msgstr "" -#: ../../library/os.rst:2635 +#: ../../library/os.rst:2642 msgid "" "This function can fail with the new directory structure made if you lack " "permissions needed to remove the leaf directory or file." msgstr "" -#: ../../library/os.rst:2640 +#: ../../library/os.rst:2647 msgid "Accepts a :term:`path-like object` for *old* and *new*." msgstr "" -#: ../../library/os.rst:2646 +#: ../../library/os.rst:2653 msgid "" "Rename the file or directory *src* to *dst*. If *dst* is a non-empty " "directory, :exc:`OSError` will be raised. If *dst* exists and is a file, it " @@ -2960,7 +2971,7 @@ msgid "" "renaming will be an atomic operation (this is a POSIX requirement)." msgstr "" -#: ../../library/os.rst:2665 +#: ../../library/os.rst:2672 msgid "" "Remove (delete) the directory *path*. If the directory does not exist or is " "not empty, a :exc:`FileNotFoundError` or an :exc:`OSError` is raised " @@ -2968,7 +2979,7 @@ msgid "" "rmtree` can be used." msgstr "" -#: ../../library/os.rst:2673 +#: ../../library/os.rst:2680 msgid "" "Raises an :ref:`auditing event ` ``os.rmdir`` with arguments " "``path``, ``dir_fd``." @@ -2976,7 +2987,7 @@ msgstr "" "引發一個附帶引數 ``path``、``dir_fd`` 的\\ :ref:`稽核事件 ` ``os." "rmdir``。" -#: ../../library/os.rst:2684 +#: ../../library/os.rst:2691 msgid "" "Return an iterator of :class:`os.DirEntry` objects corresponding to the " "entries in the directory given by *path*. The entries are yielded in " @@ -2986,7 +2997,7 @@ msgid "" "unspecified." msgstr "" -#: ../../library/os.rst:2691 +#: ../../library/os.rst:2698 msgid "" "Using :func:`scandir` instead of :func:`listdir` can significantly increase " "the performance of code that also needs file type or file attribute " @@ -2998,7 +3009,7 @@ msgid "" "Unix but only requires one for symbolic links on Windows." msgstr "" -#: ../../library/os.rst:2701 +#: ../../library/os.rst:2708 msgid "" "*path* may be a :term:`path-like object`. If *path* is of type ``bytes`` " "(directly or indirectly through the :class:`PathLike` interface), the type " @@ -3007,31 +3018,31 @@ msgid "" "they will be of type ``str``." msgstr "" -#: ../../library/os.rst:2710 +#: ../../library/os.rst:2717 msgid "" "Raises an :ref:`auditing event ` ``os.scandir`` with argument " "``path``." msgstr "" "引發一個附帶引數 ``path`` 的\\ :ref:`稽核事件 ` ``os.scandir``。" -#: ../../library/os.rst:2712 +#: ../../library/os.rst:2719 msgid "" "The :func:`scandir` iterator supports the :term:`context manager` protocol " "and has the following method:" msgstr "" -#: ../../library/os.rst:2717 +#: ../../library/os.rst:2724 msgid "Close the iterator and free acquired resources." msgstr "" -#: ../../library/os.rst:2719 +#: ../../library/os.rst:2726 msgid "" "This is called automatically when the iterator is exhausted or garbage " "collected, or when an error happens during iterating. However it is " "advisable to call it explicitly or use the :keyword:`with` statement." msgstr "" -#: ../../library/os.rst:2726 +#: ../../library/os.rst:2733 msgid "" "The following example shows a simple use of :func:`scandir` to display all " "the files (excluding directories) in the given *path* that don't start with " @@ -3039,7 +3050,7 @@ msgid "" "system call::" msgstr "" -#: ../../library/os.rst:2738 +#: ../../library/os.rst:2745 msgid "" "On Unix-based systems, :func:`scandir` uses the system's `opendir() `_ and " @@ -3050,7 +3061,7 @@ msgid "" "desktop/aa364428(v=vs.85).aspx>`_ functions." msgstr "" -#: ../../library/os.rst:2750 +#: ../../library/os.rst:2757 msgid "" "Added support for the :term:`context manager` protocol and the :func:" "`~scandir.close()` method. If a :func:`scandir` iterator is neither " @@ -3058,28 +3069,28 @@ msgid "" "its destructor." msgstr "" -#: ../../library/os.rst:2756 +#: ../../library/os.rst:2763 msgid "The function accepts a :term:`path-like object`." msgstr "" -#: ../../library/os.rst:2758 +#: ../../library/os.rst:2765 msgid "Added support for :ref:`file descriptors ` on Unix." msgstr "" -#: ../../library/os.rst:2764 +#: ../../library/os.rst:2771 msgid "" "Object yielded by :func:`scandir` to expose the file path and other file " "attributes of a directory entry." msgstr "" -#: ../../library/os.rst:2767 +#: ../../library/os.rst:2774 msgid "" ":func:`scandir` will provide as much of this information as possible without " "making additional system calls. When a ``stat()`` or ``lstat()`` system call " "is made, the ``os.DirEntry`` object will cache the result." msgstr "" -#: ../../library/os.rst:2771 +#: ../../library/os.rst:2778 msgid "" "``os.DirEntry`` instances are not intended to be stored in long-lived data " "structures; if you know the file metadata has changed or if a long time has " @@ -3087,7 +3098,7 @@ msgid "" "up-to-date information." msgstr "" -#: ../../library/os.rst:2776 +#: ../../library/os.rst:2783 msgid "" "Because the ``os.DirEntry`` methods can make operating system calls, they " "may also raise :exc:`OSError`. If you need very fine-grained control over " @@ -3095,29 +3106,29 @@ msgid "" "methods and handle as appropriate." msgstr "" -#: ../../library/os.rst:2781 +#: ../../library/os.rst:2788 msgid "" "To be directly usable as a :term:`path-like object`, ``os.DirEntry`` " "implements the :class:`PathLike` interface." msgstr "" -#: ../../library/os.rst:2784 +#: ../../library/os.rst:2791 msgid "Attributes and methods on a ``os.DirEntry`` instance are as follows:" msgstr "" -#: ../../library/os.rst:2788 +#: ../../library/os.rst:2795 msgid "" "The entry's base filename, relative to the :func:`scandir` *path* argument." msgstr "" -#: ../../library/os.rst:2791 +#: ../../library/os.rst:2798 msgid "" "The :attr:`name` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: ../../library/os.rst:2797 +#: ../../library/os.rst:2804 msgid "" "The entry's full path name: equivalent to ``os.path.join(scandir_path, entry." "name)`` where *scandir_path* is the :func:`scandir` *path* argument. The " @@ -3127,51 +3138,51 @@ msgid "" "attribute." msgstr "" -#: ../../library/os.rst:2804 +#: ../../library/os.rst:2811 msgid "" "The :attr:`path` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: ../../library/os.rst:2810 +#: ../../library/os.rst:2817 msgid "Return the inode number of the entry." msgstr "" -#: ../../library/os.rst:2812 +#: ../../library/os.rst:2819 msgid "" "The result is cached on the ``os.DirEntry`` object. Use ``os.stat(entry." "path, follow_symlinks=False).st_ino`` to fetch up-to-date information." msgstr "" -#: ../../library/os.rst:2816 +#: ../../library/os.rst:2823 msgid "" "On the first, uncached call, a system call is required on Windows but not on " "Unix." msgstr "" -#: ../../library/os.rst:2821 +#: ../../library/os.rst:2828 msgid "" "Return ``True`` if this entry is a directory or a symbolic link pointing to " "a directory; return ``False`` if the entry is or points to any other kind of " "file, or if it doesn't exist anymore." msgstr "" -#: ../../library/os.rst:2825 +#: ../../library/os.rst:2832 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "directory (without following symlinks); return ``False`` if the entry is any " "other kind of file or if it doesn't exist anymore." msgstr "" -#: ../../library/os.rst:2829 +#: ../../library/os.rst:2836 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` along " "with :func:`stat.S_ISDIR` to fetch up-to-date information." msgstr "" -#: ../../library/os.rst:2833 +#: ../../library/os.rst:2840 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, for non-symlinks, neither Windows or Unix require a system " @@ -3181,46 +3192,46 @@ msgid "" "is ``False``." msgstr "" -#: ../../library/os.rst:2840 ../../library/os.rst:2870 +#: ../../library/os.rst:2847 ../../library/os.rst:2877 msgid "" "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :" "exc:`FileNotFoundError` is caught and not raised." msgstr "" -#: ../../library/os.rst:2845 +#: ../../library/os.rst:2852 msgid "" "Return ``True`` if this entry is a file or a symbolic link pointing to a " "file; return ``False`` if the entry is or points to a directory or other non-" "file entry, or if it doesn't exist anymore." msgstr "" -#: ../../library/os.rst:2849 +#: ../../library/os.rst:2856 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "file (without following symlinks); return ``False`` if the entry is a " "directory or other non-file entry, or if it doesn't exist anymore." msgstr "" -#: ../../library/os.rst:2853 +#: ../../library/os.rst:2860 msgid "" "The result is cached on the ``os.DirEntry`` object. Caching, system calls " "made, and exceptions raised are as per :func:`~os.DirEntry.is_dir`." msgstr "" -#: ../../library/os.rst:2858 +#: ../../library/os.rst:2865 msgid "" "Return ``True`` if this entry is a symbolic link (even if broken); return " "``False`` if the entry points to a directory or any kind of file, or if it " "doesn't exist anymore." msgstr "" -#: ../../library/os.rst:2862 +#: ../../library/os.rst:2869 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "islink` to fetch up-to-date information." msgstr "" -#: ../../library/os.rst:2865 +#: ../../library/os.rst:2872 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, neither Windows or Unix require a system call, except on " @@ -3228,48 +3239,48 @@ msgid "" "``dirent.d_type == DT_UNKNOWN``." msgstr "" -#: ../../library/os.rst:2875 +#: ../../library/os.rst:2882 msgid "" "Return ``True`` if this entry is a junction (even if broken); return " "``False`` if the entry points to a regular directory, any kind of file, a " "symlink, or if it doesn't exist anymore." msgstr "" -#: ../../library/os.rst:2879 +#: ../../library/os.rst:2886 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "isjunction` to fetch up-to-date information." msgstr "" -#: ../../library/os.rst:2886 +#: ../../library/os.rst:2893 msgid "" "Return a :class:`stat_result` object for this entry. This method follows " "symbolic links by default; to stat a symbolic link add the " "``follow_symlinks=False`` argument." msgstr "" -#: ../../library/os.rst:2890 +#: ../../library/os.rst:2897 msgid "" "On Unix, this method always requires a system call. On Windows, it only " "requires a system call if *follow_symlinks* is ``True`` and the entry is a " "reparse point (for example, a symbolic link or directory junction)." msgstr "" -#: ../../library/os.rst:2895 +#: ../../library/os.rst:2902 msgid "" "On Windows, the ``st_ino``, ``st_dev`` and ``st_nlink`` attributes of the :" "class:`stat_result` are always set to zero. Call :func:`os.stat` to get " "these attributes." msgstr "" -#: ../../library/os.rst:2899 +#: ../../library/os.rst:2906 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` to fetch " "up-to-date information." msgstr "" -#: ../../library/os.rst:2903 +#: ../../library/os.rst:2910 msgid "" "Note that there is a nice correspondence between several attributes and " "methods of ``os.DirEntry`` and of :class:`pathlib.Path`. In particular, the " @@ -3277,13 +3288,13 @@ msgid "" "``is_file()``, ``is_symlink()``, ``is_junction()``, and ``stat()`` methods." msgstr "" -#: ../../library/os.rst:2911 +#: ../../library/os.rst:2918 msgid "" "Added support for the :class:`~os.PathLike` interface. Added support for :" "class:`bytes` paths on Windows." msgstr "" -#: ../../library/os.rst:2915 +#: ../../library/os.rst:2922 msgid "" "The ``st_ctime`` attribute of a stat result is deprecated on Windows. The " "file creation time is properly available as ``st_birthtime``, and in the " @@ -3291,7 +3302,7 @@ msgid "" "time, if available." msgstr "" -#: ../../library/os.rst:2924 +#: ../../library/os.rst:2931 msgid "" "Get the status of a file or a file descriptor. Perform the equivalent of a :" "c:func:`stat` system call on the given path. *path* may be specified as " @@ -3300,21 +3311,21 @@ msgid "" "`stat_result` object." msgstr "" -#: ../../library/os.rst:2930 +#: ../../library/os.rst:2937 msgid "" "This function normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :func:`lstat`." msgstr "" -#: ../../library/os.rst:2933 ../../library/os.rst:3798 -#: ../../library/os.rst:3814 ../../library/os.rst:3830 -#: ../../library/os.rst:3850 +#: ../../library/os.rst:2940 ../../library/os.rst:3805 +#: ../../library/os.rst:3821 ../../library/os.rst:3837 +#: ../../library/os.rst:3857 msgid "" "This function can support :ref:`specifying a file descriptor ` and :" "ref:`not following symlinks `." msgstr "" -#: ../../library/os.rst:2936 +#: ../../library/os.rst:2943 msgid "" "On Windows, passing ``follow_symlinks=False`` will disable following all " "name-surrogate reparse points, which includes symlinks and directory " @@ -3328,21 +3339,21 @@ msgid "" "junction points, which will raise the usual exceptions." msgstr "" -#: ../../library/os.rst:2949 ../../library/os.rst:3718 +#: ../../library/os.rst:2956 ../../library/os.rst:3725 msgid "Example::" msgstr "範例: ::" -#: ../../library/os.rst:2962 +#: ../../library/os.rst:2969 msgid ":func:`fstat` and :func:`lstat` functions." msgstr ":func:`fstat` 和 :func:`lstat` 函式。" -#: ../../library/os.rst:2964 +#: ../../library/os.rst:2971 msgid "" "Added the *dir_fd* and *follow_symlinks* parameters, specifying a file " "descriptor instead of a path." msgstr "新增 *dir_fd* 與 *follow_symlinks* 參數,指定一個檔案描述器而非路徑。" -#: ../../library/os.rst:2971 +#: ../../library/os.rst:2978 msgid "" "On Windows, all reparse points that can be resolved by the operating system " "are now followed, and passing ``follow_symlinks=False`` disables following " @@ -3352,122 +3363,122 @@ msgid "" "of raising an error." msgstr "" -#: ../../library/os.rst:2982 +#: ../../library/os.rst:2989 msgid "" "Object whose attributes correspond roughly to the members of the :c:struct:" "`stat` structure. It is used for the result of :func:`os.stat`, :func:`os." "fstat` and :func:`os.lstat`." msgstr "" -#: ../../library/os.rst:2986 +#: ../../library/os.rst:2993 msgid "Attributes:" msgstr "" -#: ../../library/os.rst:2990 +#: ../../library/os.rst:2997 msgid "File mode: file type and file mode bits (permissions)." msgstr "" -#: ../../library/os.rst:2994 +#: ../../library/os.rst:3001 msgid "" "Platform dependent, but if non-zero, uniquely identifies the file for a " "given value of ``st_dev``. Typically:" msgstr "" -#: ../../library/os.rst:2997 +#: ../../library/os.rst:3004 msgid "the inode number on Unix," msgstr "" -#: ../../library/os.rst:2998 +#: ../../library/os.rst:3005 msgid "" "the `file index `_ on " "Windows" msgstr "" -#: ../../library/os.rst:3004 +#: ../../library/os.rst:3011 msgid "Identifier of the device on which this file resides." msgstr "" -#: ../../library/os.rst:3008 +#: ../../library/os.rst:3015 msgid "Number of hard links." msgstr "" -#: ../../library/os.rst:3012 +#: ../../library/os.rst:3019 msgid "User identifier of the file owner." msgstr "" -#: ../../library/os.rst:3016 +#: ../../library/os.rst:3023 msgid "Group identifier of the file owner." msgstr "" -#: ../../library/os.rst:3020 +#: ../../library/os.rst:3027 msgid "" "Size of the file in bytes, if it is a regular file or a symbolic link. The " "size of a symbolic link is the length of the pathname it contains, without a " "terminating null byte." msgstr "" -#: ../../library/os.rst:3024 +#: ../../library/os.rst:3031 msgid "Timestamps:" msgstr "" -#: ../../library/os.rst:3028 +#: ../../library/os.rst:3035 msgid "Time of most recent access expressed in seconds." msgstr "" -#: ../../library/os.rst:3032 +#: ../../library/os.rst:3039 msgid "Time of most recent content modification expressed in seconds." msgstr "" -#: ../../library/os.rst:3036 +#: ../../library/os.rst:3043 msgid "Time of most recent metadata change expressed in seconds." msgstr "" -#: ../../library/os.rst:3038 +#: ../../library/os.rst:3045 msgid "" "``st_ctime`` is deprecated on Windows. Use ``st_birthtime`` for the file " "creation time. In the future, ``st_ctime`` will contain the time of the most " "recent metadata change, as for other platforms." msgstr "" -#: ../../library/os.rst:3045 +#: ../../library/os.rst:3052 msgid "Time of most recent access expressed in nanoseconds as an integer." msgstr "" -#: ../../library/os.rst:3051 +#: ../../library/os.rst:3058 msgid "" "Time of most recent content modification expressed in nanoseconds as an " "integer." msgstr "" -#: ../../library/os.rst:3058 +#: ../../library/os.rst:3065 msgid "" "Time of most recent metadata change expressed in nanoseconds as an integer." msgstr "" -#: ../../library/os.rst:3063 +#: ../../library/os.rst:3070 msgid "" "``st_ctime_ns`` is deprecated on Windows. Use ``st_birthtime_ns`` for the " "file creation time. In the future, ``st_ctime`` will contain the time of the " "most recent metadata change, as for other platforms." msgstr "" -#: ../../library/os.rst:3070 +#: ../../library/os.rst:3077 msgid "" "Time of file creation expressed in seconds. This attribute is not always " "available, and may raise :exc:`AttributeError`." msgstr "" -#: ../../library/os.rst:3073 +#: ../../library/os.rst:3080 msgid "``st_birthtime`` is now available on Windows." msgstr "" -#: ../../library/os.rst:3078 +#: ../../library/os.rst:3085 msgid "" "Time of file creation expressed in nanoseconds as an integer. This attribute " "is not always available, and may raise :exc:`AttributeError`." msgstr "" -#: ../../library/os.rst:3086 +#: ../../library/os.rst:3093 msgid "" "The exact meaning and resolution of the :attr:`st_atime`, :attr:`st_mtime`, :" "attr:`st_ctime` and :attr:`st_birthtime` attributes depend on the operating " @@ -3477,7 +3488,7 @@ msgid "" "details." msgstr "" -#: ../../library/os.rst:3093 +#: ../../library/os.rst:3100 msgid "" "Similarly, although :attr:`st_atime_ns`, :attr:`st_mtime_ns`, :attr:" "`st_ctime_ns` and :attr:`st_birthtime_ns` are always expressed in " @@ -3490,74 +3501,74 @@ msgid "" "`st_birthtime_ns`." msgstr "" -#: ../../library/os.rst:3103 +#: ../../library/os.rst:3110 msgid "" "On some Unix systems (such as Linux), the following attributes may also be " "available:" msgstr "" -#: ../../library/os.rst:3108 +#: ../../library/os.rst:3115 msgid "" "Number of 512-byte blocks allocated for file. This may be smaller than :attr:" "`st_size`/512 when the file has holes." msgstr "" -#: ../../library/os.rst:3113 +#: ../../library/os.rst:3120 msgid "" "\"Preferred\" blocksize for efficient file system I/O. Writing to a file in " "smaller chunks may cause an inefficient read-modify-rewrite." msgstr "" -#: ../../library/os.rst:3118 +#: ../../library/os.rst:3125 msgid "Type of device if an inode device." msgstr "" -#: ../../library/os.rst:3122 +#: ../../library/os.rst:3129 msgid "User defined flags for file." msgstr "" -#: ../../library/os.rst:3124 +#: ../../library/os.rst:3131 msgid "" "On other Unix systems (such as FreeBSD), the following attributes may be " "available (but may be only filled out if root tries to use them):" msgstr "" -#: ../../library/os.rst:3129 +#: ../../library/os.rst:3136 msgid "File generation number." msgstr "" -#: ../../library/os.rst:3131 +#: ../../library/os.rst:3138 msgid "" "On Solaris and derivatives, the following attributes may also be available:" msgstr "" -#: ../../library/os.rst:3136 +#: ../../library/os.rst:3143 msgid "" "String that uniquely identifies the type of the filesystem that contains the " "file." msgstr "" -#: ../../library/os.rst:3139 +#: ../../library/os.rst:3146 msgid "On macOS systems, the following attributes may also be available:" msgstr "" -#: ../../library/os.rst:3143 +#: ../../library/os.rst:3150 msgid "Real size of the file." msgstr "" -#: ../../library/os.rst:3147 +#: ../../library/os.rst:3154 msgid "Creator of the file." msgstr "" -#: ../../library/os.rst:3151 +#: ../../library/os.rst:3158 msgid "File type." msgstr "" -#: ../../library/os.rst:3153 +#: ../../library/os.rst:3160 msgid "On Windows systems, the following attributes are also available:" msgstr "" -#: ../../library/os.rst:3157 +#: ../../library/os.rst:3164 msgid "" "Windows file attributes: ``dwFileAttributes`` member of the " "``BY_HANDLE_FILE_INFORMATION`` structure returned by :c:func:`!" @@ -3565,7 +3576,7 @@ msgid "" "FILE_ATTRIBUTE_ARCHIVE>` constants in the :mod:`stat` module." msgstr "" -#: ../../library/os.rst:3167 +#: ../../library/os.rst:3174 msgid "" "When :attr:`st_file_attributes` has the :const:`~stat." "FILE_ATTRIBUTE_REPARSE_POINT` set, this field contains the tag identifying " @@ -3573,14 +3584,14 @@ msgid "" "IO_REPARSE_TAG_SYMLINK>` constants in the :mod:`stat` module." msgstr "" -#: ../../library/os.rst:3172 +#: ../../library/os.rst:3179 msgid "" "The standard module :mod:`stat` defines functions and constants that are " "useful for extracting information from a :c:struct:`stat` structure. (On " "Windows, some items are filled with dummy values.)" msgstr "" -#: ../../library/os.rst:3176 +#: ../../library/os.rst:3183 msgid "" "For backward compatibility, a :class:`stat_result` instance is also " "accessible as a tuple of at least 10 integers giving the most important (and " @@ -3592,49 +3603,49 @@ msgid "" "class:`stat_result` as a tuple always returns integers." msgstr "" -#: ../../library/os.rst:3185 +#: ../../library/os.rst:3192 msgid "Windows now returns the file index as :attr:`st_ino` when available." msgstr "" -#: ../../library/os.rst:3189 +#: ../../library/os.rst:3196 msgid "Added the :attr:`st_fstype` member to Solaris/derivatives." msgstr "" -#: ../../library/os.rst:3192 +#: ../../library/os.rst:3199 msgid "Added the :attr:`st_reparse_tag` member on Windows." msgstr "在 Windows 上新增 :attr:`st_reparse_tag` 成員。" -#: ../../library/os.rst:3195 +#: ../../library/os.rst:3202 msgid "" "On Windows, the :attr:`st_mode` member now identifies special files as :" "const:`S_IFCHR`, :const:`S_IFIFO` or :const:`S_IFBLK` as appropriate." msgstr "" -#: ../../library/os.rst:3200 +#: ../../library/os.rst:3207 msgid "" "On Windows, :attr:`st_ctime` is deprecated. Eventually, it will contain the " "last metadata change time, for consistency with other platforms, but for now " "still contains creation time. Use :attr:`st_birthtime` for the creation time." msgstr "" -#: ../../library/os.rst:3206 +#: ../../library/os.rst:3213 msgid "" "On Windows, :attr:`st_ino` may now be up to 128 bits, depending on the file " "system. Previously it would not be above 64 bits, and larger file " "identifiers would be arbitrarily packed." msgstr "" -#: ../../library/os.rst:3210 +#: ../../library/os.rst:3217 msgid "" "On Windows, :attr:`st_rdev` no longer returns a value. Previously it would " "contain the same as :attr:`st_dev`, which was incorrect." msgstr "" -#: ../../library/os.rst:3213 +#: ../../library/os.rst:3220 msgid "Added the :attr:`st_birthtime` member on Windows." msgstr "在 Windows 上新增 :attr:`st_birthtime` 成員。" -#: ../../library/os.rst:3218 +#: ../../library/os.rst:3225 msgid "" "Perform a :c:func:`!statvfs` system call on the given path. The return " "value is an object whose attributes describe the filesystem on the given " @@ -3644,7 +3655,7 @@ msgid "" "`f_favail`, :attr:`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." msgstr "" -#: ../../library/os.rst:3225 +#: ../../library/os.rst:3232 msgid "" "Two module-level constants are defined for the :attr:`f_flag` attribute's " "bit-flags: if :const:`ST_RDONLY` is set, the filesystem is mounted read-" @@ -3652,7 +3663,7 @@ msgid "" "are disabled or not supported." msgstr "" -#: ../../library/os.rst:3230 +#: ../../library/os.rst:3237 msgid "" "Additional module-level constants are defined for GNU/glibc based systems. " "These are :const:`ST_NODEV` (disallow access to device special files), :" @@ -3665,11 +3676,11 @@ msgid "" "relative to mtime/ctime)." msgstr "" -#: ../../library/os.rst:3243 +#: ../../library/os.rst:3250 msgid "The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added." msgstr "新增 :const:`ST_RDONLY` 與 :const:`ST_NOSUID` 常數。" -#: ../../library/os.rst:3249 +#: ../../library/os.rst:3256 msgid "" "The :const:`ST_NODEV`, :const:`ST_NOEXEC`, :const:`ST_SYNCHRONOUS`, :const:" "`ST_MANDLOCK`, :const:`ST_WRITE`, :const:`ST_APPEND`, :const:" @@ -3677,11 +3688,11 @@ msgid "" "`ST_RELATIME` constants were added." msgstr "" -#: ../../library/os.rst:3258 +#: ../../library/os.rst:3265 msgid "Added the :attr:`f_fsid` attribute." msgstr "新增 :attr:`f_fsid` 屬性。" -#: ../../library/os.rst:3264 +#: ../../library/os.rst:3271 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept an open file descriptor for their *dir_fd* parameter. Different " @@ -3693,7 +3704,7 @@ msgid "" "(Specifying ``None`` for *dir_fd* is always supported on all platforms.)" msgstr "" -#: ../../library/os.rst:3274 +#: ../../library/os.rst:3281 msgid "" "To check whether a particular function accepts an open file descriptor for " "its *dir_fd* parameter, use the ``in`` operator on ``supports_dir_fd``. As " @@ -3701,13 +3712,13 @@ msgid "" "open file descriptors for *dir_fd* on the local platform::" msgstr "" -#: ../../library/os.rst:3281 +#: ../../library/os.rst:3288 msgid "" "Currently *dir_fd* parameters only work on Unix platforms; none of them work " "on Windows." msgstr "" -#: ../../library/os.rst:3289 +#: ../../library/os.rst:3296 msgid "" "A :class:`set` object indicating whether :func:`os.access` permits " "specifying ``True`` for its *effective_ids* parameter on the local platform. " @@ -3716,19 +3727,19 @@ msgid "" "func:`os.access`; otherwise it will be empty." msgstr "" -#: ../../library/os.rst:3295 +#: ../../library/os.rst:3302 msgid "" "This expression evaluates to ``True`` if :func:`os.access` supports " "``effective_ids=True`` on the local platform::" msgstr "" -#: ../../library/os.rst:3300 +#: ../../library/os.rst:3307 msgid "" "Currently *effective_ids* is only supported on Unix platforms; it does not " "work on Windows." msgstr "" -#: ../../library/os.rst:3308 +#: ../../library/os.rst:3315 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "permit specifying their *path* parameter as an open file descriptor on the " @@ -3737,7 +3748,7 @@ msgid "" "*path* arguments is not available on all platforms Python supports." msgstr "" -#: ../../library/os.rst:3315 +#: ../../library/os.rst:3322 msgid "" "To determine whether a particular function permits specifying an open file " "descriptor for its *path* parameter, use the ``in`` operator on " @@ -3746,7 +3757,7 @@ msgid "" "platform::" msgstr "" -#: ../../library/os.rst:3328 +#: ../../library/os.rst:3335 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept ``False`` for their *follow_symlinks* parameter on the local " @@ -3759,7 +3770,7 @@ msgid "" "on all platforms.)" msgstr "" -#: ../../library/os.rst:3338 +#: ../../library/os.rst:3345 msgid "" "To check whether a particular function accepts ``False`` for its " "*follow_symlinks* parameter, use the ``in`` operator on " @@ -3768,11 +3779,11 @@ msgid "" "stat` on the local platform::" msgstr "" -#: ../../library/os.rst:3351 +#: ../../library/os.rst:3358 msgid "Create a symbolic link pointing to *src* named *dst*." msgstr "" -#: ../../library/os.rst:3353 +#: ../../library/os.rst:3360 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -3782,7 +3793,7 @@ msgid "" "ignored." msgstr "" -#: ../../library/os.rst:3364 +#: ../../library/os.rst:3371 msgid "" "On newer versions of Windows 10, unprivileged accounts can create symlinks " "if Developer Mode is enabled. When Developer Mode is not available/enabled, " @@ -3790,12 +3801,12 @@ msgid "" "must be run as an administrator." msgstr "" -#: ../../library/os.rst:3370 +#: ../../library/os.rst:3377 msgid "" ":exc:`OSError` is raised when the function is called by an unprivileged user." msgstr "" -#: ../../library/os.rst:3373 +#: ../../library/os.rst:3380 msgid "" "Raises an :ref:`auditing event ` ``os.symlink`` with arguments " "``src``, ``dst``, ``dir_fd``." @@ -3803,27 +3814,27 @@ msgstr "" "引發一個附帶引數 ``src``、``dst``、``dir_fd`` 的\\ :ref:`稽核事件 " "` ``os.symlink``。" -#: ../../library/os.rst:3383 +#: ../../library/os.rst:3390 msgid "" "Added the *dir_fd* parameter, and now allow *target_is_directory* on non-" "Windows platforms." msgstr "" -#: ../../library/os.rst:3390 +#: ../../library/os.rst:3397 msgid "Added support for unelevated symlinks on Windows with Developer Mode." msgstr "" -#: ../../library/os.rst:3396 +#: ../../library/os.rst:3403 msgid "Force write of everything to disk." msgstr "" -#: ../../library/os.rst:3405 +#: ../../library/os.rst:3412 msgid "" "Truncate the file corresponding to *path*, so that it is at most *length* " "bytes in size." msgstr "" -#: ../../library/os.rst:3410 +#: ../../library/os.rst:3417 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``path``, ``length``." @@ -3831,46 +3842,46 @@ msgstr "" "引發一個附帶引數 ``path``、``length`` 的\\ :ref:`稽核事件 ` ``os." "truncate``。" -#: ../../library/os.rst:3425 +#: ../../library/os.rst:3432 msgid "" "Remove (delete) the file *path*. This function is semantically identical " "to :func:`remove`; the ``unlink`` name is its traditional Unix name. Please " "see the documentation for :func:`remove` for further information." msgstr "" -#: ../../library/os.rst:3441 +#: ../../library/os.rst:3448 msgid "Set the access and modified times of the file specified by *path*." msgstr "" -#: ../../library/os.rst:3443 +#: ../../library/os.rst:3450 msgid "" ":func:`utime` takes two optional parameters, *times* and *ns*. These specify " "the times set on *path* and are used as follows:" msgstr "" -#: ../../library/os.rst:3446 +#: ../../library/os.rst:3453 msgid "" "If *ns* is specified, it must be a 2-tuple of the form ``(atime_ns, " "mtime_ns)`` where each member is an int expressing nanoseconds." msgstr "" -#: ../../library/os.rst:3449 +#: ../../library/os.rst:3456 msgid "" "If *times* is not ``None``, it must be a 2-tuple of the form ``(atime, " "mtime)`` where each member is an int or float expressing seconds." msgstr "" -#: ../../library/os.rst:3452 +#: ../../library/os.rst:3459 msgid "" "If *times* is ``None`` and *ns* is unspecified, this is equivalent to " "specifying ``ns=(atime_ns, mtime_ns)`` where both times are the current time." msgstr "" -#: ../../library/os.rst:3456 +#: ../../library/os.rst:3463 msgid "It is an error to specify tuples for both *times* and *ns*." msgstr "" -#: ../../library/os.rst:3458 +#: ../../library/os.rst:3465 msgid "" "Note that the exact times you set here may not be returned by a subsequent :" "func:`~os.stat` call, depending on the resolution with which your operating " @@ -3880,7 +3891,7 @@ msgid "" "func:`utime`." msgstr "" -#: ../../library/os.rst:3469 +#: ../../library/os.rst:3476 msgid "" "Raises an :ref:`auditing event ` ``os.utime`` with arguments " "``path``, ``times``, ``ns``, ``dir_fd``." @@ -3888,13 +3899,13 @@ msgstr "" "引發一個附帶引數 ``path``、``times``、``ns``、``dir_fd`` 的\\ :ref:`稽核事件 " "` ``os.utime``。" -#: ../../library/os.rst:3471 +#: ../../library/os.rst:3478 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd*, *follow_symlinks*, and *ns* parameters." msgstr "" -#: ../../library/os.rst:3485 +#: ../../library/os.rst:3492 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up. For each directory in the tree rooted at directory *top* " @@ -3902,7 +3913,7 @@ msgid "" "filenames)``." msgstr "" -#: ../../library/os.rst:3490 +#: ../../library/os.rst:3497 msgid "" "*dirpath* is a string, the path to the directory. *dirnames* is a list of " "the names of the subdirectories in *dirpath* (including symlinks to " @@ -3916,7 +3927,7 @@ msgid "" "unspecified." msgstr "" -#: ../../library/os.rst:3501 +#: ../../library/os.rst:3508 msgid "" "If optional argument *topdown* is ``True`` or not specified, the triple for " "a directory is generated before the triples for any of its subdirectories " @@ -3927,7 +3938,7 @@ msgid "" "its subdirectories are generated." msgstr "" -#: ../../library/os.rst:3509 +#: ../../library/os.rst:3516 msgid "" "When *topdown* is ``True``, the caller can modify the *dirnames* list in-" "place (perhaps using :keyword:`del` or slice assignment), and :func:`walk` " @@ -3940,7 +3951,7 @@ msgid "" "itself is generated." msgstr "" -#: ../../library/os.rst:3518 +#: ../../library/os.rst:3525 msgid "" "By default, errors from the :func:`scandir` call are ignored. If optional " "argument *onerror* is specified, it should be a function; it will be called " @@ -3950,42 +3961,42 @@ msgid "" "object." msgstr "" -#: ../../library/os.rst:3524 +#: ../../library/os.rst:3531 msgid "" "By default, :func:`walk` will not walk down into symbolic links that resolve " "to directories. Set *followlinks* to ``True`` to visit directories pointed " "to by symlinks, on systems that support them." msgstr "" -#: ../../library/os.rst:3530 +#: ../../library/os.rst:3537 msgid "" "Be aware that setting *followlinks* to ``True`` can lead to infinite " "recursion if a link points to a parent directory of itself. :func:`walk` " "does not keep track of the directories it visited already." msgstr "" -#: ../../library/os.rst:3536 +#: ../../library/os.rst:3543 msgid "" "If you pass a relative pathname, don't change the current working directory " "between resumptions of :func:`walk`. :func:`walk` never changes the current " "directory, and assumes that its caller doesn't either." msgstr "" -#: ../../library/os.rst:3540 ../../library/os.rst:3601 +#: ../../library/os.rst:3547 ../../library/os.rst:3608 msgid "" "This example displays the number of bytes taken by non-directory files in " "each directory under the starting directory, except that it doesn't look " "under any CVS subdirectory::" msgstr "" -#: ../../library/os.rst:3553 +#: ../../library/os.rst:3560 msgid "" "In the next example (simple implementation of :func:`shutil.rmtree`), " "walking the tree bottom-up is essential, :func:`rmdir` doesn't allow " "deleting a directory before the directory is empty::" msgstr "" -#: ../../library/os.rst:3568 +#: ../../library/os.rst:3575 msgid "" "Raises an :ref:`auditing event ` ``os.walk`` with arguments " "``top``, ``topdown``, ``onerror``, ``followlinks``." @@ -3993,25 +4004,25 @@ msgstr "" "引發一個附帶引數 ``top``、``topdown``、``onerror``、``followlinks`` 的\\ :" "ref:`稽核事件 ` ``os.walk``。" -#: ../../library/os.rst:3570 +#: ../../library/os.rst:3577 msgid "" "This function now calls :func:`os.scandir` instead of :func:`os.listdir`, " "making it faster by reducing the number of calls to :func:`os.stat`." msgstr "" -#: ../../library/os.rst:3584 +#: ../../library/os.rst:3591 msgid "" "This behaves exactly like :func:`walk`, except that it yields a 4-tuple " "``(dirpath, dirnames, filenames, dirfd)``, and it supports ``dir_fd``." msgstr "" -#: ../../library/os.rst:3587 +#: ../../library/os.rst:3594 msgid "" "*dirpath*, *dirnames* and *filenames* are identical to :func:`walk` output, " "and *dirfd* is a file descriptor referring to the directory *dirpath*." msgstr "" -#: ../../library/os.rst:3590 +#: ../../library/os.rst:3597 msgid "" "This function always supports :ref:`paths relative to directory descriptors " "` and :ref:`not following symlinks `. Note however " @@ -4019,20 +4030,20 @@ msgid "" "*follow_symlinks* is ``False``." msgstr "" -#: ../../library/os.rst:3597 +#: ../../library/os.rst:3604 msgid "" "Since :func:`fwalk` yields file descriptors, those are only valid until the " "next iteration step, so you should duplicate them (e.g. with :func:`dup`) if " "you want to keep them longer." msgstr "" -#: ../../library/os.rst:3614 +#: ../../library/os.rst:3621 msgid "" "In the next example, walking the tree bottom-up is essential: :func:`rmdir` " "doesn't allow deleting a directory before the directory is empty::" msgstr "" -#: ../../library/os.rst:3629 +#: ../../library/os.rst:3636 msgid "" "Raises an :ref:`auditing event ` ``os.fwalk`` with arguments " "``top``, ``topdown``, ``onerror``, ``follow_symlinks``, ``dir_fd``." @@ -4040,11 +4051,11 @@ msgstr "" "引發一個附帶引數 ``top``、``topdown``、``onerror``、``follow_symlinks``、" "``dir_fd`` 的\\ :ref:`稽核事件 ` ``os.fwalk``。" -#: ../../library/os.rst:3638 +#: ../../library/os.rst:3645 msgid "Added support for :class:`bytes` paths." msgstr "新增對 :class:`bytes` 路徑的支援。" -#: ../../library/os.rst:3644 +#: ../../library/os.rst:3651 msgid "" "Create an anonymous file and return a file descriptor that refers to it. " "*flags* must be one of the ``os.MFD_*`` constants available on the system " @@ -4052,7 +4063,7 @@ msgid "" "descriptor is :ref:`non-inheritable `." msgstr "" -#: ../../library/os.rst:3649 +#: ../../library/os.rst:3656 msgid "" "The name supplied in *name* is used as a filename and will be displayed as " "the target of the corresponding symbolic link in the directory ``/proc/self/" @@ -4062,23 +4073,23 @@ msgid "" "side effects." msgstr "" -#: ../../library/os.rst:3656 +#: ../../library/os.rst:3663 msgid ":ref:`Availability `: Linux >= 3.17 with glibc >= 2.27." msgstr ":ref:`適用 `:Linux 3.17 以上且具有 glibc 2.27 以上。" -#: ../../library/os.rst:3679 +#: ../../library/os.rst:3686 msgid "These flags can be passed to :func:`memfd_create`." msgstr "這些旗標可以傳給 :func:`memfd_create`。" -#: ../../library/os.rst:3681 +#: ../../library/os.rst:3688 msgid ":ref:`Availability `: Linux >= 3.17 with glibc >= 2.27" msgstr ":ref:`適用 `:Linux 3.17 以上且具有 glibc 2.27 以上" -#: ../../library/os.rst:3683 +#: ../../library/os.rst:3690 msgid "The ``MFD_HUGE*`` flags are only available since Linux 4.14." msgstr "``MFD_HUGE*`` 旗標僅在 Linux 4.14 以上可用。" -#: ../../library/os.rst:3690 +#: ../../library/os.rst:3697 msgid "" "Create and return an event file descriptor. The file descriptors supports " "raw :func:`read` and :func:`write` with a buffer size of 8, :func:`~select." @@ -4087,7 +4098,7 @@ msgid "" "ref:`non-inheritable `." msgstr "" -#: ../../library/os.rst:3696 +#: ../../library/os.rst:3703 msgid "" "*initval* is the initial value of the event counter. The initial value must " "be an 32 bit unsigned integer. Please note that the initial value is limited " @@ -4095,87 +4106,87 @@ msgid "" "integer with a maximum value of 2\\ :sup:`64`\\ -\\ 2." msgstr "" -#: ../../library/os.rst:3701 +#: ../../library/os.rst:3708 msgid "" "*flags* can be constructed from :const:`EFD_CLOEXEC`, :const:`EFD_NONBLOCK`, " "and :const:`EFD_SEMAPHORE`." msgstr "" -#: ../../library/os.rst:3704 +#: ../../library/os.rst:3711 msgid "" "If :const:`EFD_SEMAPHORE` is specified and the event counter is non-zero, :" "func:`eventfd_read` returns 1 and decrements the counter by one." msgstr "" -#: ../../library/os.rst:3707 +#: ../../library/os.rst:3714 msgid "" "If :const:`EFD_SEMAPHORE` is not specified and the event counter is non-" "zero, :func:`eventfd_read` returns the current event counter value and " "resets the counter to zero." msgstr "" -#: ../../library/os.rst:3711 +#: ../../library/os.rst:3718 msgid "" "If the event counter is zero and :const:`EFD_NONBLOCK` is not specified, :" "func:`eventfd_read` blocks." msgstr "" -#: ../../library/os.rst:3714 +#: ../../library/os.rst:3721 msgid "" ":func:`eventfd_write` increments the event counter. Write blocks if the " "write operation would increment the counter to a value larger than 2\\ :sup:" "`64`\\ -\\ 2." msgstr "" -#: ../../library/os.rst:3735 +#: ../../library/os.rst:3742 msgid ":ref:`Availability `: Linux >= 2.6.27 with glibc >= 2.8" msgstr ":ref:`適用 `:Linux 2.6.27 以上且具有 glibc 2.8 以上" -#: ../../library/os.rst:3741 +#: ../../library/os.rst:3748 msgid "" "Read value from an :func:`eventfd` file descriptor and return a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: ../../library/os.rst:3744 ../../library/os.rst:3753 -#: ../../library/os.rst:3761 ../../library/os.rst:3770 +#: ../../library/os.rst:3751 ../../library/os.rst:3760 +#: ../../library/os.rst:3768 ../../library/os.rst:3777 msgid ":ref:`Availability `: Linux >= 2.6.27" msgstr ":ref:`適用 `:Linux 2.6.27 以上" -#: ../../library/os.rst:3750 +#: ../../library/os.rst:3757 msgid "" "Add value to an :func:`eventfd` file descriptor. *value* must be a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: ../../library/os.rst:3759 +#: ../../library/os.rst:3766 msgid "Set close-on-exec flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../library/os.rst:3767 +#: ../../library/os.rst:3774 msgid "" "Set :const:`O_NONBLOCK` status flag for new :func:`eventfd` file descriptor." msgstr "設定新的 :func:`eventfd` 檔案描述器的 :const:`O_NONBLOCK` 狀態旗標。" -#: ../../library/os.rst:3776 +#: ../../library/os.rst:3783 msgid "" "Provide semaphore-like semantics for reads from a :func:`eventfd` file " "descriptor. On read the internal counter is decremented by one." msgstr "" -#: ../../library/os.rst:3779 +#: ../../library/os.rst:3786 msgid ":ref:`Availability `: Linux >= 2.6.30" msgstr ":ref:`適用 `:Linux 2.6.30 以上" -#: ../../library/os.rst:3785 +#: ../../library/os.rst:3792 msgid "Linux extended attributes" msgstr "" -#: ../../library/os.rst:3789 +#: ../../library/os.rst:3796 msgid "These functions are all available on Linux only." msgstr "" -#: ../../library/os.rst:3793 +#: ../../library/os.rst:3800 msgid "" "Return the value of the extended filesystem attribute *attribute* for " "*path*. *attribute* can be bytes or str (directly or indirectly through the :" @@ -4183,7 +4194,7 @@ msgid "" "encoding." msgstr "" -#: ../../library/os.rst:3801 +#: ../../library/os.rst:3808 msgid "" "Raises an :ref:`auditing event ` ``os.getxattr`` with arguments " "``path``, ``attribute``." @@ -4191,12 +4202,12 @@ msgstr "" "引發一個附帶引數 ``path``、``attribute`` 的\\ :ref:`稽核事件 ` " "``os.getxattr``。" -#: ../../library/os.rst:3803 ../../library/os.rst:3835 -#: ../../library/os.rst:3860 +#: ../../library/os.rst:3810 ../../library/os.rst:3842 +#: ../../library/os.rst:3867 msgid "Accepts a :term:`path-like object` for *path* and *attribute*." msgstr "" -#: ../../library/os.rst:3809 +#: ../../library/os.rst:3816 msgid "" "Return a list of the extended filesystem attributes on *path*. The " "attributes in the list are represented as strings decoded with the " @@ -4204,14 +4215,14 @@ msgid "" "the current directory." msgstr "" -#: ../../library/os.rst:3817 +#: ../../library/os.rst:3824 msgid "" "Raises an :ref:`auditing event ` ``os.listxattr`` with argument " "``path``." msgstr "" "引發一個附帶引數 ``path`` 的\\ :ref:`稽核事件 ` ``os.listxattr``。" -#: ../../library/os.rst:3825 +#: ../../library/os.rst:3832 msgid "" "Removes the extended filesystem attribute *attribute* from *path*. " "*attribute* should be bytes or str (directly or indirectly through the :" @@ -4219,7 +4230,7 @@ msgid "" "`filesystem encoding and error handler`." msgstr "" -#: ../../library/os.rst:3833 +#: ../../library/os.rst:3840 msgid "" "Raises an :ref:`auditing event ` ``os.removexattr`` with arguments " "``path``, ``attribute``." @@ -4227,7 +4238,7 @@ msgstr "" "引發一個附帶引數 ``path``、``attribute`` 的\\ :ref:`稽核事件 ` " "``os.removexattr``。" -#: ../../library/os.rst:3841 +#: ../../library/os.rst:3848 msgid "" "Set the extended filesystem attribute *attribute* on *path* to *value*. " "*attribute* must be a bytes or str with no embedded NULs (directly or " @@ -4239,13 +4250,13 @@ msgid "" "will not be created and ``EEXISTS`` will be raised." msgstr "" -#: ../../library/os.rst:3855 +#: ../../library/os.rst:3862 msgid "" "A bug in Linux kernel versions less than 2.6.39 caused the flags argument to " "be ignored on some filesystems." msgstr "" -#: ../../library/os.rst:3858 +#: ../../library/os.rst:3865 msgid "" "Raises an :ref:`auditing event ` ``os.setxattr`` with arguments " "``path``, ``attribute``, ``value``, ``flags``." @@ -4253,33 +4264,33 @@ msgstr "" "引發一個附帶引數 ``path``、``attribute``、``value``、``flags`` 的\\ :ref:`稽" "核事件 ` ``os.setxattr``。" -#: ../../library/os.rst:3866 +#: ../../library/os.rst:3873 msgid "" "The maximum size the value of an extended attribute can be. Currently, this " "is 64 KiB on Linux." msgstr "" -#: ../../library/os.rst:3872 +#: ../../library/os.rst:3879 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must create an attribute." msgstr "" -#: ../../library/os.rst:3878 +#: ../../library/os.rst:3885 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must replace an existing attribute." msgstr "" -#: ../../library/os.rst:3885 +#: ../../library/os.rst:3892 msgid "Process Management" msgstr "行程管理" -#: ../../library/os.rst:3887 +#: ../../library/os.rst:3894 msgid "These functions may be used to create and manage processes." msgstr "" -#: ../../library/os.rst:3889 +#: ../../library/os.rst:3896 msgid "" "The various :func:`exec\\* ` functions take a list of arguments for " "the new program loaded into the process. In each case, the first of these " @@ -4290,7 +4301,7 @@ msgid "" "standard output; ``foo`` will seem to be ignored." msgstr "" -#: ../../library/os.rst:3900 +#: ../../library/os.rst:3907 msgid "" "Generate a :const:`SIGABRT` signal to the current process. On Unix, the " "default behavior is to produce a core dump; on Windows, the process " @@ -4299,31 +4310,31 @@ msgid "" "`SIGABRT` with :func:`signal.signal`." msgstr "" -#: ../../library/os.rst:3909 +#: ../../library/os.rst:3916 msgid "Add a path to the DLL search path." msgstr "" -#: ../../library/os.rst:3911 +#: ../../library/os.rst:3918 msgid "" "This search path is used when resolving dependencies for imported extension " "modules (the module itself is resolved through :data:`sys.path`), and also " "by :mod:`ctypes`." msgstr "" -#: ../../library/os.rst:3915 +#: ../../library/os.rst:3922 msgid "" "Remove the directory by calling **close()** on the returned object or using " "it in a :keyword:`with` statement." msgstr "" -#: ../../library/os.rst:3918 +#: ../../library/os.rst:3925 msgid "" "See the `Microsoft documentation `_ for more information about how " "DLLs are loaded." msgstr "" -#: ../../library/os.rst:3922 +#: ../../library/os.rst:3929 msgid "" "Raises an :ref:`auditing event ` ``os.add_dll_directory`` with " "argument ``path``." @@ -4331,7 +4342,7 @@ msgstr "" "引發一個附帶引數 ``path`` 的\\ :ref:`稽核事件 ` ``os." "add_dll_directory``。" -#: ../../library/os.rst:3926 +#: ../../library/os.rst:3933 msgid "" "Previous versions of CPython would resolve DLLs using the default behavior " "for the current process. This led to inconsistencies, such as only sometimes " @@ -4339,14 +4350,14 @@ msgid "" "such as ``AddDllDirectory`` having no effect." msgstr "" -#: ../../library/os.rst:3933 +#: ../../library/os.rst:3940 msgid "" "In 3.8, the two primary ways DLLs are loaded now explicitly override the " "process-wide behavior to ensure consistency. See the :ref:`porting notes " "` for information on updating libraries." msgstr "" -#: ../../library/os.rst:3948 +#: ../../library/os.rst:3955 msgid "" "These functions all execute a new program, replacing the current process; " "they do not return. On Unix, the new executable is loaded into the current " @@ -4354,7 +4365,7 @@ msgid "" "reported as :exc:`OSError` exceptions." msgstr "" -#: ../../library/os.rst:3953 +#: ../../library/os.rst:3960 msgid "" "The current process is replaced immediately. Open file objects and " "descriptors are not flushed, so if there may be data buffered on these open " @@ -4362,7 +4373,7 @@ msgid "" "fsync` before calling an :func:`exec\\* ` function." msgstr "" -#: ../../library/os.rst:3959 +#: ../../library/os.rst:3966 msgid "" "The \"l\" and \"v\" variants of the :func:`exec\\* ` functions differ " "in how command-line arguments are passed. The \"l\" variants are perhaps " @@ -4375,7 +4386,7 @@ msgid "" "is not enforced." msgstr "" -#: ../../library/os.rst:3968 +#: ../../library/os.rst:3975 msgid "" "The variants which include a \"p\" near the end (:func:`execlp`, :func:" "`execlpe`, :func:`execvp`, and :func:`execvpe`) will use the :envvar:`PATH` " @@ -4389,7 +4400,7 @@ msgid "" "even on Windows, as plain names will not be resolved." msgstr "" -#: ../../library/os.rst:3979 +#: ../../library/os.rst:3986 msgid "" "For :func:`execle`, :func:`execlpe`, :func:`execve`, and :func:`execvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -4399,7 +4410,7 @@ msgid "" "process to inherit the environment of the current process." msgstr "" -#: ../../library/os.rst:3986 +#: ../../library/os.rst:3993 msgid "" "For :func:`execve` on some platforms, *path* may also be specified as an " "open file descriptor. This functionality may not be supported on your " @@ -4408,7 +4419,7 @@ msgid "" "`NotImplementedError`." msgstr "" -#: ../../library/os.rst:3991 +#: ../../library/os.rst:3998 msgid "" "Raises an :ref:`auditing event ` ``os.exec`` with arguments " "``path``, ``args``, ``env``." @@ -4416,25 +4427,25 @@ msgstr "" "引發一個附帶引數 ``path``、``args``、``env`` 的\\ :ref:`稽核事件 ` " "``os.exec``。" -#: ../../library/os.rst:3995 +#: ../../library/os.rst:4002 msgid "" "Added support for specifying *path* as an open file descriptor for :func:" "`execve`." msgstr "" -#: ../../library/os.rst:4004 +#: ../../library/os.rst:4011 msgid "" "Exit the process with status *n*, without calling cleanup handlers, flushing " "stdio buffers, etc." msgstr "" -#: ../../library/os.rst:4009 +#: ../../library/os.rst:4016 msgid "" "The standard way to exit is :func:`sys.exit(n) `. :func:`!_exit` " "should normally only be used in the child process after a :func:`fork`." msgstr "" -#: ../../library/os.rst:4012 +#: ../../library/os.rst:4019 msgid "" "The following exit codes are defined and can be used with :func:`_exit`, " "although they are not required. These are typically used for system " @@ -4442,139 +4453,139 @@ msgid "" "delivery program." msgstr "" -#: ../../library/os.rst:4018 +#: ../../library/os.rst:4025 msgid "" "Some of these may not be available on all Unix platforms, since there is " "some variation. These constants are defined where they are defined by the " "underlying platform." msgstr "" -#: ../../library/os.rst:4025 +#: ../../library/os.rst:4032 msgid "" "Exit code that means no error occurred. May be taken from the defined value " "of ``EXIT_SUCCESS`` on some platforms. Generally has a value of zero." msgstr "" -#: ../../library/os.rst:4033 +#: ../../library/os.rst:4040 msgid "" "Exit code that means the command was used incorrectly, such as when the " "wrong number of arguments are given." msgstr "" -#: ../../library/os.rst:4041 +#: ../../library/os.rst:4048 msgid "Exit code that means the input data was incorrect." msgstr "" -#: ../../library/os.rst:4048 +#: ../../library/os.rst:4055 msgid "Exit code that means an input file did not exist or was not readable." msgstr "" -#: ../../library/os.rst:4055 +#: ../../library/os.rst:4062 msgid "Exit code that means a specified user did not exist." msgstr "" -#: ../../library/os.rst:4062 +#: ../../library/os.rst:4069 msgid "Exit code that means a specified host did not exist." msgstr "" -#: ../../library/os.rst:4069 +#: ../../library/os.rst:4076 msgid "Exit code that means that a required service is unavailable." msgstr "" -#: ../../library/os.rst:4076 +#: ../../library/os.rst:4083 msgid "Exit code that means an internal software error was detected." msgstr "" -#: ../../library/os.rst:4083 +#: ../../library/os.rst:4090 msgid "" "Exit code that means an operating system error was detected, such as the " "inability to fork or create a pipe." msgstr "" -#: ../../library/os.rst:4091 +#: ../../library/os.rst:4098 msgid "" "Exit code that means some system file did not exist, could not be opened, or " "had some other kind of error." msgstr "" -#: ../../library/os.rst:4099 +#: ../../library/os.rst:4106 msgid "Exit code that means a user specified output file could not be created." msgstr "" -#: ../../library/os.rst:4106 +#: ../../library/os.rst:4113 msgid "" "Exit code that means that an error occurred while doing I/O on some file." msgstr "" -#: ../../library/os.rst:4113 +#: ../../library/os.rst:4120 msgid "" "Exit code that means a temporary failure occurred. This indicates something " "that may not really be an error, such as a network connection that couldn't " "be made during a retryable operation." msgstr "" -#: ../../library/os.rst:4122 +#: ../../library/os.rst:4129 msgid "" "Exit code that means that a protocol exchange was illegal, invalid, or not " "understood." msgstr "" -#: ../../library/os.rst:4130 +#: ../../library/os.rst:4137 msgid "" "Exit code that means that there were insufficient permissions to perform the " "operation (but not intended for file system problems)." msgstr "" -#: ../../library/os.rst:4138 +#: ../../library/os.rst:4145 msgid "Exit code that means that some kind of configuration error occurred." msgstr "" -#: ../../library/os.rst:4145 +#: ../../library/os.rst:4152 msgid "Exit code that means something like \"an entry was not found\"." msgstr "" -#: ../../library/os.rst:4152 +#: ../../library/os.rst:4159 msgid "" "Fork a child process. Return ``0`` in the child and the child's process id " "in the parent. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../library/os.rst:4155 +#: ../../library/os.rst:4162 msgid "" "Note that some platforms including FreeBSD <= 6.3 and Cygwin have known " "issues when using ``fork()`` from a thread." msgstr "" -#: ../../library/os.rst:4158 +#: ../../library/os.rst:4165 msgid "" "Raises an :ref:`auditing event ` ``os.fork`` with no arguments." msgstr "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``os.fork``。" -#: ../../library/os.rst:4162 +#: ../../library/os.rst:4169 msgid "" "If you use TLS sockets in an application calling ``fork()``, see the warning " "in the :mod:`ssl` documentation." msgstr "" -#: ../../library/os.rst:4167 ../../library/os.rst:4211 +#: ../../library/os.rst:4174 ../../library/os.rst:4218 msgid "" "On macOS the use of this function is unsafe when mixed with using higher-" "level system APIs, and that includes using :mod:`urllib.request`." msgstr "" -#: ../../library/os.rst:4170 +#: ../../library/os.rst:4177 msgid "" "Calling ``fork()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../library/os.rst:4174 +#: ../../library/os.rst:4181 msgid "" "If Python is able to detect that your process has multiple threads, :func:" "`os.fork` now raises a :exc:`DeprecationWarning`." msgstr "" -#: ../../library/os.rst:4178 +#: ../../library/os.rst:4185 msgid "" "We chose to surface this as a warning, when detectable, to better inform " "developers of a design problem that the POSIX platform specifically notes as " @@ -4585,25 +4596,25 @@ msgid "" "``free``)." msgstr "" -#: ../../library/os.rst:4187 +#: ../../library/os.rst:4194 msgid "" "Users of macOS or users of libc or malloc implementations other than those " "typically found in glibc to date are among those already more likely to " "experience deadlocks running such code." msgstr "" -#: ../../library/os.rst:4191 +#: ../../library/os.rst:4198 msgid "" "See `this discussion on fork being incompatible with threads `_ for technical details of why we're surfacing " "this longstanding platform compatibility problem to developers." msgstr "" -#: ../../library/os.rst:4196 ../../library/os.rst:4443 +#: ../../library/os.rst:4203 ../../library/os.rst:4450 msgid ":ref:`Availability `: POSIX, not Emscripten, not WASI." msgstr ":ref:`適用 `:POSIX、非 Emscripten、非 WASI。" -#: ../../library/os.rst:4201 +#: ../../library/os.rst:4208 msgid "" "Fork a child process, using a new pseudo-terminal as the child's controlling " "terminal. Return a pair of ``(pid, fd)``, where *pid* is ``0`` in the child, " @@ -4612,31 +4623,31 @@ msgid "" "the :mod:`pty` module. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../library/os.rst:4207 +#: ../../library/os.rst:4214 msgid "" "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``os.forkpty``。" -#: ../../library/os.rst:4214 +#: ../../library/os.rst:4221 msgid "" "Calling ``forkpty()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../library/os.rst:4218 +#: ../../library/os.rst:4225 msgid "" "If Python is able to detect that your process has multiple threads, this now " "raises a :exc:`DeprecationWarning`. See the longer explanation on :func:`os." "fork`." msgstr "" -#: ../../library/os.rst:4232 +#: ../../library/os.rst:4239 msgid "" "Send signal *sig* to the process *pid*. Constants for the specific signals " "available on the host platform are defined in the :mod:`signal` module." msgstr "" -#: ../../library/os.rst:4235 +#: ../../library/os.rst:4242 msgid "" "Windows: The :const:`signal.CTRL_C_EVENT` and :const:`signal." "CTRL_BREAK_EVENT` signals are special signals which can only be sent to " @@ -4647,11 +4658,11 @@ msgid "" "process handles to be killed." msgstr "" -#: ../../library/os.rst:4243 +#: ../../library/os.rst:4250 msgid "See also :func:`signal.pthread_kill`." msgstr "另請參閱 :func:`signal.pthread_kill`\\ 。" -#: ../../library/os.rst:4245 +#: ../../library/os.rst:4252 msgid "" "Raises an :ref:`auditing event ` ``os.kill`` with arguments " "``pid``, ``sig``." @@ -4659,11 +4670,11 @@ msgstr "" "引發一個附帶引數 ``pid``、``sig`` 的\\ :ref:`稽核事件 ` ``os." "kill``。" -#: ../../library/os.rst:4259 +#: ../../library/os.rst:4266 msgid "Send the signal *sig* to the process group *pgid*." msgstr "" -#: ../../library/os.rst:4261 +#: ../../library/os.rst:4268 msgid "" "Raises an :ref:`auditing event ` ``os.killpg`` with arguments " "``pgid``, ``sig``." @@ -4671,27 +4682,27 @@ msgstr "" "引發一個附帶引數 ``pgid``、``sig`` 的\\ :ref:`稽核事件 ` ``os." "killpg``。" -#: ../../library/os.rst:4268 +#: ../../library/os.rst:4275 msgid "" "Add *increment* to the process's \"niceness\". Return the new niceness." msgstr "" -#: ../../library/os.rst:4275 +#: ../../library/os.rst:4282 msgid "" "Return a file descriptor referring to the process *pid* with *flags* set. " "This descriptor can be used to perform process management without races and " "signals." msgstr "" -#: ../../library/os.rst:4279 +#: ../../library/os.rst:4286 msgid "See the :manpage:`pidfd_open(2)` man page for more details." msgstr "更多細節請見 :manpage:`pidfd_open(2)` 手冊頁。" -#: ../../library/os.rst:4281 +#: ../../library/os.rst:4288 msgid ":ref:`Availability `: Linux >= 5.3" msgstr ":ref:`適用 `:Linux 5.3 以上" -#: ../../library/os.rst:4286 +#: ../../library/os.rst:4293 msgid "" "This flag indicates that the file descriptor will be non-blocking. If the " "process referred to by the file descriptor has not yet terminated, then an " @@ -4699,17 +4710,17 @@ msgid "" "immediately return the error :const:`~errno.EAGAIN` rather than blocking." msgstr "" -#: ../../library/os.rst:4291 +#: ../../library/os.rst:4298 msgid ":ref:`Availability `: Linux >= 5.10" msgstr ":ref:`適用 `:Linux 5.10 以上" -#: ../../library/os.rst:4297 +#: ../../library/os.rst:4304 msgid "" "Lock program segments into memory. The value of *op* (defined in ````) determines which segments are locked." msgstr "" -#: ../../library/os.rst:4305 +#: ../../library/os.rst:4312 msgid "" "Open a pipe to or from command *cmd*. The return value is an open file " "object connected to the pipe, which can be read or written depending on " @@ -4719,7 +4730,7 @@ msgid "" "rather than bytes." msgstr "" -#: ../../library/os.rst:4313 +#: ../../library/os.rst:4320 msgid "" "The ``close`` method returns :const:`None` if the subprocess exited " "successfully, or the subprocess's return code if there was an error. On " @@ -4731,60 +4742,60 @@ msgid "" "contains the signed integer return code from the child process." msgstr "" -#: ../../library/os.rst:4323 +#: ../../library/os.rst:4330 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the ``close`` " "method result (exit status) into an exit code if it is not ``None``. On " "Windows, the ``close`` method result is directly the exit code (or ``None``)." msgstr "" -#: ../../library/os.rst:4328 +#: ../../library/os.rst:4335 msgid "" "This is implemented using :class:`subprocess.Popen`; see that class's " "documentation for more powerful ways to manage and communicate with " "subprocesses." msgstr "" -#: ../../library/os.rst:4332 +#: ../../library/os.rst:4339 msgid ":ref:`Availability `: not Emscripten, not WASI." msgstr ":ref:`適用 `:非 Emscripten、非 WASI。" -#: ../../library/os.rst:4335 +#: ../../library/os.rst:4342 msgid "" "The :ref:`Python UTF-8 Mode ` affects encodings used for *cmd* " "and pipe contents." msgstr "" -#: ../../library/os.rst:4338 +#: ../../library/os.rst:4345 msgid "" ":func:`popen` is a simple wrapper around :class:`subprocess.Popen`. Use :" "class:`subprocess.Popen` or :func:`subprocess.run` to control options like " "encodings." msgstr "" -#: ../../library/os.rst:4347 +#: ../../library/os.rst:4354 msgid "Wraps the :c:func:`!posix_spawn` C library API for use from Python." msgstr "" -#: ../../library/os.rst:4349 +#: ../../library/os.rst:4356 msgid "" "Most users should use :func:`subprocess.run` instead of :func:`posix_spawn`." msgstr "" -#: ../../library/os.rst:4351 +#: ../../library/os.rst:4358 msgid "" "The positional-only arguments *path*, *args*, and *env* are similar to :func:" "`execve`." msgstr "" -#: ../../library/os.rst:4354 +#: ../../library/os.rst:4361 msgid "" "The *path* parameter is the path to the executable file. The *path* should " "contain a directory. Use :func:`posix_spawnp` to pass an executable file " "without directory." msgstr "" -#: ../../library/os.rst:4358 +#: ../../library/os.rst:4365 msgid "" "The *file_actions* argument may be a sequence of tuples describing actions " "to take on specific file descriptors in the child process between the C " @@ -4793,31 +4804,31 @@ msgid "" "describing the remaining tuple elements:" msgstr "" -#: ../../library/os.rst:4366 +#: ../../library/os.rst:4373 msgid "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" msgstr "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" -#: ../../library/os.rst:4368 +#: ../../library/os.rst:4375 msgid "Performs ``os.dup2(os.open(path, flags, mode), fd)``." msgstr "" -#: ../../library/os.rst:4372 +#: ../../library/os.rst:4379 msgid "(``os.POSIX_SPAWN_CLOSE``, *fd*)" msgstr "(``os.POSIX_SPAWN_CLOSE``, *fd*)" -#: ../../library/os.rst:4374 +#: ../../library/os.rst:4381 msgid "Performs ``os.close(fd)``." msgstr "" -#: ../../library/os.rst:4378 +#: ../../library/os.rst:4385 msgid "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" msgstr "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" -#: ../../library/os.rst:4380 +#: ../../library/os.rst:4387 msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "" -#: ../../library/os.rst:4382 +#: ../../library/os.rst:4389 msgid "" "These tuples correspond to the C library :c:func:`!" "posix_spawn_file_actions_addopen`, :c:func:`!" @@ -4826,7 +4837,7 @@ msgid "" "`!posix_spawn` call itself." msgstr "" -#: ../../library/os.rst:4388 +#: ../../library/os.rst:4395 msgid "" "The *setpgroup* argument will set the process group of the child to the " "value specified. If the value specified is 0, the child's process group ID " @@ -4835,7 +4846,7 @@ msgid "" "corresponds to the C library :c:macro:`!POSIX_SPAWN_SETPGROUP` flag." msgstr "" -#: ../../library/os.rst:4394 +#: ../../library/os.rst:4401 msgid "" "If the *resetids* argument is ``True`` it will reset the effective UID and " "GID of the child to the real UID and GID of the parent process. If the " @@ -4846,7 +4857,7 @@ msgid "" "library :c:macro:`!POSIX_SPAWN_RESETIDS` flag." msgstr "" -#: ../../library/os.rst:4402 +#: ../../library/os.rst:4409 msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " "``posix_spawn``. *setsid* requires :c:macro:`!POSIX_SPAWN_SETSID` or :c:" @@ -4854,7 +4865,7 @@ msgid "" "is raised." msgstr "" -#: ../../library/os.rst:4407 +#: ../../library/os.rst:4414 msgid "" "The *setsigmask* argument will set the signal mask to the signal set " "specified. If the parameter is not used, then the child inherits the " @@ -4862,14 +4873,14 @@ msgid "" "POSIX_SPAWN_SETSIGMASK` flag." msgstr "" -#: ../../library/os.rst:4412 +#: ../../library/os.rst:4419 msgid "" "The *sigdef* argument will reset the disposition of all signals in the set " "specified. This argument corresponds to the C library :c:macro:`!" "POSIX_SPAWN_SETSIGDEF` flag." msgstr "" -#: ../../library/os.rst:4416 +#: ../../library/os.rst:4423 msgid "" "The *scheduler* argument must be a tuple containing the (optional) scheduler " "policy and an instance of :class:`sched_param` with the scheduler " @@ -4879,7 +4890,7 @@ msgid "" "POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" -#: ../../library/os.rst:4423 ../../library/os.rst:4439 +#: ../../library/os.rst:4430 ../../library/os.rst:4446 msgid "" "Raises an :ref:`auditing event ` ``os.posix_spawn`` with arguments " "``path``, ``argv``, ``env``." @@ -4887,72 +4898,72 @@ msgstr "" "引發一個附帶引數 ``path``、``argv``、``env`` 的\\ :ref:`稽核事件 ` " "``os.posix_spawn``。" -#: ../../library/os.rst:4433 +#: ../../library/os.rst:4440 msgid "Wraps the :c:func:`!posix_spawnp` C library API for use from Python." msgstr "" -#: ../../library/os.rst:4435 +#: ../../library/os.rst:4442 msgid "" "Similar to :func:`posix_spawn` except that the system searches for the " "*executable* file in the list of directories specified by the :envvar:`PATH` " "environment variable (in the same way as for ``execvp(3)``)." msgstr "" -#: ../../library/os.rst:4445 +#: ../../library/os.rst:4452 msgid "See :func:`posix_spawn` documentation." msgstr "見 :func:`posix_spawn` 文件。" -#: ../../library/os.rst:4451 +#: ../../library/os.rst:4458 msgid "" "Register callables to be executed when a new child process is forked using :" "func:`os.fork` or similar process cloning APIs. The parameters are optional " "and keyword-only. Each specifies a different call point." msgstr "" -#: ../../library/os.rst:4456 +#: ../../library/os.rst:4463 msgid "*before* is a function called before forking a child process." msgstr "" -#: ../../library/os.rst:4457 +#: ../../library/os.rst:4464 msgid "" "*after_in_parent* is a function called from the parent process after forking " "a child process." msgstr "" -#: ../../library/os.rst:4459 +#: ../../library/os.rst:4466 msgid "*after_in_child* is a function called from the child process." msgstr "" -#: ../../library/os.rst:4461 +#: ../../library/os.rst:4468 msgid "" "These calls are only made if control is expected to return to the Python " "interpreter. A typical :mod:`subprocess` launch will not trigger them as " "the child is not going to re-enter the interpreter." msgstr "" -#: ../../library/os.rst:4465 +#: ../../library/os.rst:4472 msgid "" "Functions registered for execution before forking are called in reverse " "registration order. Functions registered for execution after forking " "(either in the parent or in the child) are called in registration order." msgstr "" -#: ../../library/os.rst:4470 +#: ../../library/os.rst:4477 msgid "" "Note that :c:func:`fork` calls made by third-party C code may not call those " "functions, unless it explicitly calls :c:func:`PyOS_BeforeFork`, :c:func:" "`PyOS_AfterFork_Parent` and :c:func:`PyOS_AfterFork_Child`." msgstr "" -#: ../../library/os.rst:4474 +#: ../../library/os.rst:4481 msgid "There is no way to unregister a function." msgstr "" -#: ../../library/os.rst:4490 +#: ../../library/os.rst:4497 msgid "Execute the program *path* in a new process." msgstr "" -#: ../../library/os.rst:4492 +#: ../../library/os.rst:4499 msgid "" "(Note that the :mod:`subprocess` module provides more powerful facilities " "for spawning new processes and retrieving their results; using that module " @@ -4960,7 +4971,7 @@ msgid "" "`subprocess-replacements` section.)" msgstr "" -#: ../../library/os.rst:4497 +#: ../../library/os.rst:4504 msgid "" "If *mode* is :const:`P_NOWAIT`, this function returns the process id of the " "new process; if *mode* is :const:`P_WAIT`, returns the process's exit code " @@ -4969,13 +4980,13 @@ msgid "" "handle, so can be used with the :func:`waitpid` function." msgstr "" -#: ../../library/os.rst:4503 +#: ../../library/os.rst:4510 msgid "" "Note on VxWorks, this function doesn't return ``-signal`` when the new " "process is killed. Instead it raises OSError exception." msgstr "" -#: ../../library/os.rst:4506 +#: ../../library/os.rst:4513 msgid "" "The \"l\" and \"v\" variants of the :func:`spawn\\* ` functions " "differ in how command-line arguments are passed. The \"l\" variants are " @@ -4987,7 +4998,7 @@ msgid "" "to the child process must start with the name of the command being run." msgstr "" -#: ../../library/os.rst:4515 +#: ../../library/os.rst:4522 msgid "" "The variants which include a second \"p\" near the end (:func:`spawnlp`, :" "func:`spawnlpe`, :func:`spawnvp`, and :func:`spawnvpe`) will use the :envvar:" @@ -5000,7 +5011,7 @@ msgid "" "appropriate absolute or relative path." msgstr "" -#: ../../library/os.rst:4525 +#: ../../library/os.rst:4532 msgid "" "For :func:`spawnle`, :func:`spawnlpe`, :func:`spawnve`, and :func:`spawnvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -5012,13 +5023,13 @@ msgid "" "values will cause the function to fail, with a return value of ``127``." msgstr "" -#: ../../library/os.rst:4534 +#: ../../library/os.rst:4541 msgid "" "As an example, the following calls to :func:`spawnlp` and :func:`spawnvpe` " "are equivalent::" msgstr "" -#: ../../library/os.rst:4543 +#: ../../library/os.rst:4550 msgid "" "Raises an :ref:`auditing event ` ``os.spawn`` with arguments " "``mode``, ``path``, ``args``, ``env``." @@ -5026,7 +5037,7 @@ msgstr "" "引發一個附帶引數 ``mode``、``path``、``args``、``env`` 的\\ :ref:`稽核事件 " "` ``os.spawn``。" -#: ../../library/os.rst:4547 +#: ../../library/os.rst:4554 msgid "" ":func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are " "not available on Windows. :func:`spawnle` and :func:`spawnve` are not " @@ -5034,7 +5045,7 @@ msgid "" "instead." msgstr "" -#: ../../library/os.rst:4559 +#: ../../library/os.rst:4566 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If either of these values is given, the :func:" @@ -5042,7 +5053,7 @@ msgid "" "been created, with the process id as the return value." msgstr "" -#: ../../library/os.rst:4569 +#: ../../library/os.rst:4576 msgid "" "Possible value for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If this is given as *mode*, the :func:`spawn\\* " @@ -5051,7 +5062,7 @@ msgid "" "successful, or ``-signal`` if a signal kills the process." msgstr "" -#: ../../library/os.rst:4581 +#: ../../library/os.rst:4588 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. These are less portable than those listed above. :" @@ -5061,11 +5072,11 @@ msgid "" "function will not return." msgstr "" -#: ../../library/os.rst:4592 +#: ../../library/os.rst:4599 msgid "Start a file with its associated application." msgstr "" -#: ../../library/os.rst:4594 +#: ../../library/os.rst:4601 msgid "" "When *operation* is not specified, this acts like double-clicking the file " "in Windows Explorer, or giving the file name as an argument to the :program:" @@ -5073,7 +5084,7 @@ msgid "" "whatever application (if any) its extension is associated." msgstr "" -#: ../../library/os.rst:4599 +#: ../../library/os.rst:4606 msgid "" "When another *operation* is given, it must be a \"command verb\" that " "specifies what should be done with the file. Common verbs documented by " @@ -5081,28 +5092,28 @@ msgid "" "as well as ``'explore'`` and ``'find'`` (to be used on directories)." msgstr "" -#: ../../library/os.rst:4604 +#: ../../library/os.rst:4611 msgid "" "When launching an application, specify *arguments* to be passed as a single " "string. This argument may have no effect when using this function to launch " "a document." msgstr "" -#: ../../library/os.rst:4608 +#: ../../library/os.rst:4615 msgid "" "The default working directory is inherited, but may be overridden by the " "*cwd* argument. This should be an absolute path. A relative *path* will be " "resolved against this argument." msgstr "" -#: ../../library/os.rst:4612 +#: ../../library/os.rst:4619 msgid "" "Use *show_cmd* to override the default window style. Whether this has any " "effect will depend on the application being launched. Values are integers as " "supported by the Win32 :c:func:`!ShellExecute` function." msgstr "" -#: ../../library/os.rst:4616 +#: ../../library/os.rst:4623 msgid "" ":func:`startfile` returns as soon as the associated application is launched. " "There is no option to wait for the application to close, and no way to " @@ -5113,14 +5124,14 @@ msgid "" "encoded for Win32." msgstr "" -#: ../../library/os.rst:4624 +#: ../../library/os.rst:4631 msgid "" "To reduce interpreter startup overhead, the Win32 :c:func:`!ShellExecute` " "function is not resolved until this function is first called. If the " "function cannot be resolved, :exc:`NotImplementedError` will be raised." msgstr "" -#: ../../library/os.rst:4628 +#: ../../library/os.rst:4635 msgid "" "Raises an :ref:`auditing event ` ``os.startfile`` with arguments " "``path``, ``operation``." @@ -5128,7 +5139,7 @@ msgstr "" "引發一個附帶引數 ``path``、``operation`` 的\\ :ref:`稽核事件 ` " "``os.startfile``。" -#: ../../library/os.rst:4630 +#: ../../library/os.rst:4637 msgid "" "Raises an :ref:`auditing event ` ``os.startfile/2`` with arguments " "``path``, ``operation``, ``arguments``, ``cwd``, ``show_cmd``." @@ -5136,13 +5147,13 @@ msgstr "" "引發一個附帶引數 ``path``、``operation``、``arguments``、``cwd``、" "``show_cmd`` 的\\ :ref:`稽核事件 ` ``os.startfile/2``。" -#: ../../library/os.rst:4634 +#: ../../library/os.rst:4641 msgid "" "Added the *arguments*, *cwd* and *show_cmd* arguments, and the ``os." "startfile/2`` audit event." msgstr "" -#: ../../library/os.rst:4641 +#: ../../library/os.rst:4648 msgid "" "Execute the command (a string) in a subshell. This is implemented by " "calling the Standard C function :c:func:`system`, and has the same " @@ -5153,13 +5164,13 @@ msgid "" "value of the Python function is system-dependent." msgstr "" -#: ../../library/os.rst:4649 +#: ../../library/os.rst:4656 msgid "" "On Unix, the return value is the exit status of the process encoded in the " "format specified for :func:`wait`." msgstr "" -#: ../../library/os.rst:4652 +#: ../../library/os.rst:4659 msgid "" "On Windows, the return value is that returned by the system shell after " "running *command*. The shell is given by the Windows environment variable :" @@ -5168,7 +5179,7 @@ msgid "" "shell documentation." msgstr "" -#: ../../library/os.rst:4658 +#: ../../library/os.rst:4665 msgid "" "The :mod:`subprocess` module provides more powerful facilities for spawning " "new processes and retrieving their results; using that module is preferable " @@ -5176,54 +5187,54 @@ msgid "" "the :mod:`subprocess` documentation for some helpful recipes." msgstr "" -#: ../../library/os.rst:4663 +#: ../../library/os.rst:4670 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the result " "(exit status) into an exit code. On Windows, the result is directly the exit " "code." msgstr "" -#: ../../library/os.rst:4667 +#: ../../library/os.rst:4674 msgid "" "Raises an :ref:`auditing event ` ``os.system`` with argument " "``command``." msgstr "" "引發一個附帶引數 ``command`` 的\\ :ref:`稽核事件 ` ``os.system``。" -#: ../../library/os.rst:4674 +#: ../../library/os.rst:4681 msgid "" "Returns the current global process times. The return value is an object with " "five attributes:" msgstr "" -#: ../../library/os.rst:4677 +#: ../../library/os.rst:4684 msgid ":attr:`!user` - user time" msgstr ":attr:`!user` - 使用者時間" -#: ../../library/os.rst:4678 +#: ../../library/os.rst:4685 msgid ":attr:`!system` - system time" msgstr ":attr:`!system` - 系統時間" -#: ../../library/os.rst:4679 +#: ../../library/os.rst:4686 msgid ":attr:`!children_user` - user time of all child processes" msgstr ":attr:`!children_user` - 所有子行程的使用者時間" -#: ../../library/os.rst:4680 +#: ../../library/os.rst:4687 msgid ":attr:`!children_system` - system time of all child processes" msgstr ":attr:`!children_system` - 所有子行程的系統時間" -#: ../../library/os.rst:4681 +#: ../../library/os.rst:4688 msgid ":attr:`!elapsed` - elapsed real time since a fixed point in the past" msgstr "" -#: ../../library/os.rst:4683 +#: ../../library/os.rst:4690 msgid "" "For backwards compatibility, this object also behaves like a five-tuple " "containing :attr:`!user`, :attr:`!system`, :attr:`!children_user`, :attr:`!" "children_system`, and :attr:`!elapsed` in that order." msgstr "" -#: ../../library/os.rst:4687 +#: ../../library/os.rst:4694 msgid "" "See the Unix manual page :manpage:`times(2)` and `times(3) `_ manual page on Unix or `the " @@ -5233,7 +5244,7 @@ msgid "" "attributes are zero." msgstr "" -#: ../../library/os.rst:4701 +#: ../../library/os.rst:4708 msgid "" "Wait for completion of a child process, and return a tuple containing its " "pid and exit status indication: a 16-bit number, whose low byte is the " @@ -5242,87 +5253,87 @@ msgid "" "if a core file was produced." msgstr "" -#: ../../library/os.rst:4707 +#: ../../library/os.rst:4714 msgid "" "If there are no children that could be waited for, :exc:`ChildProcessError` " "is raised." msgstr "" -#: ../../library/os.rst:4710 ../../library/os.rst:4785 +#: ../../library/os.rst:4717 ../../library/os.rst:4792 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exit code." msgstr "" -#: ../../library/os.rst:4717 +#: ../../library/os.rst:4724 msgid "" "The other :func:`!wait*` functions documented below can be used to wait for " "the completion of a specific child process and have more options. :func:" "`waitpid` is the only one also available on Windows." msgstr "" -#: ../../library/os.rst:4724 +#: ../../library/os.rst:4731 msgid "Wait for the completion of a child process." msgstr "" -#: ../../library/os.rst:4726 +#: ../../library/os.rst:4733 msgid "" "*idtype* can be :data:`P_PID`, :data:`P_PGID`, :data:`P_ALL`, or (on Linux) :" "data:`P_PIDFD`. The interpretation of *id* depends on it; see their " "individual descriptions." msgstr "" -#: ../../library/os.rst:4729 +#: ../../library/os.rst:4736 msgid "" "*options* is an OR combination of flags. At least one of :data:`WEXITED`, :" "data:`WSTOPPED` or :data:`WCONTINUED` is required; :data:`WNOHANG` and :data:" "`WNOWAIT` are additional optional flags." msgstr "" -#: ../../library/os.rst:4733 +#: ../../library/os.rst:4740 msgid "" "The return value is an object representing the data contained in the :c:type:" "`siginfo_t` structure with the following attributes:" msgstr "" -#: ../../library/os.rst:4736 +#: ../../library/os.rst:4743 msgid ":attr:`!si_pid` (process ID)" msgstr "" -#: ../../library/os.rst:4737 +#: ../../library/os.rst:4744 msgid ":attr:`!si_uid` (real user ID of the child)" msgstr "" -#: ../../library/os.rst:4738 +#: ../../library/os.rst:4745 msgid ":attr:`!si_signo` (always :const:`~signal.SIGCHLD`)" msgstr "" -#: ../../library/os.rst:4739 +#: ../../library/os.rst:4746 msgid "" ":attr:`!si_status` (the exit status or signal number, depending on :attr:`!" "si_code`)" msgstr "" -#: ../../library/os.rst:4740 +#: ../../library/os.rst:4747 msgid ":attr:`!si_code` (see :data:`CLD_EXITED` for possible values)" msgstr "" -#: ../../library/os.rst:4742 +#: ../../library/os.rst:4749 msgid "" "If :data:`WNOHANG` is specified and there are no matching children in the " "requested state, ``None`` is returned. Otherwise, if there are no matching " "children that could be waited for, :exc:`ChildProcessError` is raised." msgstr "" -#: ../../library/os.rst:4750 +#: ../../library/os.rst:4757 msgid "This function is not available on macOS." msgstr "" -#: ../../library/os.rst:4757 +#: ../../library/os.rst:4764 msgid "The details of this function differ on Unix and Windows." msgstr "" -#: ../../library/os.rst:4759 +#: ../../library/os.rst:4766 msgid "" "On Unix: Wait for completion of a child process given by process id *pid*, " "and return a tuple containing its process id and exit status indication " @@ -5331,7 +5342,7 @@ msgid "" "operation." msgstr "" -#: ../../library/os.rst:4764 +#: ../../library/os.rst:4771 msgid "" "If *pid* is greater than ``0``, :func:`waitpid` requests status information " "for that specific process. If *pid* is ``0``, the request is for the status " @@ -5341,7 +5352,7 @@ msgid "" "group ``-pid`` (the absolute value of *pid*)." msgstr "" -#: ../../library/os.rst:4771 +#: ../../library/os.rst:4778 msgid "" "*options* is an OR combination of flags. If it contains :data:`WNOHANG` and " "there are no matching children in the requested state, ``(0, 0)`` is " @@ -5350,7 +5361,7 @@ msgid "" "are :data:`WUNTRACED` and :data:`WCONTINUED`." msgstr "" -#: ../../library/os.rst:4777 +#: ../../library/os.rst:4784 msgid "" "On Windows: Wait for completion of a process given by process handle *pid*, " "and return a tuple containing *pid*, and its exit status shifted left by 8 " @@ -5362,7 +5373,7 @@ msgid "" "process handles." msgstr "" -#: ../../library/os.rst:4798 +#: ../../library/os.rst:4805 msgid "" "Similar to :func:`waitpid`, except no process id argument is given and a 3-" "element tuple containing the child's process id, exit status indication, and " @@ -5371,13 +5382,13 @@ msgid "" "same as that provided to :func:`waitpid` and :func:`wait4`." msgstr "" -#: ../../library/os.rst:4805 ../../library/os.rst:4819 +#: ../../library/os.rst:4812 ../../library/os.rst:4826 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exitcode." msgstr "" -#: ../../library/os.rst:4813 +#: ../../library/os.rst:4820 msgid "" "Similar to :func:`waitpid`, except a 3-element tuple, containing the child's " "process id, exit status indication, and resource usage information is " @@ -5386,118 +5397,118 @@ msgid "" "to :func:`waitpid`." msgstr "" -#: ../../library/os.rst:4830 +#: ../../library/os.rst:4837 msgid "" "These are the possible values for *idtype* in :func:`waitid`. They affect " "how *id* is interpreted:" msgstr "" -#: ../../library/os.rst:4833 +#: ../../library/os.rst:4840 msgid ":data:`!P_PID` - wait for the child whose PID is *id*." msgstr "" -#: ../../library/os.rst:4834 +#: ../../library/os.rst:4841 msgid ":data:`!P_PGID` - wait for any child whose progress group ID is *id*." msgstr "" -#: ../../library/os.rst:4835 +#: ../../library/os.rst:4842 msgid ":data:`!P_ALL` - wait for any child; *id* is ignored." msgstr "" -#: ../../library/os.rst:4836 +#: ../../library/os.rst:4843 msgid "" ":data:`!P_PIDFD` - wait for the child identified by the file descriptor *id* " "(a process file descriptor created with :func:`pidfd_open`)." msgstr "" -#: ../../library/os.rst:4841 +#: ../../library/os.rst:4848 msgid ":data:`!P_PIDFD` is only available on Linux >= 5.4." msgstr "" -#: ../../library/os.rst:4844 +#: ../../library/os.rst:4851 msgid "The :data:`!P_PIDFD` constant." msgstr "" -#: ../../library/os.rst:4850 +#: ../../library/os.rst:4857 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, :func:`wait4`, and :" "func:`waitid` causes child processes to be reported if they have been " "continued from a job control stop since they were last reported." msgstr "" -#: ../../library/os.rst:4859 +#: ../../library/os.rst:4866 msgid "" "This *options* flag for :func:`waitid` causes child processes that have " "terminated to be reported." msgstr "" -#: ../../library/os.rst:4862 +#: ../../library/os.rst:4869 msgid "" "The other ``wait*`` functions always report children that have terminated, " "so this option is not available for them." msgstr "" -#: ../../library/os.rst:4872 +#: ../../library/os.rst:4879 msgid "" "This *options* flag for :func:`waitid` causes child processes that have been " "stopped by the delivery of a signal to be reported." msgstr "" -#: ../../library/os.rst:4875 ../../library/os.rst:4907 +#: ../../library/os.rst:4882 ../../library/os.rst:4914 msgid "This option is not available for the other ``wait*`` functions." msgstr "" -#: ../../library/os.rst:4884 +#: ../../library/os.rst:4891 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, and :func:`wait4` " "causes child processes to also be reported if they have been stopped but " "their current state has not been reported since they were stopped." msgstr "" -#: ../../library/os.rst:4888 +#: ../../library/os.rst:4895 msgid "This option is not available for :func:`waitid`." msgstr "" -#: ../../library/os.rst:4895 +#: ../../library/os.rst:4902 msgid "" "This *options* flag causes :func:`waitpid`, :func:`wait3`, :func:`wait4`, " "and :func:`waitid` to return right away if no child process status is " "available immediately." msgstr "" -#: ../../library/os.rst:4904 +#: ../../library/os.rst:4911 msgid "" "This *options* flag causes :func:`waitid` to leave the child in a waitable " "state, so that a later :func:`!wait*` call can be used to retrieve the child " "status information again." msgstr "" -#: ../../library/os.rst:4919 +#: ../../library/os.rst:4926 msgid "" "These are the possible values for :attr:`!si_code` in the result returned " "by :func:`waitid`." msgstr "" -#: ../../library/os.rst:4926 +#: ../../library/os.rst:4933 msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values." msgstr "" -#: ../../library/os.rst:4932 +#: ../../library/os.rst:4939 msgid "Convert a wait status to an exit code." msgstr "" -#: ../../library/os.rst:4934 +#: ../../library/os.rst:4941 msgid "On Unix:" msgstr "" -#: ../../library/os.rst:4936 +#: ../../library/os.rst:4943 msgid "" "If the process exited normally (if ``WIFEXITED(status)`` is true), return " "the process exit status (return ``WEXITSTATUS(status)``): result greater " "than or equal to 0." msgstr "" -#: ../../library/os.rst:4939 +#: ../../library/os.rst:4946 msgid "" "If the process was terminated by a signal (if ``WIFSIGNALED(status)`` is " "true), return ``-signum`` where *signum* is the number of the signal that " @@ -5505,15 +5516,15 @@ msgid "" "than 0." msgstr "" -#: ../../library/os.rst:4943 +#: ../../library/os.rst:4950 msgid "Otherwise, raise a :exc:`ValueError`." msgstr "" -#: ../../library/os.rst:4945 +#: ../../library/os.rst:4952 msgid "On Windows, return *status* shifted right by 8 bits." msgstr "" -#: ../../library/os.rst:4947 +#: ../../library/os.rst:4954 msgid "" "On Unix, if the process is being traced or if :func:`waitpid` was called " "with :data:`WUNTRACED` option, the caller must first check if " @@ -5521,221 +5532,221 @@ msgid "" "``WIFSTOPPED(status)`` is true." msgstr "" -#: ../../library/os.rst:4954 +#: ../../library/os.rst:4961 msgid "" ":func:`WIFEXITED`, :func:`WEXITSTATUS`, :func:`WIFSIGNALED`, :func:" "`WTERMSIG`, :func:`WIFSTOPPED`, :func:`WSTOPSIG` functions." msgstr "" -#: ../../library/os.rst:4962 +#: ../../library/os.rst:4969 msgid "" "The following functions take a process status code as returned by :func:" "`system`, :func:`wait`, or :func:`waitpid` as a parameter. They may be used " "to determine the disposition of a process." msgstr "" -#: ../../library/os.rst:4968 +#: ../../library/os.rst:4975 msgid "" "Return ``True`` if a core dump was generated for the process, otherwise " "return ``False``." msgstr "" -#: ../../library/os.rst:4971 ../../library/os.rst:5037 +#: ../../library/os.rst:4978 ../../library/os.rst:5044 msgid "This function should be employed only if :func:`WIFSIGNALED` is true." msgstr "" -#: ../../library/os.rst:4978 +#: ../../library/os.rst:4985 msgid "" "Return ``True`` if a stopped child has been resumed by delivery of :const:" "`~signal.SIGCONT` (if the process has been continued from a job control " "stop), otherwise return ``False``." msgstr "" -#: ../../library/os.rst:4982 +#: ../../library/os.rst:4989 msgid "See :data:`WCONTINUED` option." msgstr "參閱 :data:`WCONTINUED` 選項。" -#: ../../library/os.rst:4989 +#: ../../library/os.rst:4996 msgid "" "Return ``True`` if the process was stopped by delivery of a signal, " "otherwise return ``False``." msgstr "" -#: ../../library/os.rst:4992 +#: ../../library/os.rst:4999 msgid "" ":func:`WIFSTOPPED` only returns ``True`` if the :func:`waitpid` call was " "done using :data:`WUNTRACED` option or when the process is being traced " "(see :manpage:`ptrace(2)`)." msgstr "" -#: ../../library/os.rst:5000 +#: ../../library/os.rst:5007 msgid "" "Return ``True`` if the process was terminated by a signal, otherwise return " "``False``." msgstr "" -#: ../../library/os.rst:5008 +#: ../../library/os.rst:5015 msgid "" "Return ``True`` if the process exited terminated normally, that is, by " "calling ``exit()`` or ``_exit()``, or by returning from ``main()``; " "otherwise return ``False``." msgstr "" -#: ../../library/os.rst:5017 +#: ../../library/os.rst:5024 msgid "Return the process exit status." msgstr "" -#: ../../library/os.rst:5019 +#: ../../library/os.rst:5026 msgid "This function should be employed only if :func:`WIFEXITED` is true." msgstr "" -#: ../../library/os.rst:5026 +#: ../../library/os.rst:5033 msgid "Return the signal which caused the process to stop." msgstr "" -#: ../../library/os.rst:5028 +#: ../../library/os.rst:5035 msgid "This function should be employed only if :func:`WIFSTOPPED` is true." msgstr "" -#: ../../library/os.rst:5035 +#: ../../library/os.rst:5042 msgid "Return the number of the signal that caused the process to terminate." msgstr "" -#: ../../library/os.rst:5043 +#: ../../library/os.rst:5050 msgid "Interface to the scheduler" msgstr "" -#: ../../library/os.rst:5045 +#: ../../library/os.rst:5052 msgid "" "These functions control how a process is allocated CPU time by the operating " "system. They are only available on some Unix platforms. For more detailed " "information, consult your Unix manpages." msgstr "" -#: ../../library/os.rst:5051 +#: ../../library/os.rst:5058 msgid "" "The following scheduling policies are exposed if they are supported by the " "operating system." msgstr "" -#: ../../library/os.rst:5056 +#: ../../library/os.rst:5063 msgid "The default scheduling policy." msgstr "" -#: ../../library/os.rst:5060 +#: ../../library/os.rst:5067 msgid "" "Scheduling policy for CPU-intensive processes that tries to preserve " "interactivity on the rest of the computer." msgstr "" -#: ../../library/os.rst:5065 +#: ../../library/os.rst:5072 msgid "Scheduling policy for extremely low priority background tasks." msgstr "" -#: ../../library/os.rst:5069 +#: ../../library/os.rst:5076 msgid "Scheduling policy for sporadic server programs." msgstr "" -#: ../../library/os.rst:5073 +#: ../../library/os.rst:5080 msgid "A First In First Out scheduling policy." msgstr "" -#: ../../library/os.rst:5077 +#: ../../library/os.rst:5084 msgid "A round-robin scheduling policy." msgstr "" -#: ../../library/os.rst:5081 +#: ../../library/os.rst:5088 msgid "" "This flag can be OR'ed with any other scheduling policy. When a process with " "this flag set forks, its child's scheduling policy and priority are reset to " "the default." msgstr "" -#: ../../library/os.rst:5088 +#: ../../library/os.rst:5095 msgid "" "This class represents tunable scheduling parameters used in :func:" "`sched_setparam`, :func:`sched_setscheduler`, and :func:`sched_getparam`. It " "is immutable." msgstr "" -#: ../../library/os.rst:5092 +#: ../../library/os.rst:5099 msgid "At the moment, there is only one possible parameter:" msgstr "" -#: ../../library/os.rst:5096 +#: ../../library/os.rst:5103 msgid "The scheduling priority for a scheduling policy." msgstr "" -#: ../../library/os.rst:5101 +#: ../../library/os.rst:5108 msgid "" "Get the minimum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../library/os.rst:5107 +#: ../../library/os.rst:5114 msgid "" "Get the maximum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../library/os.rst:5113 +#: ../../library/os.rst:5120 msgid "" "Set the scheduling policy for the process with PID *pid*. A *pid* of 0 means " "the calling process. *policy* is one of the scheduling policy constants " "above. *param* is a :class:`sched_param` instance." msgstr "" -#: ../../library/os.rst:5120 +#: ../../library/os.rst:5127 msgid "" "Return the scheduling policy for the process with PID *pid*. A *pid* of 0 " "means the calling process. The result is one of the scheduling policy " "constants above." msgstr "" -#: ../../library/os.rst:5127 +#: ../../library/os.rst:5134 msgid "" "Set the scheduling parameters for the process with PID *pid*. A *pid* of 0 " "means the calling process. *param* is a :class:`sched_param` instance." msgstr "" -#: ../../library/os.rst:5133 +#: ../../library/os.rst:5140 msgid "" "Return the scheduling parameters as a :class:`sched_param` instance for the " "process with PID *pid*. A *pid* of 0 means the calling process." msgstr "" -#: ../../library/os.rst:5139 +#: ../../library/os.rst:5146 msgid "" "Return the round-robin quantum in seconds for the process with PID *pid*. A " "*pid* of 0 means the calling process." msgstr "" -#: ../../library/os.rst:5145 +#: ../../library/os.rst:5152 msgid "Voluntarily relinquish the CPU." msgstr "" -#: ../../library/os.rst:5150 +#: ../../library/os.rst:5157 msgid "" "Restrict the process with PID *pid* (or the current process if zero) to a " "set of CPUs. *mask* is an iterable of integers representing the set of CPUs " "to which the process should be restricted." msgstr "" -#: ../../library/os.rst:5157 +#: ../../library/os.rst:5164 msgid "Return the set of CPUs the process with PID *pid* is restricted to." msgstr "" -#: ../../library/os.rst:5159 +#: ../../library/os.rst:5166 msgid "" "If *pid* is zero, return the set of CPUs the calling thread of the current " "process is restricted to." msgstr "" -#: ../../library/os.rst:5166 +#: ../../library/os.rst:5173 msgid "Miscellaneous System Information" msgstr "" -#: ../../library/os.rst:5171 +#: ../../library/os.rst:5178 msgid "" "Return string-valued system configuration values. *name* specifies the " "configuration value to retrieve; it may be a string which is the name of a " @@ -5746,13 +5757,13 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:5179 +#: ../../library/os.rst:5186 msgid "" "If the configuration value specified by *name* isn't defined, ``None`` is " "returned." msgstr "" -#: ../../library/os.rst:5182 +#: ../../library/os.rst:5189 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -5760,34 +5771,34 @@ msgid "" "`errno.EINVAL` for the error number." msgstr "" -#: ../../library/os.rst:5192 +#: ../../library/os.rst:5199 msgid "" "Dictionary mapping names accepted by :func:`confstr` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: ../../library/os.rst:5201 +#: ../../library/os.rst:5208 msgid "" "Return the number of logical CPUs in the system. Returns ``None`` if " "undetermined." msgstr "" -#: ../../library/os.rst:5204 +#: ../../library/os.rst:5211 msgid "" "This number is not equivalent to the number of logical CPUs the current " "process can use. ``len(os.sched_getaffinity(0))`` gets the number of logical " "CPUs the calling thread of the current process is restricted to" msgstr "" -#: ../../library/os.rst:5213 +#: ../../library/os.rst:5220 msgid "" "Return the number of processes in the system run queue averaged over the " "last 1, 5, and 15 minutes or raises :exc:`OSError` if the load average was " "unobtainable." msgstr "" -#: ../../library/os.rst:5222 +#: ../../library/os.rst:5229 msgid "" "Return integer-valued system configuration values. If the configuration " "value specified by *name* isn't defined, ``-1`` is returned. The comments " @@ -5796,44 +5807,44 @@ msgid "" "``sysconf_names``." msgstr "" -#: ../../library/os.rst:5232 +#: ../../library/os.rst:5239 msgid "" "Dictionary mapping names accepted by :func:`sysconf` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: ../../library/os.rst:5238 +#: ../../library/os.rst:5245 msgid "Add ``'SC_MINSIGSTKSZ'`` name." msgstr "" -#: ../../library/os.rst:5241 +#: ../../library/os.rst:5248 msgid "" "The following data values are used to support path manipulation operations. " "These are defined for all platforms." msgstr "" -#: ../../library/os.rst:5244 +#: ../../library/os.rst:5251 msgid "" "Higher-level operations on pathnames are defined in the :mod:`os.path` " "module." msgstr "" -#: ../../library/os.rst:5250 +#: ../../library/os.rst:5257 msgid "" "The constant string used by the operating system to refer to the current " "directory. This is ``'.'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: ../../library/os.rst:5258 +#: ../../library/os.rst:5265 msgid "" "The constant string used by the operating system to refer to the parent " "directory. This is ``'..'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: ../../library/os.rst:5267 +#: ../../library/os.rst:5274 msgid "" "The character used by the operating system to separate pathname components. " "This is ``'/'`` for POSIX and ``'\\\\'`` for Windows. Note that knowing " @@ -5842,7 +5853,7 @@ msgid "" "useful. Also available via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:5277 +#: ../../library/os.rst:5284 msgid "" "An alternative character used by the operating system to separate pathname " "components, or ``None`` if only one separator character exists. This is set " @@ -5850,27 +5861,27 @@ msgid "" "via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:5286 +#: ../../library/os.rst:5293 msgid "" "The character which separates the base filename from the extension; for " "example, the ``'.'`` in :file:`os.py`. Also available via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:5294 +#: ../../library/os.rst:5301 msgid "" "The character conventionally used by the operating system to separate search " "path components (as in :envvar:`PATH`), such as ``':'`` for POSIX or ``';'`` " "for Windows. Also available via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:5301 +#: ../../library/os.rst:5308 msgid "" "The default search path used by :func:`exec\\*p\\* ` and :func:" "`spawn\\*p\\* ` if the environment doesn't have a ``'PATH'`` key. " "Also available via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:5308 +#: ../../library/os.rst:5315 msgid "" "The string used to separate (or, rather, terminate) lines on the current " "platform. This may be a single character, such as ``'\\n'`` for POSIX, or " @@ -5879,36 +5890,36 @@ msgid "" "default); use a single ``'\\n'`` instead, on all platforms." msgstr "" -#: ../../library/os.rst:5317 +#: ../../library/os.rst:5324 msgid "" "The file path of the null device. For example: ``'/dev/null'`` for POSIX, " "``'nul'`` for Windows. Also available via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:5328 +#: ../../library/os.rst:5335 msgid "" "Flags for use with the :func:`~sys.setdlopenflags` and :func:`~sys." "getdlopenflags` functions. See the Unix manual page :manpage:`dlopen(3)` " "for what the different flags mean." msgstr "" -#: ../../library/os.rst:5336 +#: ../../library/os.rst:5343 msgid "Random numbers" msgstr "" -#: ../../library/os.rst:5341 +#: ../../library/os.rst:5348 msgid "" "Get up to *size* random bytes. The function can return less bytes than " "requested." msgstr "" -#: ../../library/os.rst:5344 +#: ../../library/os.rst:5351 msgid "" "These bytes can be used to seed user-space random number generators or for " "cryptographic purposes." msgstr "" -#: ../../library/os.rst:5347 +#: ../../library/os.rst:5354 msgid "" "``getrandom()`` relies on entropy gathered from device drivers and other " "sources of environmental noise. Unnecessarily reading large quantities of " @@ -5916,36 +5927,36 @@ msgid "" "``/dev/urandom`` devices." msgstr "" -#: ../../library/os.rst:5352 +#: ../../library/os.rst:5359 msgid "" "The flags argument is a bit mask that can contain zero or more of the " "following values ORed together: :py:const:`os.GRND_RANDOM` and :py:data:" "`GRND_NONBLOCK`." msgstr "" -#: ../../library/os.rst:5356 +#: ../../library/os.rst:5363 msgid "" "See also the `Linux getrandom() manual page `_." msgstr "" -#: ../../library/os.rst:5359 +#: ../../library/os.rst:5366 msgid ":ref:`Availability `: Linux >= 3.17." msgstr ":ref:`適用 `:Linux 3.17 以上。" -#: ../../library/os.rst:5365 +#: ../../library/os.rst:5372 msgid "" "Return a bytestring of *size* random bytes suitable for cryptographic use." msgstr "" -#: ../../library/os.rst:5367 +#: ../../library/os.rst:5374 msgid "" "This function returns random bytes from an OS-specific randomness source. " "The returned data should be unpredictable enough for cryptographic " "applications, though its exact quality depends on the OS implementation." msgstr "" -#: ../../library/os.rst:5371 +#: ../../library/os.rst:5378 msgid "" "On Linux, if the ``getrandom()`` syscall is available, it is used in " "blocking mode: block until the system urandom entropy pool is initialized " @@ -5955,63 +5966,63 @@ msgid "" "to poll until the system urandom entropy pool is initialized." msgstr "" -#: ../../library/os.rst:5378 +#: ../../library/os.rst:5385 msgid "" "On a Unix-like system, random bytes are read from the ``/dev/urandom`` " "device. If the ``/dev/urandom`` device is not available or not readable, " "the :exc:`NotImplementedError` exception is raised." msgstr "" -#: ../../library/os.rst:5382 +#: ../../library/os.rst:5389 msgid "On Windows, it will use ``BCryptGenRandom()``." msgstr "" -#: ../../library/os.rst:5385 +#: ../../library/os.rst:5392 msgid "" "The :mod:`secrets` module provides higher level functions. For an easy-to-" "use interface to the random number generator provided by your platform, " "please see :class:`random.SystemRandom`." msgstr "" -#: ../../library/os.rst:5389 +#: ../../library/os.rst:5396 msgid "" "On Linux 3.17 and newer, the ``getrandom()`` syscall is now used when " "available. On OpenBSD 5.6 and newer, the C ``getentropy()`` function is now " "used. These functions avoid the usage of an internal file descriptor." msgstr "" -#: ../../library/os.rst:5395 +#: ../../library/os.rst:5402 msgid "" "On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool is " "not initialized yet), fall back on reading ``/dev/urandom``." msgstr "" -#: ../../library/os.rst:5399 +#: ../../library/os.rst:5406 msgid "" "On Linux, ``getrandom()`` is now used in blocking mode to increase the " "security." msgstr "" -#: ../../library/os.rst:5403 +#: ../../library/os.rst:5410 msgid "" "On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()`` " "which is deprecated." msgstr "" -#: ../../library/os.rst:5409 +#: ../../library/os.rst:5416 msgid "" "By default, when reading from ``/dev/random``, :func:`getrandom` blocks if " "no random bytes are available, and when reading from ``/dev/urandom``, it " "blocks if the entropy pool has not yet been initialized." msgstr "" -#: ../../library/os.rst:5413 +#: ../../library/os.rst:5420 msgid "" "If the :py:data:`GRND_NONBLOCK` flag is set, then :func:`getrandom` does not " "block in these cases, but instead immediately raises :exc:`BlockingIOError`." msgstr "" -#: ../../library/os.rst:5420 +#: ../../library/os.rst:5427 msgid "" "If this bit is set, then random bytes are drawn from the ``/dev/" "random`` pool instead of the ``/dev/urandom`` pool." @@ -6027,7 +6038,7 @@ msgstr "" #: ../../library/os.rst:372 ../../library/os.rst:438 ../../library/os.rst:447 #: ../../library/os.rst:456 ../../library/os.rst:470 ../../library/os.rst:666 -#: ../../library/os.rst:4228 ../../library/os.rst:4255 +#: ../../library/os.rst:4235 ../../library/os.rst:4262 msgid "process" msgstr "process" @@ -6067,11 +6078,11 @@ msgstr "gethostname()(於 socket 模組)" msgid "gethostbyaddr() (in module socket)" msgstr "gethostbyaddr()(於 socket 模組)" -#: ../../library/os.rst:796 ../../library/os.rst:2577 +#: ../../library/os.rst:796 ../../library/os.rst:2584 msgid "deleting" msgstr "deleting(刪除)" -#: ../../library/os.rst:1338 ../../library/os.rst:2947 +#: ../../library/os.rst:1338 ../../library/os.rst:2954 msgid "module" msgstr "module(模組)" @@ -6079,9 +6090,9 @@ msgstr "module(模組)" msgid "pty" msgstr "pty" -#: ../../library/os.rst:1979 ../../library/os.rst:2376 -#: ../../library/os.rst:2577 ../../library/os.rst:3481 -#: ../../library/os.rst:3580 +#: ../../library/os.rst:1979 ../../library/os.rst:2383 +#: ../../library/os.rst:2584 ../../library/os.rst:3488 +#: ../../library/os.rst:3587 msgid "directory" msgstr "directory(目錄)" @@ -6089,72 +6100,72 @@ msgstr "directory(目錄)" msgid "changing" msgstr "changing(改變)" -#: ../../library/os.rst:2376 +#: ../../library/os.rst:2383 msgid "creating" msgstr "creating(建立)" -#: ../../library/os.rst:2376 +#: ../../library/os.rst:2383 msgid "UNC paths" msgstr "UNC paths(UNC 路徑)" -#: ../../library/os.rst:2376 +#: ../../library/os.rst:2383 msgid "and os.makedirs()" msgstr "以及 os.makedirs()" -#: ../../library/os.rst:2947 +#: ../../library/os.rst:2954 msgid "stat" msgstr "stat" -#: ../../library/os.rst:3481 ../../library/os.rst:3580 +#: ../../library/os.rst:3488 ../../library/os.rst:3587 msgid "walking" msgstr "" -#: ../../library/os.rst:3481 ../../library/os.rst:3580 +#: ../../library/os.rst:3488 ../../library/os.rst:3587 msgid "traversal" msgstr "traversal(遍歷)" -#: ../../library/os.rst:4228 ../../library/os.rst:4255 +#: ../../library/os.rst:4235 ../../library/os.rst:4262 msgid "killing" msgstr "" -#: ../../library/os.rst:4228 ../../library/os.rst:4255 +#: ../../library/os.rst:4235 ../../library/os.rst:4262 msgid "signalling" msgstr "signalling(信號)" -#: ../../library/os.rst:5247 ../../library/os.rst:5283 +#: ../../library/os.rst:5254 ../../library/os.rst:5290 msgid ". (dot)" msgstr ". (點)" -#: ../../library/os.rst:5247 ../../library/os.rst:5255 -#: ../../library/os.rst:5263 ../../library/os.rst:5274 -#: ../../library/os.rst:5283 +#: ../../library/os.rst:5254 ../../library/os.rst:5262 +#: ../../library/os.rst:5270 ../../library/os.rst:5281 +#: ../../library/os.rst:5290 msgid "in pathnames" msgstr "於 pathnames(路徑名稱)中" -#: ../../library/os.rst:5255 +#: ../../library/os.rst:5262 msgid ".." msgstr ".." -#: ../../library/os.rst:5263 ../../library/os.rst:5274 +#: ../../library/os.rst:5270 ../../library/os.rst:5281 msgid "/ (slash)" msgstr "/ (斜線)" -#: ../../library/os.rst:5264 +#: ../../library/os.rst:5271 msgid "\\ (backslash)" msgstr "\\ (反斜線)" -#: ../../library/os.rst:5264 +#: ../../library/os.rst:5271 msgid "in pathnames (Windows)" msgstr "in pathnames (Windows)(在路徑名稱中 (Windows))" -#: ../../library/os.rst:5290 +#: ../../library/os.rst:5297 msgid ": (colon)" msgstr ": (冒號)" -#: ../../library/os.rst:5290 +#: ../../library/os.rst:5297 msgid "path separator (POSIX)" msgstr "path separator (POSIX)(路徑分隔器 (POSIX))" -#: ../../library/os.rst:5290 +#: ../../library/os.rst:5297 msgid "; (semicolon)" msgstr "; (分號)" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index dd0af11a992..38adcd35d1c 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-25 00:03+0000\n" +"POT-Creation-Date: 2024-05-10 00:04+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -257,7 +257,7 @@ msgid "" "`_." msgstr "" -#: ../../whatsnew/3.12.rst:176 ../../whatsnew/3.12.rst:1962 +#: ../../whatsnew/3.12.rst:176 ../../whatsnew/3.12.rst:1973 msgid "New Features" msgstr "新增特性" @@ -995,27 +995,36 @@ msgid "" "`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:782 +#: ../../whatsnew/3.12.rst:781 +msgid "" +"As of 3.12.4, :func:`os.mkdir` and :func:`os.makedirs` on Windows now " +"support passing a *mode* value of ``0o700`` to apply access control to the " +"new directory. This implicitly affects :func:`tempfile.mkdtemp` and is a " +"mitigation for :cve:`2024-4030`. Other values for *mode* continue to be " +"ignored. (Contributed by Steve Dower in :gh:`118486`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:789 msgid "os.path" msgstr "os.path" -#: ../../whatsnew/3.12.rst:784 +#: ../../whatsnew/3.12.rst:791 msgid "" "Add :func:`os.path.isjunction` to check if a given path is a junction. " "(Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:787 +#: ../../whatsnew/3.12.rst:794 msgid "" "Add :func:`os.path.splitroot` to split a path into a triad ``(drive, root, " "tail)``. (Contributed by Barney Gale in :gh:`101000`.)" msgstr "" -#: ../../whatsnew/3.12.rst:791 +#: ../../whatsnew/3.12.rst:798 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.12.rst:793 +#: ../../whatsnew/3.12.rst:800 msgid "" "Add support for subclassing :class:`pathlib.PurePath` and :class:`pathlib." "Path`, plus their Posix- and Windows-specific variants. Subclasses may " @@ -1023,14 +1032,14 @@ msgid "" "information between path instances." msgstr "" -#: ../../whatsnew/3.12.rst:798 +#: ../../whatsnew/3.12.rst:805 msgid "" "Add :meth:`pathlib.Path.walk` for walking the directory trees and generating " "all file or directory names within them, similar to :func:`os.walk`. " "(Contributed by Stanislav Zmiev in :gh:`90385`.)" msgstr "" -#: ../../whatsnew/3.12.rst:802 +#: ../../whatsnew/3.12.rst:809 msgid "" "Add *walk_up* optional parameter to :meth:`pathlib.PurePath.relative_to` to " "allow the insertion of ``..`` entries in the result; this behavior is more " @@ -1038,13 +1047,13 @@ msgid "" "gh:`84538`.)" msgstr "" -#: ../../whatsnew/3.12.rst:807 +#: ../../whatsnew/3.12.rst:814 msgid "" "Add :meth:`pathlib.Path.is_junction` as a proxy to :func:`os.path." "isjunction`. (Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:810 +#: ../../whatsnew/3.12.rst:817 msgid "" "Add *case_sensitive* optional parameter to :meth:`pathlib.Path.glob`, :meth:" "`pathlib.Path.rglob` and :meth:`pathlib.PurePath.match` for matching the " @@ -1052,22 +1061,22 @@ msgid "" "process." msgstr "" -#: ../../whatsnew/3.12.rst:815 +#: ../../whatsnew/3.12.rst:822 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.12.rst:817 +#: ../../whatsnew/3.12.rst:824 msgid "" "Add convenience variables to hold values temporarily for debug session and " "provide quick access to values like the current frame or the return value. " "(Contributed by Tian Gao in :gh:`103693`.)" msgstr "" -#: ../../whatsnew/3.12.rst:823 +#: ../../whatsnew/3.12.rst:830 msgid "random" msgstr "random" -#: ../../whatsnew/3.12.rst:825 +#: ../../whatsnew/3.12.rst:832 msgid "" "Add :func:`random.binomialvariate`. (Contributed by Raymond Hettinger in :gh:" "`81620`.)" @@ -1075,17 +1084,17 @@ msgstr "" "新增 :func:`random.binomialvariate`。(由 Raymond Hettinger 於 :gh:`81620` 中" "貢獻。)" -#: ../../whatsnew/3.12.rst:828 +#: ../../whatsnew/3.12.rst:835 msgid "" "Add a default of ``lambd=1.0`` to :func:`random.expovariate`. (Contributed " "by Raymond Hettinger in :gh:`100234`.)" msgstr "" -#: ../../whatsnew/3.12.rst:832 +#: ../../whatsnew/3.12.rst:839 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.12.rst:834 +#: ../../whatsnew/3.12.rst:841 msgid "" ":func:`shutil.make_archive` now passes the *root_dir* argument to custom " "archivers which support it. In this case it no longer temporarily changes " @@ -1093,7 +1102,7 @@ msgid "" "archiving. (Contributed by Serhiy Storchaka in :gh:`74696`.)" msgstr "" -#: ../../whatsnew/3.12.rst:840 +#: ../../whatsnew/3.12.rst:847 msgid "" ":func:`shutil.rmtree` now accepts a new argument *onexc* which is an error " "handler like *onerror* but which expects an exception instance rather than a " @@ -1101,14 +1110,14 @@ msgid "" "Katriel in :gh:`102828`.)" msgstr "" -#: ../../whatsnew/3.12.rst:845 +#: ../../whatsnew/3.12.rst:852 msgid "" ":func:`shutil.which` now consults the *PATHEXT* environment variable to find " "matches within *PATH* on Windows even when the given *cmd* includes a " "directory component. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:850 +#: ../../whatsnew/3.12.rst:857 msgid "" ":func:`shutil.which` will call ``NeedCurrentDirectoryForExePathW`` when " "querying for executables on Windows to determine if the current working " @@ -1116,18 +1125,18 @@ msgid "" "Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:855 +#: ../../whatsnew/3.12.rst:862 msgid "" ":func:`shutil.which` will return a path matching the *cmd* with a component " "from ``PATHEXT`` prior to a direct match elsewhere in the search path on " "Windows. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:861 ../../whatsnew/3.12.rst:1666 +#: ../../whatsnew/3.12.rst:868 ../../whatsnew/3.12.rst:1677 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.12.rst:863 +#: ../../whatsnew/3.12.rst:870 msgid "" "Add a :ref:`command-line interface `. (Contributed by Erlend E. " "Aasland in :gh:`77617`.)" @@ -1135,7 +1144,7 @@ msgstr "" "新增\\ :ref:`命令列介面 `。(由 Erlend E. Aasland 於 :gh:" "`77617` 中貢獻。)" -#: ../../whatsnew/3.12.rst:866 +#: ../../whatsnew/3.12.rst:873 msgid "" "Add the :attr:`sqlite3.Connection.autocommit` attribute to :class:`sqlite3." "Connection` and the *autocommit* parameter to :func:`sqlite3.connect` to " @@ -1143,43 +1152,43 @@ msgid "" "control-autocommit>`. (Contributed by Erlend E. Aasland in :gh:`83638`.)" msgstr "" -#: ../../whatsnew/3.12.rst:873 +#: ../../whatsnew/3.12.rst:880 msgid "" "Add *entrypoint* keyword-only parameter to :meth:`sqlite3.Connection." "load_extension`, for overriding the SQLite extension entry point. " "(Contributed by Erlend E. Aasland in :gh:`103015`.)" msgstr "" -#: ../../whatsnew/3.12.rst:878 +#: ../../whatsnew/3.12.rst:885 msgid "" "Add :meth:`sqlite3.Connection.getconfig` and :meth:`sqlite3.Connection." "setconfig` to :class:`sqlite3.Connection` to make configuration changes to a " "database connection. (Contributed by Erlend E. Aasland in :gh:`103489`.)" msgstr "" -#: ../../whatsnew/3.12.rst:884 +#: ../../whatsnew/3.12.rst:891 msgid "statistics" msgstr "statistics" -#: ../../whatsnew/3.12.rst:886 +#: ../../whatsnew/3.12.rst:893 msgid "" "Extend :func:`statistics.correlation` to include as a ``ranked`` method for " "computing the Spearman correlation of ranked data. (Contributed by Raymond " "Hettinger in :gh:`95861`.)" msgstr "" -#: ../../whatsnew/3.12.rst:891 +#: ../../whatsnew/3.12.rst:898 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.12.rst:893 +#: ../../whatsnew/3.12.rst:900 msgid "" "Add the :mod:`sys.monitoring` namespace to expose the new :ref:`PEP 669 " "` monitoring API. (Contributed by Mark Shannon in :gh:" "`103082`.)" msgstr "" -#: ../../whatsnew/3.12.rst:897 +#: ../../whatsnew/3.12.rst:904 msgid "" "Add :func:`sys.activate_stack_trampoline` and :func:`sys." "deactivate_stack_trampoline` for activating and deactivating stack profiler " @@ -1189,7 +1198,7 @@ msgid "" "Shannon in :gh:`96123`.)" msgstr "" -#: ../../whatsnew/3.12.rst:906 +#: ../../whatsnew/3.12.rst:913 msgid "" "Add :data:`sys.last_exc` which holds the last unhandled exception that was " "raised (for post-mortem debugging use cases). Deprecate the three fields " @@ -1198,14 +1207,14 @@ msgid "" "Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:912 ../../whatsnew/3.12.rst:1861 +#: ../../whatsnew/3.12.rst:919 ../../whatsnew/3.12.rst:1872 msgid "" ":func:`sys._current_exceptions` now returns a mapping from thread-id to an " "exception instance, rather than to a ``(typ, exc, tb)`` tuple. (Contributed " "by Irit Katriel in :gh:`103176`.)" msgstr "" -#: ../../whatsnew/3.12.rst:916 +#: ../../whatsnew/3.12.rst:923 msgid "" ":func:`sys.setrecursionlimit` and :func:`sys.getrecursionlimit`. The " "recursion limit now applies only to Python code. Builtin functions do not " @@ -1213,27 +1222,35 @@ msgid "" "prevents recursion from causing a virtual machine crash." msgstr "" -#: ../../whatsnew/3.12.rst:922 +#: ../../whatsnew/3.12.rst:929 msgid "tempfile" msgstr "tempfile" -#: ../../whatsnew/3.12.rst:924 +#: ../../whatsnew/3.12.rst:931 msgid "" "The :class:`tempfile.NamedTemporaryFile` function has a new optional " "parameter *delete_on_close* (Contributed by Evgeny Zorin in :gh:`58451`.)" msgstr "" -#: ../../whatsnew/3.12.rst:926 +#: ../../whatsnew/3.12.rst:933 msgid "" ":func:`tempfile.mkdtemp` now always returns an absolute path, even if the " "argument provided to the *dir* parameter is a relative path." msgstr "" -#: ../../whatsnew/3.12.rst:930 +#: ../../whatsnew/3.12.rst:935 +msgid "" +"As of 3.12.4 on Windows, the default mode ``0o700`` used by :func:`tempfile." +"mkdtemp` now limits access to the new directory due to changes to :func:`os." +"mkdir`. This is a mitigation for :cve:`2024-4030`. (Contributed by Steve " +"Dower in :gh:`118486`.)" +msgstr "" + +#: ../../whatsnew/3.12.rst:941 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.12.rst:932 +#: ../../whatsnew/3.12.rst:943 msgid "" "Add :func:`threading.settrace_all_threads` and :func:`threading." "setprofile_all_threads` that allow to set tracing and profiling functions in " @@ -1241,11 +1258,11 @@ msgid "" "Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:938 +#: ../../whatsnew/3.12.rst:949 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.12.rst:940 +#: ../../whatsnew/3.12.rst:951 msgid "" "``tkinter.Canvas.coords()`` now flattens its arguments. It now accepts not " "only coordinates as separate arguments (``x1, y1, x2, y2, ...``) and a " @@ -1255,11 +1272,11 @@ msgid "" "in :gh:`94473`.)" msgstr "" -#: ../../whatsnew/3.12.rst:949 +#: ../../whatsnew/3.12.rst:960 msgid "tokenize" msgstr "tokenize" -#: ../../whatsnew/3.12.rst:951 +#: ../../whatsnew/3.12.rst:962 msgid "" "The :mod:`tokenize` module includes the changes introduced in :pep:`701`. " "(Contributed by Marta Gómez Macías and Pablo Galindo in :gh:`102856`.) See :" @@ -1267,22 +1284,22 @@ msgid "" "to the :mod:`tokenize` module." msgstr "" -#: ../../whatsnew/3.12.rst:957 +#: ../../whatsnew/3.12.rst:968 msgid "types" msgstr "types" -#: ../../whatsnew/3.12.rst:959 +#: ../../whatsnew/3.12.rst:970 msgid "" "Add :func:`types.get_original_bases` to allow for further introspection of :" "ref:`user-defined-generics` when subclassed. (Contributed by James Hilton-" "Balfe and Alex Waygood in :gh:`101827`.)" msgstr "" -#: ../../whatsnew/3.12.rst:966 +#: ../../whatsnew/3.12.rst:977 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.12.rst:968 +#: ../../whatsnew/3.12.rst:979 msgid "" ":func:`isinstance` checks against :func:`runtime-checkable protocols ` now use :func:`inspect.getattr_static` rather than :func:" @@ -1295,7 +1312,7 @@ msgid "" "affected by this change. (Contributed by Alex Waygood in :gh:`102433`.)" msgstr "" -#: ../../whatsnew/3.12.rst:979 +#: ../../whatsnew/3.12.rst:990 msgid "" "The members of a runtime-checkable protocol are now considered \"frozen\" at " "runtime as soon as the class has been created. Monkey-patching attributes " @@ -1303,13 +1320,13 @@ msgid "" "on :func:`isinstance` checks comparing objects to the protocol. For example::" msgstr "" -#: ../../whatsnew/3.12.rst:1001 +#: ../../whatsnew/3.12.rst:1012 msgid "" "This change was made in order to speed up ``isinstance()`` checks against " "runtime-checkable protocols." msgstr "" -#: ../../whatsnew/3.12.rst:1004 +#: ../../whatsnew/3.12.rst:1015 msgid "" "The performance profile of :func:`isinstance` checks against :func:`runtime-" "checkable protocols ` has changed significantly. " @@ -1320,71 +1337,71 @@ msgid "" "`74690` and :gh:`103193`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1012 +#: ../../whatsnew/3.12.rst:1023 msgid "" "All :data:`typing.TypedDict` and :data:`typing.NamedTuple` classes now have " "the ``__orig_bases__`` attribute. (Contributed by Adrian Garcia Badaracco " "in :gh:`103699`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1016 +#: ../../whatsnew/3.12.rst:1027 msgid "" "Add ``frozen_default`` parameter to :func:`typing.dataclass_transform`. " "(Contributed by Erik De Bonte in :gh:`99957`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1020 +#: ../../whatsnew/3.12.rst:1031 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.12.rst:1022 +#: ../../whatsnew/3.12.rst:1033 msgid "" "The Unicode database has been updated to version 15.0.0. (Contributed by " "Benjamin Peterson in :gh:`96734`)." msgstr "" -#: ../../whatsnew/3.12.rst:1026 ../../whatsnew/3.12.rst:1706 +#: ../../whatsnew/3.12.rst:1037 ../../whatsnew/3.12.rst:1717 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.12.rst:1028 +#: ../../whatsnew/3.12.rst:1039 msgid "" "Add a ``--durations`` command line option, showing the N slowest test cases::" msgstr "" -#: ../../whatsnew/3.12.rst:1044 +#: ../../whatsnew/3.12.rst:1055 msgid "(Contributed by Giampaolo Rodola in :gh:`48330`)" msgstr "" -#: ../../whatsnew/3.12.rst:1047 +#: ../../whatsnew/3.12.rst:1058 msgid "uuid" msgstr "uuid" -#: ../../whatsnew/3.12.rst:1049 +#: ../../whatsnew/3.12.rst:1060 msgid "" "Add a :ref:`command-line interface `. (Contributed by Adam Chhina " "in :gh:`88597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1054 +#: ../../whatsnew/3.12.rst:1065 msgid "Optimizations" msgstr "最佳化" -#: ../../whatsnew/3.12.rst:1056 +#: ../../whatsnew/3.12.rst:1067 msgid "" "Remove ``wstr`` and ``wstr_length`` members from Unicode objects. It reduces " "object size by 8 or 16 bytes on 64bit platform. (:pep:`623`) (Contributed by " "Inada Naoki in :gh:`92536`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1060 +#: ../../whatsnew/3.12.rst:1071 msgid "" "Add experimental support for using the BOLT binary optimizer in the build " "process, which improves performance by 1-5%. (Contributed by Kevin " "Modzelewski in :gh:`90536` and tuned by Donghee Na in :gh:`101525`)" msgstr "" -#: ../../whatsnew/3.12.rst:1064 +#: ../../whatsnew/3.12.rst:1075 msgid "" "Speed up the regular expression substitution (functions :func:`re.sub` and :" "func:`re.subn` and corresponding :class:`!re.Pattern` methods) for " @@ -1392,13 +1409,13 @@ msgid "" "by Serhiy Storchaka in :gh:`91524`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1069 +#: ../../whatsnew/3.12.rst:1080 msgid "" "Speed up :class:`asyncio.Task` creation by deferring expensive string " "formatting. (Contributed by Itamar Oren in :gh:`103793`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1072 +#: ../../whatsnew/3.12.rst:1083 msgid "" "The :func:`tokenize.tokenize` and :func:`tokenize.generate_tokens` functions " "are up to 64% faster as a side effect of the changes required to cover :pep:" @@ -1406,18 +1423,18 @@ msgid "" "Pablo Galindo in :gh:`102856`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1077 +#: ../../whatsnew/3.12.rst:1088 msgid "" "Speed up :func:`super` method calls and attribute loads via the new :opcode:" "`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer and Vladimir " "Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1083 +#: ../../whatsnew/3.12.rst:1094 msgid "CPython bytecode changes" msgstr "CPython 位元組碼變更" -#: ../../whatsnew/3.12.rst:1085 +#: ../../whatsnew/3.12.rst:1096 msgid "" "Remove the :opcode:`!LOAD_METHOD` instruction. It has been merged into :" "opcode:`LOAD_ATTR`. :opcode:`LOAD_ATTR` will now behave like the old :opcode:" @@ -1425,62 +1442,62 @@ msgid "" "by Ken Jin in :gh:`93429`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1090 +#: ../../whatsnew/3.12.rst:1101 msgid "" "Remove the :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!" "JUMP_IF_TRUE_OR_POP` instructions. (Contributed by Irit Katriel in :gh:" "`102859`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1093 +#: ../../whatsnew/3.12.rst:1104 msgid "" "Remove the :opcode:`!PRECALL` instruction. (Contributed by Mark Shannon in :" "gh:`92925`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1096 +#: ../../whatsnew/3.12.rst:1107 msgid "" "Add the :opcode:`BINARY_SLICE` and :opcode:`STORE_SLICE` instructions. " "(Contributed by Mark Shannon in :gh:`94163`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1099 +#: ../../whatsnew/3.12.rst:1110 msgid "" "Add the :opcode:`CALL_INTRINSIC_1` instructions. (Contributed by Mark " "Shannon in :gh:`99005`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1102 +#: ../../whatsnew/3.12.rst:1113 msgid "" "Add the :opcode:`CALL_INTRINSIC_2` instruction. (Contributed by Irit Katriel " "in :gh:`101799`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1105 +#: ../../whatsnew/3.12.rst:1116 msgid "" "Add the :opcode:`CLEANUP_THROW` instruction. (Contributed by Brandt Bucher " "in :gh:`90997`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1108 +#: ../../whatsnew/3.12.rst:1119 msgid "" "Add the :opcode:`!END_SEND` instruction. (Contributed by Mark Shannon in :gh:" "`103082`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1111 +#: ../../whatsnew/3.12.rst:1122 msgid "" "Add the :opcode:`LOAD_FAST_AND_CLEAR` instruction as part of the " "implementation of :pep:`709`. (Contributed by Carl Meyer in :gh:`101441`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1114 +#: ../../whatsnew/3.12.rst:1125 msgid "" "Add the :opcode:`LOAD_FAST_CHECK` instruction. (Contributed by Dennis " "Sweeney in :gh:`93143`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1117 +#: ../../whatsnew/3.12.rst:1128 msgid "" "Add the :opcode:`LOAD_FROM_DICT_OR_DEREF`, :opcode:" "`LOAD_FROM_DICT_OR_GLOBALS`, and :opcode:`LOAD_LOCALS` opcodes as part of " @@ -1489,48 +1506,48 @@ msgid "" "`LOAD_FROM_DICT_OR_DEREF`. (Contributed by Jelle Zijlstra in :gh:`103764`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1123 +#: ../../whatsnew/3.12.rst:1134 msgid "" "Add the :opcode:`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer " "and Vladimir Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1126 +#: ../../whatsnew/3.12.rst:1137 msgid "" "Add the :opcode:`RETURN_CONST` instruction. (Contributed by Wenyang Wang in :" "gh:`101632`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1129 +#: ../../whatsnew/3.12.rst:1140 msgid "Demos and Tools" msgstr "" -#: ../../whatsnew/3.12.rst:1131 +#: ../../whatsnew/3.12.rst:1142 msgid "" "Remove the ``Tools/demo/`` directory which contained old demo scripts. A " "copy can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97681`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1136 +#: ../../whatsnew/3.12.rst:1147 msgid "" "Remove outdated example scripts of the ``Tools/scripts/`` directory. A copy " "can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97669`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1143 ../../whatsnew/3.12.rst:2264 +#: ../../whatsnew/3.12.rst:1154 ../../whatsnew/3.12.rst:2275 msgid "Deprecated" msgstr "已棄用" -#: ../../whatsnew/3.12.rst:1145 +#: ../../whatsnew/3.12.rst:1156 msgid "" ":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!" "argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. " "(Contributed by Nikita Sobolev in :gh:`92248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1150 +#: ../../whatsnew/3.12.rst:1161 msgid "" ":mod:`ast`: The following :mod:`ast` features have been deprecated in " "documentation since Python 3.8, now cause a :exc:`DeprecationWarning` to be " @@ -1538,37 +1555,37 @@ msgid "" "Python 3.14:" msgstr "" -#: ../../whatsnew/3.12.rst:1154 ../../whatsnew/3.12.rst:1400 +#: ../../whatsnew/3.12.rst:1165 ../../whatsnew/3.12.rst:1411 msgid ":class:`!ast.Num`" msgstr ":class:`!ast.Num`" -#: ../../whatsnew/3.12.rst:1155 ../../whatsnew/3.12.rst:1401 +#: ../../whatsnew/3.12.rst:1166 ../../whatsnew/3.12.rst:1412 msgid ":class:`!ast.Str`" msgstr ":class:`!ast.Str`" -#: ../../whatsnew/3.12.rst:1156 ../../whatsnew/3.12.rst:1402 +#: ../../whatsnew/3.12.rst:1167 ../../whatsnew/3.12.rst:1413 msgid ":class:`!ast.Bytes`" msgstr ":class:`!ast.Bytes`" -#: ../../whatsnew/3.12.rst:1157 ../../whatsnew/3.12.rst:1403 +#: ../../whatsnew/3.12.rst:1168 ../../whatsnew/3.12.rst:1414 msgid ":class:`!ast.NameConstant`" msgstr ":class:`!ast.NameConstant`" -#: ../../whatsnew/3.12.rst:1158 ../../whatsnew/3.12.rst:1404 +#: ../../whatsnew/3.12.rst:1169 ../../whatsnew/3.12.rst:1415 msgid ":class:`!ast.Ellipsis`" msgstr ":class:`!ast.Ellipsis`" -#: ../../whatsnew/3.12.rst:1160 +#: ../../whatsnew/3.12.rst:1171 msgid "" "Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" "`90953`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1163 ../../whatsnew/3.12.rst:1406 +#: ../../whatsnew/3.12.rst:1174 ../../whatsnew/3.12.rst:1417 msgid ":mod:`asyncio`:" msgstr ":mod:`asyncio`:" -#: ../../whatsnew/3.12.rst:1165 +#: ../../whatsnew/3.12.rst:1176 msgid "" "The child watcher classes :class:`asyncio.MultiLoopChildWatcher`, :class:" "`asyncio.FastChildWatcher`, :class:`asyncio.AbstractChildWatcher` and :class:" @@ -1576,7 +1593,7 @@ msgid "" "3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1171 +#: ../../whatsnew/3.12.rst:1182 msgid "" ":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:" "`asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`asyncio." @@ -1584,7 +1601,7 @@ msgid "" "removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1177 +#: ../../whatsnew/3.12.rst:1188 msgid "" "The :meth:`~asyncio.get_event_loop` method of the default event loop policy " "now emits a :exc:`DeprecationWarning` if there is no current event loop set " @@ -1592,14 +1609,14 @@ msgid "" "Rossum in :gh:`100160`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1182 +#: ../../whatsnew/3.12.rst:1193 msgid "" ":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " "are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar." "FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1186 +#: ../../whatsnew/3.12.rst:1197 msgid "" ":mod:`collections.abc`: Deprecated :class:`collections.abc.ByteString`. " "Prefer :class:`Sequence` or :class:`collections.abc.Buffer`. For use in " @@ -1607,7 +1624,7 @@ msgid "" "abc.Buffer`. (Contributed by Shantanu Jain in :gh:`91896`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1191 +#: ../../whatsnew/3.12.rst:1202 msgid "" ":mod:`datetime`: :class:`datetime.datetime`'s :meth:`~datetime.datetime." "utcnow` and :meth:`~datetime.datetime.utcfromtimestamp` are deprecated and " @@ -1617,7 +1634,7 @@ msgid "" "set to :const:`datetime.UTC`. (Contributed by Paul Ganssle in :gh:`103857`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1199 +#: ../../whatsnew/3.12.rst:1210 msgid "" ":mod:`email`: Deprecate the *isdst* parameter in :func:`email.utils." "localtime`. (Contributed by Alan Williams in :gh:`72346`.)" @@ -1625,41 +1642,41 @@ msgstr "" ":mod:`email`:棄用 :func:`email.utils.localtime` 中的 *isdst* 參數。(由 " "Alan Williams 於 :gh:`72346` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1202 +#: ../../whatsnew/3.12.rst:1213 msgid "" ":mod:`importlib.abc`: Deprecated the following classes, scheduled for " "removal in Python 3.14:" msgstr ":mod:`importlib.abc`:棄用下列類別,預定於 Python 3.14 中移除:" -#: ../../whatsnew/3.12.rst:1205 ../../whatsnew/3.12.rst:1423 +#: ../../whatsnew/3.12.rst:1216 ../../whatsnew/3.12.rst:1434 msgid ":class:`!importlib.abc.ResourceReader`" msgstr ":class:`!importlib.abc.ResourceReader`" -#: ../../whatsnew/3.12.rst:1206 ../../whatsnew/3.12.rst:1424 +#: ../../whatsnew/3.12.rst:1217 ../../whatsnew/3.12.rst:1435 msgid ":class:`!importlib.abc.Traversable`" msgstr ":class:`!importlib.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1207 ../../whatsnew/3.12.rst:1425 +#: ../../whatsnew/3.12.rst:1218 ../../whatsnew/3.12.rst:1436 msgid ":class:`!importlib.abc.TraversableResources`" msgstr ":class:`!importlib.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1209 +#: ../../whatsnew/3.12.rst:1220 msgid "Use :mod:`importlib.resources.abc` classes instead:" msgstr "請改用 :mod:`importlib.resources.abc` 類別:" -#: ../../whatsnew/3.12.rst:1211 +#: ../../whatsnew/3.12.rst:1222 msgid ":class:`importlib.resources.abc.Traversable`" msgstr ":class:`importlib.resources.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1212 +#: ../../whatsnew/3.12.rst:1223 msgid ":class:`importlib.resources.abc.TraversableResources`" msgstr ":class:`importlib.resources.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1214 +#: ../../whatsnew/3.12.rst:1225 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" msgstr "(由 Jason R. Coombs 和 Hugo van Kemenade 於 :gh:`93963` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1216 +#: ../../whatsnew/3.12.rst:1227 msgid "" ":mod:`itertools`: Deprecate the support for copy, deepcopy, and pickle " "operations, which is undocumented, inefficient, historically buggy, and " @@ -1668,7 +1685,7 @@ msgid "" "`101588`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1222 +#: ../../whatsnew/3.12.rst:1233 msgid "" ":mod:`multiprocessing`: In Python 3.14, the default :mod:`multiprocessing` " "start method will change to a safer one on Linux, BSDs, and other non-macOS " @@ -1680,14 +1697,14 @@ msgid "" "methods `." msgstr "" -#: ../../whatsnew/3.12.rst:1232 +#: ../../whatsnew/3.12.rst:1243 msgid "" ":mod:`pkgutil`: :func:`pkgutil.find_loader` and :func:`pkgutil.get_loader` " "are deprecated and will be removed in Python 3.14; use :func:`importlib.util." "find_spec` instead. (Contributed by Nikita Sobolev in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1237 +#: ../../whatsnew/3.12.rst:1248 msgid "" ":mod:`pty`: The module has two undocumented ``master_open()`` and " "``slave_open()`` functions that have been deprecated since Python 2 but only " @@ -1695,11 +1712,11 @@ msgid "" "(Contributed by Soumendra Ganguly and Gregory P. Smith in :gh:`85984`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1242 +#: ../../whatsnew/3.12.rst:1253 msgid ":mod:`os`:" msgstr ":mod:`os`:" -#: ../../whatsnew/3.12.rst:1244 +#: ../../whatsnew/3.12.rst:1255 msgid "" "The ``st_ctime`` fields return by :func:`os.stat` and :func:`os.lstat` on " "Windows are deprecated. In a future release, they will contain the last " @@ -1708,7 +1725,7 @@ msgid "" "``st_birthtime`` field. (Contributed by Steve Dower in :gh:`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1250 +#: ../../whatsnew/3.12.rst:1261 msgid "" "On POSIX platforms, :func:`os.fork` can now raise a :exc:" "`DeprecationWarning` when it can detect being called from a multithreaded " @@ -1721,14 +1738,14 @@ msgid "" "longstanding platform compatibility problem to developers." msgstr "" -#: ../../whatsnew/3.12.rst:1260 +#: ../../whatsnew/3.12.rst:1271 msgid "" "When this warning appears due to usage of :mod:`multiprocessing` or :mod:" "`concurrent.futures` the fix is to use a different :mod:`multiprocessing` " "start method such as ``\"spawn\"`` or ``\"forkserver\"``." msgstr "" -#: ../../whatsnew/3.12.rst:1264 +#: ../../whatsnew/3.12.rst:1275 msgid "" ":mod:`shutil`: The *onerror* argument of :func:`shutil.rmtree` is " "deprecated; use *onexc* instead. (Contributed by Irit Katriel in :gh:" @@ -1737,18 +1754,18 @@ msgstr "" ":mod:`shutil`::func:`shutil.rmtree` 的 *onerror* 引數已被棄用,請改用 " "*onexc*。(由 Irit Katriel 於 :gh:`102828` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1267 +#: ../../whatsnew/3.12.rst:1278 msgid ":mod:`sqlite3`:" msgstr ":mod:`sqlite3`:" -#: ../../whatsnew/3.12.rst:1269 +#: ../../whatsnew/3.12.rst:1280 msgid "" ":ref:`default adapters and converters ` are now " "deprecated. Instead, use the :ref:`sqlite3-adapter-converter-recipes` and " "tailor them to your needs. (Contributed by Erlend E. Aasland in :gh:`90016`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1275 +#: ../../whatsnew/3.12.rst:1286 msgid "" "In :meth:`~sqlite3.Cursor.execute`, :exc:`DeprecationWarning` is now emitted " "when :ref:`named placeholders ` are used together with " @@ -1758,39 +1775,39 @@ msgid "" "Erlend E. Aasland in :gh:`101698`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1282 +#: ../../whatsnew/3.12.rst:1293 msgid "" ":mod:`sys`: The :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." "last_traceback` fields are deprecated. Use :data:`sys.last_exc` instead. " "(Contributed by Irit Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1286 +#: ../../whatsnew/3.12.rst:1297 msgid "" ":mod:`tarfile`: Extracting tar archives without specifying *filter* is " "deprecated until Python 3.14, when ``'data'`` filter will become the " "default. See :ref:`tarfile-extraction-filter` for details." msgstr "" -#: ../../whatsnew/3.12.rst:1290 +#: ../../whatsnew/3.12.rst:1301 msgid ":mod:`typing`:" msgstr ":mod:`typing`:" -#: ../../whatsnew/3.12.rst:1292 +#: ../../whatsnew/3.12.rst:1303 msgid "" ":class:`typing.Hashable` and :class:`typing.Sized`, aliases for :class:" "`collections.abc.Hashable` and :class:`collections.abc.Sized` respectively, " "are deprecated. (:gh:`94309`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1296 +#: ../../whatsnew/3.12.rst:1307 msgid "" ":class:`typing.ByteString`, deprecated since Python 3.9, now causes a :exc:" "`DeprecationWarning` to be emitted when it is used. (Contributed by Alex " "Waygood in :gh:`91896`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1300 +#: ../../whatsnew/3.12.rst:1311 msgid "" ":mod:`xml.etree.ElementTree`: The module now emits :exc:`DeprecationWarning` " "when testing the truth value of an :class:`xml.etree.ElementTree.Element`. " @@ -1798,7 +1815,7 @@ msgid "" "implementation emitted nothing. (Contributed by Jacob Walls in :gh:`83122`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1306 +#: ../../whatsnew/3.12.rst:1317 msgid "" "The 3-arg signatures (type, value, traceback) of :meth:`coroutine throw() " "`, :meth:`generator throw() ` and :meth:" @@ -1807,21 +1824,21 @@ msgid "" "instead. (Contributed by Ofey Chan in :gh:`89874`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1312 +#: ../../whatsnew/3.12.rst:1323 msgid "" ":exc:`DeprecationWarning` is now raised when ``__package__`` on a module " "differs from ``__spec__.parent`` (previously it was :exc:`ImportWarning`). " "(Contributed by Brett Cannon in :gh:`65961`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1317 +#: ../../whatsnew/3.12.rst:1328 msgid "" "Setting ``__package__`` or ``__cached__`` on a module is deprecated, and " "will cease to be set or taken into consideration by the import system in " "Python 3.14. (Contributed by Brett Cannon in :gh:`65961`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1321 +#: ../../whatsnew/3.12.rst:1332 msgid "" "The bitwise inversion operator (``~``) on bool is deprecated. It will throw " "an error in Python 3.14. Use ``not`` for logical negation of bools instead. " @@ -1830,7 +1847,7 @@ msgid "" "Tim Hoffmann in :gh:`103487`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1327 +#: ../../whatsnew/3.12.rst:1338 msgid "" "Accessing :attr:`~codeobject.co_lnotab` on code objects was deprecated in " "Python 3.10 via :pep:`626`, but it only got a proper :exc:" @@ -1838,328 +1855,328 @@ msgid "" "(Contributed by Nikita Sobolev in :gh:`101866`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1334 +#: ../../whatsnew/3.12.rst:1345 msgid "Pending Removal in Python 3.13" msgstr "Python 3.13 中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1336 +#: ../../whatsnew/3.12.rst:1347 msgid "" "The following modules and APIs have been deprecated in earlier Python " "releases, and will be removed in Python 3.13." msgstr "" -#: ../../whatsnew/3.12.rst:1339 +#: ../../whatsnew/3.12.rst:1350 msgid "Modules (see :pep:`594`):" msgstr "" -#: ../../whatsnew/3.12.rst:1341 +#: ../../whatsnew/3.12.rst:1352 msgid ":mod:`aifc`" msgstr ":mod:`aifc`" -#: ../../whatsnew/3.12.rst:1342 +#: ../../whatsnew/3.12.rst:1353 msgid ":mod:`audioop`" msgstr ":mod:`audioop`" -#: ../../whatsnew/3.12.rst:1343 +#: ../../whatsnew/3.12.rst:1354 msgid ":mod:`cgi`" msgstr ":mod:`cgi`" -#: ../../whatsnew/3.12.rst:1344 +#: ../../whatsnew/3.12.rst:1355 msgid ":mod:`cgitb`" msgstr ":mod:`cgitb`" -#: ../../whatsnew/3.12.rst:1345 +#: ../../whatsnew/3.12.rst:1356 msgid ":mod:`chunk`" msgstr ":mod:`chunk`" -#: ../../whatsnew/3.12.rst:1346 +#: ../../whatsnew/3.12.rst:1357 msgid ":mod:`crypt`" msgstr ":mod:`crypt`" -#: ../../whatsnew/3.12.rst:1347 +#: ../../whatsnew/3.12.rst:1358 msgid ":mod:`imghdr`" msgstr ":mod:`imghdr`" -#: ../../whatsnew/3.12.rst:1348 +#: ../../whatsnew/3.12.rst:1359 msgid ":mod:`mailcap`" msgstr ":mod:`mailcap`" -#: ../../whatsnew/3.12.rst:1349 +#: ../../whatsnew/3.12.rst:1360 msgid ":mod:`msilib`" msgstr ":mod:`msilib`" -#: ../../whatsnew/3.12.rst:1350 +#: ../../whatsnew/3.12.rst:1361 msgid ":mod:`nis`" msgstr ":mod:`nis`" -#: ../../whatsnew/3.12.rst:1351 +#: ../../whatsnew/3.12.rst:1362 msgid ":mod:`nntplib`" msgstr ":mod:`nntplib`" -#: ../../whatsnew/3.12.rst:1352 +#: ../../whatsnew/3.12.rst:1363 msgid ":mod:`ossaudiodev`" msgstr ":mod:`ossaudiodev`" -#: ../../whatsnew/3.12.rst:1353 +#: ../../whatsnew/3.12.rst:1364 msgid ":mod:`pipes`" msgstr ":mod:`pipes`" -#: ../../whatsnew/3.12.rst:1354 +#: ../../whatsnew/3.12.rst:1365 msgid ":mod:`sndhdr`" msgstr ":mod:`sndhdr`" -#: ../../whatsnew/3.12.rst:1355 +#: ../../whatsnew/3.12.rst:1366 msgid ":mod:`spwd`" msgstr ":mod:`spwd`" -#: ../../whatsnew/3.12.rst:1356 +#: ../../whatsnew/3.12.rst:1367 msgid ":mod:`sunau`" msgstr ":mod:`sunau`" -#: ../../whatsnew/3.12.rst:1357 +#: ../../whatsnew/3.12.rst:1368 msgid ":mod:`telnetlib`" msgstr ":mod:`telnetlib`" -#: ../../whatsnew/3.12.rst:1358 +#: ../../whatsnew/3.12.rst:1369 msgid ":mod:`uu`" msgstr ":mod:`uu`" -#: ../../whatsnew/3.12.rst:1359 +#: ../../whatsnew/3.12.rst:1370 msgid ":mod:`xdrlib`" msgstr ":mod:`xdrlib`" -#: ../../whatsnew/3.12.rst:1361 +#: ../../whatsnew/3.12.rst:1372 msgid "Other modules:" msgstr "其他模組:" -#: ../../whatsnew/3.12.rst:1363 +#: ../../whatsnew/3.12.rst:1374 msgid ":mod:`!lib2to3`, and the :program:`2to3` program (:gh:`84540`)" msgstr ":mod:`!lib2to3` 以及 :program:`2to3` 程式 (:gh:`84540`)" -#: ../../whatsnew/3.12.rst:1365 ../../whatsnew/3.12.rst:1455 +#: ../../whatsnew/3.12.rst:1376 ../../whatsnew/3.12.rst:1466 msgid "APIs:" msgstr "API:" -#: ../../whatsnew/3.12.rst:1367 +#: ../../whatsnew/3.12.rst:1378 msgid ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" msgstr ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" -#: ../../whatsnew/3.12.rst:1368 +#: ../../whatsnew/3.12.rst:1379 msgid "``locale.resetlocale()`` (:gh:`90817`)" msgstr "``locale.resetlocale()`` (:gh:`90817`)" -#: ../../whatsnew/3.12.rst:1369 +#: ../../whatsnew/3.12.rst:1380 msgid ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" msgstr ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1370 +#: ../../whatsnew/3.12.rst:1381 msgid ":func:`!unittest.findTestCases` (:gh:`50096`)" msgstr ":func:`!unittest.findTestCases` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1371 +#: ../../whatsnew/3.12.rst:1382 msgid ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" msgstr ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1372 +#: ../../whatsnew/3.12.rst:1383 msgid ":func:`!unittest.makeSuite` (:gh:`50096`)" msgstr ":func:`!unittest.makeSuite` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1373 +#: ../../whatsnew/3.12.rst:1384 msgid ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" msgstr ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" -#: ../../whatsnew/3.12.rst:1374 +#: ../../whatsnew/3.12.rst:1385 msgid ":class:`!webbrowser.MacOSX` (:gh:`86421`)" msgstr ":class:`!webbrowser.MacOSX` (:gh:`86421`)" -#: ../../whatsnew/3.12.rst:1375 +#: ../../whatsnew/3.12.rst:1386 msgid ":class:`classmethod` descriptor chaining (:gh:`89519`)" msgstr ":class:`classmethod` 描述器鏈結 (:gh:`89519`)" -#: ../../whatsnew/3.12.rst:1376 +#: ../../whatsnew/3.12.rst:1387 msgid ":mod:`importlib.resources` deprecated methods:" msgstr ":mod:`importlib.resources` 中被棄用的方法:" -#: ../../whatsnew/3.12.rst:1378 +#: ../../whatsnew/3.12.rst:1389 msgid "``contents()``" msgstr "``contents()``" -#: ../../whatsnew/3.12.rst:1379 +#: ../../whatsnew/3.12.rst:1390 msgid "``is_resource()``" msgstr "``is_resource()``" -#: ../../whatsnew/3.12.rst:1380 +#: ../../whatsnew/3.12.rst:1391 msgid "``open_binary()``" msgstr "``open_binary()``" -#: ../../whatsnew/3.12.rst:1381 +#: ../../whatsnew/3.12.rst:1392 msgid "``open_text()``" msgstr "``open_text()``" -#: ../../whatsnew/3.12.rst:1382 +#: ../../whatsnew/3.12.rst:1393 msgid "``path()``" msgstr "``path()``" -#: ../../whatsnew/3.12.rst:1383 +#: ../../whatsnew/3.12.rst:1394 msgid "``read_binary()``" msgstr "``read_binary()``" -#: ../../whatsnew/3.12.rst:1384 +#: ../../whatsnew/3.12.rst:1395 msgid "``read_text()``" msgstr "``read_text()``" -#: ../../whatsnew/3.12.rst:1386 +#: ../../whatsnew/3.12.rst:1397 msgid "" "Use :func:`importlib.resources.files()` instead. Refer to `importlib-" "resources: Migrating from Legacy `_ (:gh:`106531`)" msgstr "" -#: ../../whatsnew/3.12.rst:1390 ../../whatsnew/3.12.rst:2351 +#: ../../whatsnew/3.12.rst:1401 ../../whatsnew/3.12.rst:2362 msgid "Pending Removal in Python 3.14" msgstr "Python 3.14 中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1392 +#: ../../whatsnew/3.12.rst:1403 msgid "" "The following APIs have been deprecated and will be removed in Python 3.14." msgstr "以下 API 已被棄用並將在 Python 3.14 中移除。" -#: ../../whatsnew/3.12.rst:1395 +#: ../../whatsnew/3.12.rst:1406 msgid "" ":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!" "argparse.BooleanOptionalAction`" msgstr "" -#: ../../whatsnew/3.12.rst:1398 +#: ../../whatsnew/3.12.rst:1409 msgid ":mod:`ast`:" msgstr ":mod:`ast`:" -#: ../../whatsnew/3.12.rst:1408 +#: ../../whatsnew/3.12.rst:1419 msgid ":class:`!asyncio.MultiLoopChildWatcher`" msgstr ":class:`!asyncio.MultiLoopChildWatcher`" -#: ../../whatsnew/3.12.rst:1409 +#: ../../whatsnew/3.12.rst:1420 msgid ":class:`!asyncio.FastChildWatcher`" msgstr ":class:`!asyncio.FastChildWatcher`" -#: ../../whatsnew/3.12.rst:1410 +#: ../../whatsnew/3.12.rst:1421 msgid ":class:`!asyncio.AbstractChildWatcher`" msgstr ":class:`!asyncio.AbstractChildWatcher`" -#: ../../whatsnew/3.12.rst:1411 +#: ../../whatsnew/3.12.rst:1422 msgid ":class:`!asyncio.SafeChildWatcher`" msgstr ":class:`!asyncio.SafeChildWatcher`" -#: ../../whatsnew/3.12.rst:1412 +#: ../../whatsnew/3.12.rst:1423 msgid ":func:`!asyncio.set_child_watcher`" msgstr ":func:`!asyncio.set_child_watcher`" -#: ../../whatsnew/3.12.rst:1413 +#: ../../whatsnew/3.12.rst:1424 msgid ":func:`!asyncio.get_child_watcher`," msgstr ":func:`!asyncio.get_child_watcher`、" -#: ../../whatsnew/3.12.rst:1414 +#: ../../whatsnew/3.12.rst:1425 msgid ":meth:`!asyncio.AbstractEventLoopPolicy.set_child_watcher`" msgstr ":meth:`!asyncio.AbstractEventLoopPolicy.set_child_watcher`" -#: ../../whatsnew/3.12.rst:1415 +#: ../../whatsnew/3.12.rst:1426 msgid ":meth:`!asyncio.AbstractEventLoopPolicy.get_child_watcher`" msgstr ":meth:`!asyncio.AbstractEventLoopPolicy.get_child_watcher`" -#: ../../whatsnew/3.12.rst:1417 +#: ../../whatsnew/3.12.rst:1428 msgid ":mod:`collections.abc`: :class:`!collections.abc.ByteString`." msgstr ":mod:`collections.abc`: :class:`!collections.abc.ByteString`。" -#: ../../whatsnew/3.12.rst:1419 +#: ../../whatsnew/3.12.rst:1430 msgid ":mod:`email`: the *isdst* parameter in :func:`email.utils.localtime`." msgstr "" -#: ../../whatsnew/3.12.rst:1421 +#: ../../whatsnew/3.12.rst:1432 msgid ":mod:`importlib.abc`:" msgstr ":mod:`importlib.abc`:" -#: ../../whatsnew/3.12.rst:1427 +#: ../../whatsnew/3.12.rst:1438 msgid ":mod:`itertools`: Support for copy, deepcopy, and pickle operations." msgstr "" -#: ../../whatsnew/3.12.rst:1429 +#: ../../whatsnew/3.12.rst:1440 msgid ":mod:`pkgutil`:" msgstr ":mod:`pkgutil`:" -#: ../../whatsnew/3.12.rst:1431 +#: ../../whatsnew/3.12.rst:1442 msgid ":func:`!pkgutil.find_loader`" msgstr ":func:`!pkgutil.find_loader`" -#: ../../whatsnew/3.12.rst:1432 +#: ../../whatsnew/3.12.rst:1443 msgid ":func:`!pkgutil.get_loader`." msgstr ":func:`!pkgutil.get_loader`。" -#: ../../whatsnew/3.12.rst:1434 +#: ../../whatsnew/3.12.rst:1445 msgid ":mod:`pty`:" msgstr ":mod:`pty`:" -#: ../../whatsnew/3.12.rst:1436 +#: ../../whatsnew/3.12.rst:1447 msgid ":func:`!pty.master_open`" msgstr ":func:`!pty.master_open`" -#: ../../whatsnew/3.12.rst:1437 +#: ../../whatsnew/3.12.rst:1448 msgid ":func:`!pty.slave_open`" msgstr ":func:`!pty.slave_open`" -#: ../../whatsnew/3.12.rst:1439 +#: ../../whatsnew/3.12.rst:1450 msgid ":mod:`shutil`: The *onerror* argument of :func:`shutil.rmtree`" msgstr ":mod:`shutil`::func:`shutil.rmtree` 的 *onerror* 引數" -#: ../../whatsnew/3.12.rst:1441 +#: ../../whatsnew/3.12.rst:1452 msgid ":mod:`typing`: :class:`!typing.ByteString`" msgstr ":mod:`typing`::class:`!typing.ByteString`" -#: ../../whatsnew/3.12.rst:1443 +#: ../../whatsnew/3.12.rst:1454 msgid "" ":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`xml." "etree.ElementTree.Element`." msgstr "" -#: ../../whatsnew/3.12.rst:1445 +#: ../../whatsnew/3.12.rst:1456 msgid "The ``__package__`` and ``__cached__`` attributes on module objects." msgstr "" -#: ../../whatsnew/3.12.rst:1447 +#: ../../whatsnew/3.12.rst:1458 msgid "The :attr:`~codeobject.co_lnotab` attribute of code objects." msgstr "" -#: ../../whatsnew/3.12.rst:1450 ../../whatsnew/3.12.rst:2388 +#: ../../whatsnew/3.12.rst:1461 ../../whatsnew/3.12.rst:2399 msgid "Pending Removal in Python 3.15" msgstr "Python 3.15 中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1452 +#: ../../whatsnew/3.12.rst:1463 msgid "" "The following APIs have been deprecated and will be removed in Python 3.15." msgstr "" -#: ../../whatsnew/3.12.rst:1457 +#: ../../whatsnew/3.12.rst:1468 msgid ":func:`locale.getdefaultlocale` (:gh:`90817`)" msgstr ":func:`locale.getdefaultlocale` (:gh:`90817`)" -#: ../../whatsnew/3.12.rst:1461 ../../whatsnew/3.12.rst:2406 +#: ../../whatsnew/3.12.rst:1472 ../../whatsnew/3.12.rst:2417 msgid "Pending Removal in Future Versions" msgstr "未來版本中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1463 +#: ../../whatsnew/3.12.rst:1474 msgid "" "The following APIs were deprecated in earlier Python versions and will be " "removed, although there is currently no date scheduled for their removal." msgstr "" -#: ../../whatsnew/3.12.rst:1466 +#: ../../whatsnew/3.12.rst:1477 msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)" msgstr "" -#: ../../whatsnew/3.12.rst:1468 +#: ../../whatsnew/3.12.rst:1479 msgid ":class:`typing.Text` (:gh:`92332`)" msgstr ":class:`typing.Text` (:gh:`92332`)" -#: ../../whatsnew/3.12.rst:1470 +#: ../../whatsnew/3.12.rst:1481 msgid "" "Currently Python accepts numeric literals immediately followed by keywords, " "for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " @@ -2171,54 +2188,54 @@ msgid "" "syntax error. (:gh:`87999`)" msgstr "" -#: ../../whatsnew/3.12.rst:1481 ../../whatsnew/3.12.rst:2438 +#: ../../whatsnew/3.12.rst:1492 ../../whatsnew/3.12.rst:2449 msgid "Removed" msgstr "已移除" -#: ../../whatsnew/3.12.rst:1484 +#: ../../whatsnew/3.12.rst:1495 msgid "asynchat and asyncore" msgstr "asynchat 和 asyncore" -#: ../../whatsnew/3.12.rst:1486 +#: ../../whatsnew/3.12.rst:1497 msgid "" "These two modules have been removed according to the schedule in :pep:`594`, " "having been deprecated in Python 3.6. Use :mod:`asyncio` instead. " "(Contributed by Nikita Sobolev in :gh:`96580`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1493 +#: ../../whatsnew/3.12.rst:1504 msgid "configparser" msgstr "configparser" -#: ../../whatsnew/3.12.rst:1495 +#: ../../whatsnew/3.12.rst:1506 msgid "" "Several names deprecated in the :mod:`configparser` way back in 3.2 have " "been removed per :gh:`89336`:" msgstr "" -#: ../../whatsnew/3.12.rst:1498 +#: ../../whatsnew/3.12.rst:1509 msgid "" ":class:`configparser.ParsingError` no longer has a ``filename`` attribute or " "argument. Use the ``source`` attribute and argument instead." msgstr "" -#: ../../whatsnew/3.12.rst:1500 +#: ../../whatsnew/3.12.rst:1511 msgid "" ":mod:`configparser` no longer has a ``SafeConfigParser`` class. Use the " "shorter :class:`~configparser.ConfigParser` name instead." msgstr "" -#: ../../whatsnew/3.12.rst:1502 +#: ../../whatsnew/3.12.rst:1513 msgid "" ":class:`configparser.ConfigParser` no longer has a ``readfp`` method. Use :" "meth:`~configparser.ConfigParser.read_file` instead." msgstr "" -#: ../../whatsnew/3.12.rst:1506 +#: ../../whatsnew/3.12.rst:1517 msgid "distutils" msgstr "distutils" -#: ../../whatsnew/3.12.rst:1508 +#: ../../whatsnew/3.12.rst:1519 msgid "" "Remove the :py:mod:`!distutils` package. It was deprecated in Python 3.10 " "by :pep:`632` \"Deprecate distutils module\". For projects still using " @@ -2227,17 +2244,17 @@ msgid "" "Victor Stinner in :gh:`92584`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1515 +#: ../../whatsnew/3.12.rst:1526 msgid "ensurepip" msgstr "ensurepip" -#: ../../whatsnew/3.12.rst:1517 +#: ../../whatsnew/3.12.rst:1528 msgid "" "Remove the bundled setuptools wheel from :mod:`ensurepip`, and stop " "installing setuptools in environments created by :mod:`venv`." msgstr "" -#: ../../whatsnew/3.12.rst:1520 +#: ../../whatsnew/3.12.rst:1531 msgid "" "``pip (>= 22.1)`` does not require setuptools to be installed in the " "environment. ``setuptools``-based (and ``distutils``-based) packages can " @@ -2245,7 +2262,7 @@ msgid "" "the build environment it uses for building a package." msgstr "" -#: ../../whatsnew/3.12.rst:1526 +#: ../../whatsnew/3.12.rst:1537 msgid "" "``easy_install``, ``pkg_resources``, ``setuptools`` and ``distutils`` are no " "longer provided by default in environments created with ``venv`` or " @@ -2255,25 +2272,25 @@ msgid "" "(typically, using pip)." msgstr "" -#: ../../whatsnew/3.12.rst:1533 +#: ../../whatsnew/3.12.rst:1544 msgid "(Contributed by Pradyun Gedam in :gh:`95299`.)" msgstr "(由 Pradyun Gedam 於 :gh:`95299` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1536 +#: ../../whatsnew/3.12.rst:1547 msgid "enum" msgstr "enum" -#: ../../whatsnew/3.12.rst:1538 +#: ../../whatsnew/3.12.rst:1549 msgid "" "Remove :mod:`enum`'s ``EnumMeta.__getattr__``, which is no longer needed for " "enum attribute access. (Contributed by Ethan Furman in :gh:`95083`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1543 +#: ../../whatsnew/3.12.rst:1554 msgid "ftplib" msgstr "ftplib" -#: ../../whatsnew/3.12.rst:1545 +#: ../../whatsnew/3.12.rst:1556 msgid "" "Remove :mod:`ftplib`'s ``FTP_TLS.ssl_version`` class attribute: use the " "*context* parameter instead. (Contributed by Victor Stinner in :gh:`94172`.)" @@ -2281,11 +2298,11 @@ msgstr "" "移除 :mod:`ftplib` 的 ``FTP_TLS.ssl_version`` 類別屬性:請改用 *context* 參" "數。(由 Victor Stinner 於 :gh:`94172` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1550 +#: ../../whatsnew/3.12.rst:1561 msgid "gzip" msgstr "gzip" -#: ../../whatsnew/3.12.rst:1552 +#: ../../whatsnew/3.12.rst:1563 msgid "" "Remove the ``filename`` attribute of :mod:`gzip`'s :class:`gzip.GzipFile`, " "deprecated since Python 2.6, use the :attr:`~gzip.GzipFile.name` attribute " @@ -2294,11 +2311,11 @@ msgid "" "`94196`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1559 +#: ../../whatsnew/3.12.rst:1570 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.12.rst:1561 +#: ../../whatsnew/3.12.rst:1572 msgid "" "Remove the pure Python implementation of :mod:`hashlib`'s :func:`hashlib." "pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and newer requires " @@ -2307,180 +2324,180 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1568 ../../whatsnew/3.12.rst:1595 +#: ../../whatsnew/3.12.rst:1579 ../../whatsnew/3.12.rst:1606 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.12.rst:1570 +#: ../../whatsnew/3.12.rst:1581 msgid "" "Many previously deprecated cleanups in :mod:`importlib` have now been " "completed:" msgstr "" -#: ../../whatsnew/3.12.rst:1573 +#: ../../whatsnew/3.12.rst:1584 msgid "" "References to, and support for :meth:`!module_repr()` has been removed. " "(Contributed by Barry Warsaw in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1576 +#: ../../whatsnew/3.12.rst:1587 msgid "" "``importlib.util.set_package``, ``importlib.util.set_loader`` and " "``importlib.util.module_for_loader`` have all been removed. (Contributed by " "Brett Cannon and Nikita Sobolev in :gh:`65961` and :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1580 +#: ../../whatsnew/3.12.rst:1591 msgid "" "Support for ``find_loader()`` and ``find_module()`` APIs have been removed. " "(Contributed by Barry Warsaw in :gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1583 +#: ../../whatsnew/3.12.rst:1594 msgid "" "``importlib.abc.Finder``, ``pkgutil.ImpImporter``, and ``pkgutil.ImpLoader`` " "have been removed. (Contributed by Barry Warsaw in :gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1587 ../../whatsnew/3.12.rst:1595 +#: ../../whatsnew/3.12.rst:1598 ../../whatsnew/3.12.rst:1606 msgid "imp" msgstr "imp" -#: ../../whatsnew/3.12.rst:1589 +#: ../../whatsnew/3.12.rst:1600 msgid "" "The :mod:`!imp` module has been removed. (Contributed by Barry Warsaw in :" "gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1592 +#: ../../whatsnew/3.12.rst:1603 msgid "To migrate, consult the following correspondence table:" msgstr "" -#: ../../whatsnew/3.12.rst:1597 +#: ../../whatsnew/3.12.rst:1608 msgid "``imp.NullImporter``" msgstr "``imp.NullImporter``" -#: ../../whatsnew/3.12.rst:1597 +#: ../../whatsnew/3.12.rst:1608 msgid "Insert ``None`` into ``sys.path_importer_cache``" msgstr "將 ``None`` 插入 ``sys.path_importer_cache``" -#: ../../whatsnew/3.12.rst:1598 +#: ../../whatsnew/3.12.rst:1609 msgid "``imp.cache_from_source()``" msgstr "``imp.cache_from_source()``" -#: ../../whatsnew/3.12.rst:1598 +#: ../../whatsnew/3.12.rst:1609 msgid ":func:`importlib.util.cache_from_source`" msgstr ":func:`importlib.util.cache_from_source`" -#: ../../whatsnew/3.12.rst:1599 +#: ../../whatsnew/3.12.rst:1610 msgid "``imp.find_module()``" msgstr "``imp.find_module()``" -#: ../../whatsnew/3.12.rst:1599 +#: ../../whatsnew/3.12.rst:1610 msgid ":func:`importlib.util.find_spec`" msgstr ":func:`importlib.util.find_spec`" -#: ../../whatsnew/3.12.rst:1600 +#: ../../whatsnew/3.12.rst:1611 msgid "``imp.get_magic()``" msgstr "``imp.get_magic()``" -#: ../../whatsnew/3.12.rst:1600 +#: ../../whatsnew/3.12.rst:1611 msgid ":attr:`importlib.util.MAGIC_NUMBER`" msgstr ":attr:`importlib.util.MAGIC_NUMBER`" -#: ../../whatsnew/3.12.rst:1601 +#: ../../whatsnew/3.12.rst:1612 msgid "``imp.get_suffixes()``" msgstr "``imp.get_suffixes()``" -#: ../../whatsnew/3.12.rst:1601 +#: ../../whatsnew/3.12.rst:1612 msgid "" ":attr:`importlib.machinery.SOURCE_SUFFIXES`, :attr:`importlib.machinery." "EXTENSION_SUFFIXES`, and :attr:`importlib.machinery.BYTECODE_SUFFIXES`" msgstr "" -#: ../../whatsnew/3.12.rst:1602 +#: ../../whatsnew/3.12.rst:1613 msgid "``imp.get_tag()``" msgstr "``imp.get_tag()``" -#: ../../whatsnew/3.12.rst:1602 +#: ../../whatsnew/3.12.rst:1613 msgid ":attr:`sys.implementation.cache_tag `" msgstr ":attr:`sys.implementation.cache_tag `" -#: ../../whatsnew/3.12.rst:1603 +#: ../../whatsnew/3.12.rst:1614 msgid "``imp.load_module()``" msgstr "``imp.load_module()``" -#: ../../whatsnew/3.12.rst:1603 +#: ../../whatsnew/3.12.rst:1614 msgid ":func:`importlib.import_module`" msgstr ":func:`importlib.import_module`" -#: ../../whatsnew/3.12.rst:1604 +#: ../../whatsnew/3.12.rst:1615 msgid "``imp.new_module(name)``" msgstr "``imp.new_module(name)``" -#: ../../whatsnew/3.12.rst:1604 +#: ../../whatsnew/3.12.rst:1615 msgid "``types.ModuleType(name)``" msgstr "``types.ModuleType(name)``" -#: ../../whatsnew/3.12.rst:1605 +#: ../../whatsnew/3.12.rst:1616 msgid "``imp.reload()``" msgstr "``imp.reload()``" -#: ../../whatsnew/3.12.rst:1605 +#: ../../whatsnew/3.12.rst:1616 msgid ":func:`importlib.reload`" msgstr ":func:`importlib.reload`" -#: ../../whatsnew/3.12.rst:1606 +#: ../../whatsnew/3.12.rst:1617 msgid "``imp.source_from_cache()``" msgstr "``imp.source_from_cache()``" -#: ../../whatsnew/3.12.rst:1606 +#: ../../whatsnew/3.12.rst:1617 msgid ":func:`importlib.util.source_from_cache`" msgstr ":func:`importlib.util.source_from_cache`" -#: ../../whatsnew/3.12.rst:1607 +#: ../../whatsnew/3.12.rst:1618 msgid "``imp.load_source()``" msgstr "``imp.load_source()``" -#: ../../whatsnew/3.12.rst:1607 +#: ../../whatsnew/3.12.rst:1618 msgid "*See below*" msgstr "" -#: ../../whatsnew/3.12.rst:1610 +#: ../../whatsnew/3.12.rst:1621 msgid "Replace ``imp.load_source()`` with::" msgstr "" -#: ../../whatsnew/3.12.rst:1625 +#: ../../whatsnew/3.12.rst:1636 msgid "Remove :mod:`!imp` functions and attributes with no replacements:" msgstr "" -#: ../../whatsnew/3.12.rst:1627 +#: ../../whatsnew/3.12.rst:1638 msgid "Undocumented functions:" msgstr "未以文件記錄的函式:" -#: ../../whatsnew/3.12.rst:1629 +#: ../../whatsnew/3.12.rst:1640 msgid "``imp.init_builtin()``" msgstr "``imp.init_builtin()``" -#: ../../whatsnew/3.12.rst:1630 +#: ../../whatsnew/3.12.rst:1641 msgid "``imp.load_compiled()``" msgstr "``imp.load_compiled()``" -#: ../../whatsnew/3.12.rst:1631 +#: ../../whatsnew/3.12.rst:1642 msgid "``imp.load_dynamic()``" msgstr "``imp.load_dynamic()``" -#: ../../whatsnew/3.12.rst:1632 +#: ../../whatsnew/3.12.rst:1643 msgid "``imp.load_package()``" msgstr "``imp.load_package()``" -#: ../../whatsnew/3.12.rst:1634 +#: ../../whatsnew/3.12.rst:1645 msgid "" "``imp.lock_held()``, ``imp.acquire_lock()``, ``imp.release_lock()``: the " "locking scheme has changed in Python 3.3 to per-module locks." msgstr "" -#: ../../whatsnew/3.12.rst:1636 +#: ../../whatsnew/3.12.rst:1647 msgid "" "``imp.find_module()`` constants: ``SEARCH_ERROR``, ``PY_SOURCE``, " "``PY_COMPILED``, ``C_EXTENSION``, ``PY_RESOURCE``, ``PKG_DIRECTORY``, " @@ -2490,11 +2507,11 @@ msgstr "" "``PY_COMPILED``、``C_EXTENSION``、``PY_RESOURCE``、``PKG_DIRECTORY``、" "``C_BUILTIN``、``PY_FROZEN``、``PY_CODERESOURCE``、``IMP_HOOK``。" -#: ../../whatsnew/3.12.rst:1641 +#: ../../whatsnew/3.12.rst:1652 msgid "io" msgstr "io" -#: ../../whatsnew/3.12.rst:1643 +#: ../../whatsnew/3.12.rst:1654 msgid "" "Remove :mod:`io`'s ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated " "in Python 3.10: just use :func:`open` instead. The :func:`open` (:func:`io." @@ -2503,22 +2520,22 @@ msgid "" "`94169`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1650 +#: ../../whatsnew/3.12.rst:1661 msgid "locale" msgstr "locale" -#: ../../whatsnew/3.12.rst:1652 +#: ../../whatsnew/3.12.rst:1663 msgid "" "Remove :mod:`locale`'s :func:`!locale.format` function, deprecated in Python " "3.7: use :func:`locale.format_string` instead. (Contributed by Victor " "Stinner in :gh:`94226`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1657 +#: ../../whatsnew/3.12.rst:1668 msgid "smtpd" msgstr "smtpd" -#: ../../whatsnew/3.12.rst:1659 +#: ../../whatsnew/3.12.rst:1670 msgid "" "The ``smtpd`` module has been removed according to the schedule in :pep:" "`594`, having been deprecated in Python 3.4.7 and 3.5.4. Use the :pypi:" @@ -2526,27 +2543,27 @@ msgid "" "(Contributed by Oleg Iarygin in :gh:`93243`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1668 +#: ../../whatsnew/3.12.rst:1679 msgid "" "The following undocumented :mod:`sqlite3` features, deprecated in Python " "3.10, are now removed:" msgstr "" -#: ../../whatsnew/3.12.rst:1671 +#: ../../whatsnew/3.12.rst:1682 msgid "``sqlite3.enable_shared_cache()``" msgstr "``sqlite3.enable_shared_cache()``" -#: ../../whatsnew/3.12.rst:1672 +#: ../../whatsnew/3.12.rst:1683 msgid "``sqlite3.OptimizedUnicode``" msgstr "``sqlite3.OptimizedUnicode``" -#: ../../whatsnew/3.12.rst:1674 +#: ../../whatsnew/3.12.rst:1685 msgid "" "If a shared cache must be used, open the database in URI mode using the " "``cache=shared`` query parameter." msgstr "" -#: ../../whatsnew/3.12.rst:1677 +#: ../../whatsnew/3.12.rst:1688 msgid "" "The ``sqlite3.OptimizedUnicode`` text factory has been an alias for :class:" "`str` since Python 3.3. Code that previously set the text factory to " @@ -2554,22 +2571,22 @@ msgid "" "default value which is also ``str``." msgstr "" -#: ../../whatsnew/3.12.rst:1682 +#: ../../whatsnew/3.12.rst:1693 msgid "(Contributed by Erlend E. Aasland in :gh:`92548`.)" msgstr "(由 Erlend E. Aasland 於 :gh:`92548` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1685 +#: ../../whatsnew/3.12.rst:1696 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.12.rst:1687 +#: ../../whatsnew/3.12.rst:1698 msgid "" "Remove :mod:`ssl`'s :func:`!ssl.RAND_pseudo_bytes` function, deprecated in " "Python 3.6: use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead. " "(Contributed by Victor Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1691 +#: ../../whatsnew/3.12.rst:1702 msgid "" "Remove the :func:`!ssl.match_hostname` function. It was deprecated in Python " "3.7. OpenSSL performs hostname matching since Python 3.7, Python no longer " @@ -2577,7 +2594,7 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1697 +#: ../../whatsnew/3.12.rst:1708 msgid "" "Remove the :func:`!ssl.wrap_socket` function, deprecated in Python 3.7: " "instead, create a :class:`ssl.SSLContext` object and call its :class:`ssl." @@ -2588,189 +2605,189 @@ msgid "" "`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1708 +#: ../../whatsnew/3.12.rst:1719 msgid "Remove many long-deprecated :mod:`unittest` features:" msgstr "移除許多 :mod:`unittest` 中被棄用已久的功能:" -#: ../../whatsnew/3.12.rst:1712 +#: ../../whatsnew/3.12.rst:1723 msgid "A number of :class:`~unittest.TestCase` method aliases:" msgstr "" -#: ../../whatsnew/3.12.rst:1715 +#: ../../whatsnew/3.12.rst:1726 msgid "Deprecated alias" msgstr "已棄用的別名" -#: ../../whatsnew/3.12.rst:1715 +#: ../../whatsnew/3.12.rst:1726 msgid "Method Name" msgstr "方法名稱" -#: ../../whatsnew/3.12.rst:1715 +#: ../../whatsnew/3.12.rst:1726 msgid "Deprecated in" msgstr "" -#: ../../whatsnew/3.12.rst:1717 +#: ../../whatsnew/3.12.rst:1728 msgid "``failUnless``" msgstr "``failUnless``" -#: ../../whatsnew/3.12.rst:1717 ../../whatsnew/3.12.rst:1724 +#: ../../whatsnew/3.12.rst:1728 ../../whatsnew/3.12.rst:1735 msgid ":meth:`.assertTrue`" msgstr ":meth:`.assertTrue`" -#: ../../whatsnew/3.12.rst:1717 ../../whatsnew/3.12.rst:1718 -#: ../../whatsnew/3.12.rst:1719 ../../whatsnew/3.12.rst:1720 -#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1722 -#: ../../whatsnew/3.12.rst:1723 +#: ../../whatsnew/3.12.rst:1728 ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1730 ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1732 ../../whatsnew/3.12.rst:1733 +#: ../../whatsnew/3.12.rst:1734 msgid "3.1" msgstr "3.1" -#: ../../whatsnew/3.12.rst:1718 +#: ../../whatsnew/3.12.rst:1729 msgid "``failIf``" msgstr "``failIf``" -#: ../../whatsnew/3.12.rst:1718 +#: ../../whatsnew/3.12.rst:1729 msgid ":meth:`.assertFalse`" msgstr ":meth:`.assertFalse`" -#: ../../whatsnew/3.12.rst:1719 +#: ../../whatsnew/3.12.rst:1730 msgid "``failUnlessEqual``" msgstr "``failUnlessEqual``" -#: ../../whatsnew/3.12.rst:1719 ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1730 ../../whatsnew/3.12.rst:1736 msgid ":meth:`.assertEqual`" msgstr ":meth:`.assertEqual`" -#: ../../whatsnew/3.12.rst:1720 +#: ../../whatsnew/3.12.rst:1731 msgid "``failIfEqual``" msgstr "``failIfEqual``" -#: ../../whatsnew/3.12.rst:1720 ../../whatsnew/3.12.rst:1726 +#: ../../whatsnew/3.12.rst:1731 ../../whatsnew/3.12.rst:1737 msgid ":meth:`.assertNotEqual`" msgstr ":meth:`.assertNotEqual`" -#: ../../whatsnew/3.12.rst:1721 +#: ../../whatsnew/3.12.rst:1732 msgid "``failUnlessAlmostEqual``" msgstr "``failUnlessAlmostEqual``" -#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1732 ../../whatsnew/3.12.rst:1738 msgid ":meth:`.assertAlmostEqual`" msgstr ":meth:`.assertAlmostEqual`" -#: ../../whatsnew/3.12.rst:1722 +#: ../../whatsnew/3.12.rst:1733 msgid "``failIfAlmostEqual``" msgstr "``failIfAlmostEqual``" -#: ../../whatsnew/3.12.rst:1722 ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1733 ../../whatsnew/3.12.rst:1739 msgid ":meth:`.assertNotAlmostEqual`" msgstr ":meth:`.assertNotAlmostEqual`" -#: ../../whatsnew/3.12.rst:1723 +#: ../../whatsnew/3.12.rst:1734 msgid "``failUnlessRaises``" msgstr "``failUnlessRaises``" -#: ../../whatsnew/3.12.rst:1723 +#: ../../whatsnew/3.12.rst:1734 msgid ":meth:`.assertRaises`" msgstr ":meth:`.assertRaises`" -#: ../../whatsnew/3.12.rst:1724 +#: ../../whatsnew/3.12.rst:1735 msgid "``assert_``" msgstr "``assert_``" -#: ../../whatsnew/3.12.rst:1724 ../../whatsnew/3.12.rst:1725 -#: ../../whatsnew/3.12.rst:1726 ../../whatsnew/3.12.rst:1727 -#: ../../whatsnew/3.12.rst:1728 ../../whatsnew/3.12.rst:1729 -#: ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1735 ../../whatsnew/3.12.rst:1736 +#: ../../whatsnew/3.12.rst:1737 ../../whatsnew/3.12.rst:1738 +#: ../../whatsnew/3.12.rst:1739 ../../whatsnew/3.12.rst:1740 +#: ../../whatsnew/3.12.rst:1741 msgid "3.2" msgstr "3.2" -#: ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1736 msgid "``assertEquals``" msgstr "``assertEquals``" -#: ../../whatsnew/3.12.rst:1726 +#: ../../whatsnew/3.12.rst:1737 msgid "``assertNotEquals``" msgstr "``assertNotEquals``" -#: ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1738 msgid "``assertAlmostEquals``" msgstr "``assertAlmostEquals``" -#: ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1739 msgid "``assertNotAlmostEquals``" msgstr "``assertNotAlmostEquals``" -#: ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1740 msgid "``assertRegexpMatches``" msgstr "``assertRegexpMatches``" -#: ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1740 msgid ":meth:`.assertRegex`" msgstr ":meth:`.assertRegex`" -#: ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1741 msgid "``assertRaisesRegexp``" msgstr "``assertRaisesRegexp``" -#: ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1741 msgid ":meth:`.assertRaisesRegex`" msgstr ":meth:`.assertRaisesRegex`" -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1742 msgid "``assertNotRegexpMatches``" msgstr "``assertNotRegexpMatches``" -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1742 msgid ":meth:`.assertNotRegex`" msgstr ":meth:`.assertNotRegex`" -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1742 msgid "3.5" msgstr "3.5" -#: ../../whatsnew/3.12.rst:1734 +#: ../../whatsnew/3.12.rst:1745 msgid "" "You can use https://github.com/isidentical/teyit to automatically modernise " "your unit tests." msgstr "" -#: ../../whatsnew/3.12.rst:1737 +#: ../../whatsnew/3.12.rst:1748 msgid "" "Undocumented and broken :class:`~unittest.TestCase` method " "``assertDictContainsSubset`` (deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1740 +#: ../../whatsnew/3.12.rst:1751 msgid "" "Undocumented :meth:`TestLoader.loadTestsFromModule ` parameter *use_load_tests* (deprecated and ignored " "since Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1744 +#: ../../whatsnew/3.12.rst:1755 msgid "" "An alias of the :class:`~unittest.TextTestResult` class: ``_TextTestResult`` " "(deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1747 +#: ../../whatsnew/3.12.rst:1758 msgid "(Contributed by Serhiy Storchaka in :gh:`89325`.)" msgstr "(由 Serhiy Storchaka 於 :gh:`89325` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1750 +#: ../../whatsnew/3.12.rst:1761 msgid "webbrowser" msgstr "webbrowser" -#: ../../whatsnew/3.12.rst:1752 +#: ../../whatsnew/3.12.rst:1763 msgid "" "Remove support for obsolete browsers from :mod:`webbrowser`. The removed " "browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone, Iceape, " "Firebird, and Firefox versions 35 and below (:gh:`102871`)." msgstr "" -#: ../../whatsnew/3.12.rst:1757 +#: ../../whatsnew/3.12.rst:1768 msgid "xml.etree.ElementTree" msgstr "xml.etree.ElementTree" -#: ../../whatsnew/3.12.rst:1759 +#: ../../whatsnew/3.12.rst:1770 msgid "" "Remove the ``ElementTree.Element.copy()`` method of the pure Python " "implementation, deprecated in Python 3.10, use the :func:`copy.copy` " @@ -2779,22 +2796,22 @@ msgid "" "Stinner in :gh:`94383`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1766 +#: ../../whatsnew/3.12.rst:1777 msgid "zipimport" msgstr "zipimport" -#: ../../whatsnew/3.12.rst:1768 +#: ../../whatsnew/3.12.rst:1779 msgid "" "Remove :mod:`zipimport`'s ``find_loader()`` and ``find_module()`` methods, " "deprecated in Python 3.10: use the ``find_spec()`` method instead. See :pep:" "`451` for the rationale. (Contributed by Victor Stinner in :gh:`94379`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1774 +#: ../../whatsnew/3.12.rst:1785 msgid "Others" msgstr "其他" -#: ../../whatsnew/3.12.rst:1776 +#: ../../whatsnew/3.12.rst:1787 msgid "" "Remove the ``suspicious`` rule from the documentation :file:`Makefile` and :" "file:`Doc/tools/rstlint.py`, both in favor of `sphinx-lint `, " "intended for low-level tools like debuggers and JIT compilers. This API may " @@ -3068,84 +3085,84 @@ msgid "" "contents are marked by the ``PyUnstable_`` prefix in names." msgstr "" -#: ../../whatsnew/3.12.rst:1972 +#: ../../whatsnew/3.12.rst:1983 msgid "Code object constructors:" msgstr "" -#: ../../whatsnew/3.12.rst:1974 +#: ../../whatsnew/3.12.rst:1985 msgid "``PyUnstable_Code_New()`` (renamed from ``PyCode_New``)" msgstr "" -#: ../../whatsnew/3.12.rst:1975 +#: ../../whatsnew/3.12.rst:1986 msgid "" "``PyUnstable_Code_NewWithPosOnlyArgs()`` (renamed from " "``PyCode_NewWithPosOnlyArgs``)" msgstr "" -#: ../../whatsnew/3.12.rst:1977 +#: ../../whatsnew/3.12.rst:1988 msgid "Extra storage for code objects (:pep:`523`):" msgstr "" -#: ../../whatsnew/3.12.rst:1979 +#: ../../whatsnew/3.12.rst:1990 msgid "" "``PyUnstable_Eval_RequestCodeExtraIndex()`` (renamed from " "``_PyEval_RequestCodeExtraIndex``)" msgstr "" -#: ../../whatsnew/3.12.rst:1980 +#: ../../whatsnew/3.12.rst:1991 msgid "``PyUnstable_Code_GetExtra()`` (renamed from ``_PyCode_GetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1981 +#: ../../whatsnew/3.12.rst:1992 msgid "``PyUnstable_Code_SetExtra()`` (renamed from ``_PyCode_SetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1983 +#: ../../whatsnew/3.12.rst:1994 msgid "" "The original names will continue to be available until the respective API " "changes." msgstr "" -#: ../../whatsnew/3.12.rst:1986 +#: ../../whatsnew/3.12.rst:1997 msgid "(Contributed by Petr Viktorin in :gh:`101101`.)" msgstr "(由 Petr Viktorin 於 :gh:`101101` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1988 +#: ../../whatsnew/3.12.rst:1999 msgid "" ":pep:`697`: Add an API for extending types whose instance memory layout is " "opaque:" msgstr "" -#: ../../whatsnew/3.12.rst:1991 +#: ../../whatsnew/3.12.rst:2002 msgid "" ":c:member:`PyType_Spec.basicsize` can be zero or negative to specify " "inheriting or extending the base class size." msgstr "" -#: ../../whatsnew/3.12.rst:1993 +#: ../../whatsnew/3.12.rst:2004 msgid "" ":c:func:`PyObject_GetTypeData` and :c:func:`PyType_GetTypeDataSize` added to " "allow access to subclass-specific instance data." msgstr "" -#: ../../whatsnew/3.12.rst:1995 +#: ../../whatsnew/3.12.rst:2006 msgid "" ":c:macro:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData` added " "to allow safely extending certain variable-sized types, including :c:var:" "`PyType_Type`." msgstr "" -#: ../../whatsnew/3.12.rst:1998 +#: ../../whatsnew/3.12.rst:2009 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` added to allow defining :c:type:`members " "` in terms of a subclass-specific struct." msgstr "" -#: ../../whatsnew/3.12.rst:2001 +#: ../../whatsnew/3.12.rst:2012 msgid "(Contributed by Petr Viktorin in :gh:`103509`.)" msgstr "(由 Petr Viktorin 於 :gh:`103509` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2003 +#: ../../whatsnew/3.12.rst:2014 msgid "" "Add the new :ref:`limited C API ` function :c:func:" "`PyType_FromMetaclass`, which generalizes the existing :c:func:" @@ -3153,29 +3170,29 @@ msgid "" "(Contributed by Wenzel Jakob in :gh:`93012`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2008 +#: ../../whatsnew/3.12.rst:2019 msgid "" "API for creating objects that can be called using :ref:`the vectorcall " "protocol ` was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:2012 +#: ../../whatsnew/3.12.rst:2023 msgid ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" msgstr ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" -#: ../../whatsnew/3.12.rst:2013 +#: ../../whatsnew/3.12.rst:2024 msgid ":c:func:`PyVectorcall_NARGS`" msgstr ":c:func:`PyVectorcall_NARGS`" -#: ../../whatsnew/3.12.rst:2014 +#: ../../whatsnew/3.12.rst:2025 msgid ":c:func:`PyVectorcall_Call`" msgstr ":c:func:`PyVectorcall_Call`" -#: ../../whatsnew/3.12.rst:2015 +#: ../../whatsnew/3.12.rst:2026 msgid ":c:type:`vectorcallfunc`" msgstr ":c:type:`vectorcallfunc`" -#: ../../whatsnew/3.12.rst:2017 +#: ../../whatsnew/3.12.rst:2028 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. This " @@ -3186,7 +3203,7 @@ msgid "" "`93274`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2025 +#: ../../whatsnew/3.12.rst:2036 msgid "" "The :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` flags have been added. This allows extensions " @@ -3194,32 +3211,32 @@ msgid "" "using less memory and with faster access." msgstr "" -#: ../../whatsnew/3.12.rst:2030 +#: ../../whatsnew/3.12.rst:2041 msgid "" "API for performing calls using :ref:`the vectorcall protocol ` " "was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:2034 +#: ../../whatsnew/3.12.rst:2045 msgid ":c:func:`PyObject_Vectorcall`" msgstr ":c:func:`PyObject_Vectorcall`" -#: ../../whatsnew/3.12.rst:2035 +#: ../../whatsnew/3.12.rst:2046 msgid ":c:func:`PyObject_VectorcallMethod`" msgstr ":c:func:`PyObject_VectorcallMethod`" -#: ../../whatsnew/3.12.rst:2036 +#: ../../whatsnew/3.12.rst:2047 msgid ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" msgstr ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" -#: ../../whatsnew/3.12.rst:2038 +#: ../../whatsnew/3.12.rst:2049 msgid "" "This means that both the incoming and outgoing ends of the vector call " "protocol are now available in the :ref:`Limited API `. (Contributed " "by Wenzel Jakob in :gh:`98586`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2042 +#: ../../whatsnew/3.12.rst:2053 msgid "" "Add two new public functions, :c:func:`PyEval_SetProfileAllThreads` and :c:" "func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling " @@ -3227,14 +3244,14 @@ msgid "" "(Contributed by Pablo Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2048 +#: ../../whatsnew/3.12.rst:2059 msgid "" "Add new function :c:func:`PyFunction_SetVectorcall` to the C API which sets " "the vectorcall field of a given :c:type:`PyFunctionObject`. (Contributed by " "Andrew Frost in :gh:`92257`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2052 +#: ../../whatsnew/3.12.rst:2063 msgid "" "The C API now permits registering callbacks via :c:func:" "`PyDict_AddWatcher`, :c:func:`PyDict_Watch` and related APIs to be called " @@ -3243,28 +3260,28 @@ msgid "" "`91052`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2058 +#: ../../whatsnew/3.12.rst:2069 msgid "" "Add :c:func:`PyType_AddWatcher` and :c:func:`PyType_Watch` API to register " "callbacks to receive notification on changes to a type. (Contributed by Carl " "Meyer in :gh:`91051`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2062 +#: ../../whatsnew/3.12.rst:2073 msgid "" "Add :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher` APIs to " "register callbacks to receive notification on creation and destruction of " "code objects. (Contributed by Itamar Oren in :gh:`91054`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2067 +#: ../../whatsnew/3.12.rst:2078 msgid "" "Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to " "get a frame variable by its name. (Contributed by Victor Stinner in :gh:" "`91248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2071 +#: ../../whatsnew/3.12.rst:2082 msgid "" "Add :c:func:`PyErr_GetRaisedException` and :c:func:" "`PyErr_SetRaisedException` for saving and restoring the current exception. " @@ -3274,14 +3291,14 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2079 +#: ../../whatsnew/3.12.rst:2090 msgid "" "Add ``_PyErr_ChainExceptions1``, which takes an exception instance, to " "replace the legacy-API ``_PyErr_ChainExceptions``, which is now deprecated. " "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2083 +#: ../../whatsnew/3.12.rst:2094 msgid "" "Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs` as " "convenience functions for retrieving and modifying the :attr:`~BaseException." @@ -3289,71 +3306,71 @@ msgid "" "in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2088 +#: ../../whatsnew/3.12.rst:2099 msgid "" "Add :c:func:`PyErr_DisplayException`, which takes an exception instance, to " "replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by Irit " "Katriel in :gh:`102755`)." msgstr "" -#: ../../whatsnew/3.12.rst:2094 +#: ../../whatsnew/3.12.rst:2105 msgid "" ":pep:`683`: Introduce *Immortal Objects*, which allows objects to bypass " "reference counts, and related changes to the C-API:" msgstr "" -#: ../../whatsnew/3.12.rst:2097 +#: ../../whatsnew/3.12.rst:2108 msgid "``_Py_IMMORTAL_REFCNT``: The reference count that defines an object" msgstr "" -#: ../../whatsnew/3.12.rst:2098 +#: ../../whatsnew/3.12.rst:2109 msgid "as immortal." msgstr "" -#: ../../whatsnew/3.12.rst:2099 +#: ../../whatsnew/3.12.rst:2110 msgid "" "``_Py_IsImmortal`` Checks if an object has the immortal reference count." msgstr "" -#: ../../whatsnew/3.12.rst:2100 +#: ../../whatsnew/3.12.rst:2111 msgid "``PyObject_HEAD_INIT`` This will now initialize reference count to" msgstr "" -#: ../../whatsnew/3.12.rst:2101 +#: ../../whatsnew/3.12.rst:2112 msgid "``_Py_IMMORTAL_REFCNT`` when used with ``Py_BUILD_CORE``." msgstr "" -#: ../../whatsnew/3.12.rst:2102 +#: ../../whatsnew/3.12.rst:2113 msgid "``SSTATE_INTERNED_IMMORTAL`` An identifier for interned unicode objects" msgstr "" -#: ../../whatsnew/3.12.rst:2103 +#: ../../whatsnew/3.12.rst:2114 msgid "that are immortal." msgstr "" -#: ../../whatsnew/3.12.rst:2104 +#: ../../whatsnew/3.12.rst:2115 msgid "``SSTATE_INTERNED_IMMORTAL_STATIC`` An identifier for interned unicode" msgstr "" -#: ../../whatsnew/3.12.rst:2105 +#: ../../whatsnew/3.12.rst:2116 msgid "objects that are immortal and static" msgstr "" -#: ../../whatsnew/3.12.rst:2106 +#: ../../whatsnew/3.12.rst:2117 msgid "``sys.getunicodeinternedsize`` This returns the total number of unicode" msgstr "" -#: ../../whatsnew/3.12.rst:2107 +#: ../../whatsnew/3.12.rst:2118 msgid "" "objects that have been interned. This is now needed for :file:`refleak.py` " "to correctly track reference counts and allocated blocks" msgstr "" -#: ../../whatsnew/3.12.rst:2110 +#: ../../whatsnew/3.12.rst:2121 msgid "(Contributed by Eddie Elizondo in :gh:`84436`.)" msgstr "(由 Eddie Elizondo 於 :gh:`84436` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2112 +#: ../../whatsnew/3.12.rst:2123 msgid "" ":pep:`684`: Add the new :c:func:`Py_NewInterpreterFromConfig` function and :" "c:type:`PyInterpreterConfig`, which may be used to create sub-interpreters " @@ -3361,27 +3378,27 @@ msgid "" "(Contributed by Eric Snow in :gh:`104110`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2118 +#: ../../whatsnew/3.12.rst:2129 msgid "" "In the limited C API version 3.12, :c:func:`Py_INCREF` and :c:func:" "`Py_DECREF` functions are now implemented as opaque function calls to hide " "implementation details. (Contributed by Victor Stinner in :gh:`105387`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2126 +#: ../../whatsnew/3.12.rst:2137 msgid "" "Legacy Unicode APIs based on ``Py_UNICODE*`` representation has been " "removed. Please migrate to APIs based on UTF-8 or ``wchar_t*``." msgstr "" -#: ../../whatsnew/3.12.rst:2129 +#: ../../whatsnew/3.12.rst:2140 msgid "" "Argument parsing functions like :c:func:`PyArg_ParseTuple` doesn't support " "``Py_UNICODE*`` based format (e.g. ``u``, ``Z``) anymore. Please migrate to " "other formats for Unicode like ``s``, ``z``, ``es``, and ``U``." msgstr "" -#: ../../whatsnew/3.12.rst:2133 +#: ../../whatsnew/3.12.rst:2144 msgid "" "``tp_weaklist`` for all static builtin types is always ``NULL``. This is an " "internal-only field on ``PyTypeObject`` but we're pointing out the change in " @@ -3390,7 +3407,7 @@ msgid "" "necessary, the (internal-only) ``_PyObject_GET_WEAKREFS_LISTPTR()`` macro." msgstr "" -#: ../../whatsnew/3.12.rst:2140 +#: ../../whatsnew/3.12.rst:2151 msgid "" "This internal-only :c:member:`PyTypeObject.tp_subclasses` may now not be a " "valid object pointer. Its type was changed to :c:expr:`void *` to reflect " @@ -3398,13 +3415,13 @@ msgid "" "only field directly." msgstr "" -#: ../../whatsnew/3.12.rst:2145 +#: ../../whatsnew/3.12.rst:2156 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__` (using :c:func:`PyObject_CallMethod`, for example)." msgstr "" -#: ../../whatsnew/3.12.rst:2149 +#: ../../whatsnew/3.12.rst:2160 msgid "" "Add support of more formatting options (left aligning, octals, uppercase " "hexadecimals, :c:type:`intmax_t`, :c:type:`ptrdiff_t`, :c:type:`wchar_t` C " @@ -3413,7 +3430,7 @@ msgid "" "`98836`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2155 +#: ../../whatsnew/3.12.rst:2166 msgid "" "An unrecognized format character in :c:func:`PyUnicode_FromFormat` and :c:" "func:`PyUnicode_FromFormatV` now sets a :exc:`SystemError`. In previous " @@ -3422,13 +3439,13 @@ msgid "" "Storchaka in :gh:`95781`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2161 +#: ../../whatsnew/3.12.rst:2172 msgid "" "Fix wrong sign placement in :c:func:`PyUnicode_FromFormat` and :c:func:" "`PyUnicode_FromFormatV`. (Contributed by Philip Georgi in :gh:`95504`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2165 +#: ../../whatsnew/3.12.rst:2176 msgid "" "Extension classes wanting to add a ``__dict__`` or weak reference slot " "should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" @@ -3442,7 +3459,7 @@ msgid "" "func:`PyObject_ClearWeakRefs`, as before." msgstr "" -#: ../../whatsnew/3.12.rst:2177 +#: ../../whatsnew/3.12.rst:2188 msgid "" "The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like " "paths, like :class:`bytearray` and :class:`memoryview` types: only the " @@ -3450,7 +3467,7 @@ msgid "" "Victor Stinner in :gh:`98393`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2182 +#: ../../whatsnew/3.12.rst:2193 msgid "" "The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` " "macros now only evaluate their arguments once. If an argument has side " @@ -3458,7 +3475,7 @@ msgid "" "Stinner in :gh:`98724`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2187 +#: ../../whatsnew/3.12.rst:2198 msgid "" "The interpreter's error indicator is now always normalized. This means that :" "c:func:`PyErr_SetObject`, :c:func:`PyErr_SetString` and the other functions " @@ -3466,7 +3483,7 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2192 +#: ../../whatsnew/3.12.rst:2203 msgid "" "``_Py_RefTotal`` is no longer authoritative and only kept around for ABI " "compatibility. Note that it is an internal global and only available on " @@ -3474,25 +3491,25 @@ msgid "" "``_Py_GetGlobalRefTotal()``." msgstr "" -#: ../../whatsnew/3.12.rst:2197 +#: ../../whatsnew/3.12.rst:2208 msgid "" "The following functions now select an appropriate metaclass for the newly " "created type:" msgstr "" -#: ../../whatsnew/3.12.rst:2200 +#: ../../whatsnew/3.12.rst:2211 msgid ":c:func:`PyType_FromSpec`" msgstr ":c:func:`PyType_FromSpec`" -#: ../../whatsnew/3.12.rst:2201 +#: ../../whatsnew/3.12.rst:2212 msgid ":c:func:`PyType_FromSpecWithBases`" msgstr ":c:func:`PyType_FromSpecWithBases`" -#: ../../whatsnew/3.12.rst:2202 +#: ../../whatsnew/3.12.rst:2213 msgid ":c:func:`PyType_FromModuleAndSpec`" msgstr ":c:func:`PyType_FromModuleAndSpec`" -#: ../../whatsnew/3.12.rst:2204 +#: ../../whatsnew/3.12.rst:2215 msgid "" "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " "is deprecated, and in Python 3.14+ it will be disallowed. Note that these " @@ -3500,14 +3517,14 @@ msgid "" "initialization." msgstr "" -#: ../../whatsnew/3.12.rst:2209 +#: ../../whatsnew/3.12.rst:2220 msgid "" "Note that :c:func:`PyType_FromMetaclass` (added in Python 3.12) already " "disallows creating classes whose metaclass overrides ``tp_new`` (:meth:" "`~object.__new__` in Python)." msgstr "" -#: ../../whatsnew/3.12.rst:2213 +#: ../../whatsnew/3.12.rst:2224 msgid "" "Since ``tp_new`` overrides almost everything ``PyType_From*`` functions do, " "the two are incompatible with each other. The existing behavior -- ignoring " @@ -3516,17 +3533,17 @@ msgid "" "general workaround. One of the following may work for you:" msgstr "" -#: ../../whatsnew/3.12.rst:2220 +#: ../../whatsnew/3.12.rst:2231 msgid "If you control the metaclass, avoid using ``tp_new`` in it:" msgstr "" -#: ../../whatsnew/3.12.rst:2222 +#: ../../whatsnew/3.12.rst:2233 msgid "" "If initialization can be skipped, it can be done in :c:member:`~PyTypeObject." "tp_init` instead." msgstr "" -#: ../../whatsnew/3.12.rst:2224 +#: ../../whatsnew/3.12.rst:2235 msgid "" "If the metaclass doesn't need to be instantiated from Python, set its " "``tp_new`` to ``NULL`` using the :c:macro:" @@ -3534,20 +3551,20 @@ msgid "" "``PyType_From*`` functions." msgstr "" -#: ../../whatsnew/3.12.rst:2229 +#: ../../whatsnew/3.12.rst:2240 msgid "" "Avoid ``PyType_From*`` functions: if you don't need C-specific features " "(slots or setting the instance size), create types by :ref:`calling ` " "the metaclass." msgstr "" -#: ../../whatsnew/3.12.rst:2233 +#: ../../whatsnew/3.12.rst:2244 msgid "" "If you *know* the ``tp_new`` can be skipped safely, filter the deprecation " "warning out using :func:`warnings.catch_warnings` from Python." msgstr "" -#: ../../whatsnew/3.12.rst:2236 +#: ../../whatsnew/3.12.rst:2247 msgid "" ":c:var:`PyOS_InputHook` and :c:var:`PyOS_ReadlineFunctionPointer` are no " "longer called in :ref:`subinterpreters `. This is " @@ -3555,14 +3572,14 @@ msgid "" "callbacks have no way of recovering extension module state)." msgstr "" -#: ../../whatsnew/3.12.rst:2241 +#: ../../whatsnew/3.12.rst:2252 msgid "" "This also avoids situations where extensions may find themselves running in " "a subinterpreter that they don't support (or haven't yet been loaded in). " "See :gh:`104668` for more info." msgstr "" -#: ../../whatsnew/3.12.rst:2245 +#: ../../whatsnew/3.12.rst:2256 msgid "" ":c:struct:`PyLongObject` has had its internals changed for better " "performance. Although the internals of :c:struct:`PyLongObject` are private, " @@ -3573,15 +3590,15 @@ msgid "" "a single machine word:" msgstr "" -#: ../../whatsnew/3.12.rst:2253 +#: ../../whatsnew/3.12.rst:2264 msgid ":c:func:`PyUnstable_Long_IsCompact`" msgstr ":c:func:`PyUnstable_Long_IsCompact`" -#: ../../whatsnew/3.12.rst:2254 +#: ../../whatsnew/3.12.rst:2265 msgid ":c:func:`PyUnstable_Long_CompactValue`" msgstr ":c:func:`PyUnstable_Long_CompactValue`" -#: ../../whatsnew/3.12.rst:2256 +#: ../../whatsnew/3.12.rst:2267 msgid "" "Custom allocators, set via :c:func:`PyMem_SetAllocator`, are now required to " "be thread-safe, regardless of memory domain. Allocators that don't have " @@ -3590,7 +3607,7 @@ msgid "" "create a new GitHub issue and CC ``@ericsnowcurrently``." msgstr "" -#: ../../whatsnew/3.12.rst:2266 +#: ../../whatsnew/3.12.rst:2277 msgid "" "In accordance with :pep:`699`, the ``ma_version_tag`` field in :c:type:" "`PyDictObject` is deprecated for extension modules. Accessing this field " @@ -3599,76 +3616,76 @@ msgid "" "PEP by Ken Jin.)" msgstr "" -#: ../../whatsnew/3.12.rst:2271 +#: ../../whatsnew/3.12.rst:2282 msgid "Deprecate global configuration variable:" msgstr "" -#: ../../whatsnew/3.12.rst:2273 ../../whatsnew/3.12.rst:2358 +#: ../../whatsnew/3.12.rst:2284 ../../whatsnew/3.12.rst:2369 msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`" msgstr ":c:var:`Py_DebugFlag`: 請改用 :c:member:`PyConfig.parser_debug`" -#: ../../whatsnew/3.12.rst:2274 ../../whatsnew/3.12.rst:2359 +#: ../../whatsnew/3.12.rst:2285 ../../whatsnew/3.12.rst:2370 msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`" msgstr ":c:var:`Py_VerboseFlag`: 請改用 :c:member:`PyConfig.verbose`" -#: ../../whatsnew/3.12.rst:2275 ../../whatsnew/3.12.rst:2360 +#: ../../whatsnew/3.12.rst:2286 ../../whatsnew/3.12.rst:2371 msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`" msgstr ":c:var:`Py_QuietFlag`: 請改用 :c:member:`PyConfig.quiet`" -#: ../../whatsnew/3.12.rst:2276 ../../whatsnew/3.12.rst:2361 +#: ../../whatsnew/3.12.rst:2287 ../../whatsnew/3.12.rst:2372 msgid ":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`" msgstr ":c:var:`Py_InteractiveFlag`: 請改用 :c:member:`PyConfig.interactive`" -#: ../../whatsnew/3.12.rst:2277 ../../whatsnew/3.12.rst:2362 +#: ../../whatsnew/3.12.rst:2288 ../../whatsnew/3.12.rst:2373 msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`" msgstr ":c:var:`Py_InspectFlag`: 請改用 :c:member:`PyConfig.inspect`" -#: ../../whatsnew/3.12.rst:2278 ../../whatsnew/3.12.rst:2363 +#: ../../whatsnew/3.12.rst:2289 ../../whatsnew/3.12.rst:2374 msgid ":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`" msgstr "" ":c:var:`Py_OptimizeFlag`: 請改用 :c:member:`PyConfig.optimization_level`" -#: ../../whatsnew/3.12.rst:2279 ../../whatsnew/3.12.rst:2364 +#: ../../whatsnew/3.12.rst:2290 ../../whatsnew/3.12.rst:2375 msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`" msgstr ":c:var:`Py_NoSiteFlag`: 請改用 :c:member:`PyConfig.site_import`" -#: ../../whatsnew/3.12.rst:2280 ../../whatsnew/3.12.rst:2365 +#: ../../whatsnew/3.12.rst:2291 ../../whatsnew/3.12.rst:2376 msgid ":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`" msgstr "" ":c:var:`Py_BytesWarningFlag`: 請改用 :c:member:`PyConfig.bytes_warning`" -#: ../../whatsnew/3.12.rst:2281 ../../whatsnew/3.12.rst:2366 +#: ../../whatsnew/3.12.rst:2292 ../../whatsnew/3.12.rst:2377 msgid ":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`" msgstr "" ":c:var:`Py_FrozenFlag`: 請改用 :c:member:`PyConfig.pathconfig_warnings`" -#: ../../whatsnew/3.12.rst:2282 ../../whatsnew/3.12.rst:2367 +#: ../../whatsnew/3.12.rst:2293 ../../whatsnew/3.12.rst:2378 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`" msgstr "" ":c:var:`Py_IgnoreEnvironmentFlag`: 請改用 :c:member:`PyConfig." "use_environment`" -#: ../../whatsnew/3.12.rst:2283 ../../whatsnew/3.12.rst:2368 +#: ../../whatsnew/3.12.rst:2294 ../../whatsnew/3.12.rst:2379 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`" msgstr "" ":c:var:`Py_DontWriteBytecodeFlag`: 請改用 :c:member:`PyConfig.write_bytecode`" -#: ../../whatsnew/3.12.rst:2284 ../../whatsnew/3.12.rst:2369 +#: ../../whatsnew/3.12.rst:2295 ../../whatsnew/3.12.rst:2380 msgid "" ":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`" msgstr "" ":c:var:`Py_NoUserSiteDirectory`: 請改用 :c:member:`PyConfig." "user_site_directory`" -#: ../../whatsnew/3.12.rst:2285 ../../whatsnew/3.12.rst:2370 +#: ../../whatsnew/3.12.rst:2296 ../../whatsnew/3.12.rst:2381 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`" msgstr "" ":c:var:`Py_UnbufferedStdioFlag`: 請改用 :c:member:`PyConfig.buffered_stdio`" -#: ../../whatsnew/3.12.rst:2286 ../../whatsnew/3.12.rst:2371 +#: ../../whatsnew/3.12.rst:2297 ../../whatsnew/3.12.rst:2382 msgid "" ":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed`" @@ -3676,11 +3693,11 @@ msgstr "" ":c:var:`Py_HashRandomizationFlag`: 請改用 :c:member:`PyConfig.use_hash_seed` " "和 :c:member:`PyConfig.hash_seed`" -#: ../../whatsnew/3.12.rst:2288 ../../whatsnew/3.12.rst:2373 +#: ../../whatsnew/3.12.rst:2299 ../../whatsnew/3.12.rst:2384 msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`" msgstr ":c:var:`Py_IsolatedFlag`: 請改用 :c:member:`PyConfig.isolated`" -#: ../../whatsnew/3.12.rst:2289 ../../whatsnew/3.12.rst:2374 +#: ../../whatsnew/3.12.rst:2300 ../../whatsnew/3.12.rst:2385 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" @@ -3688,7 +3705,7 @@ msgstr "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: 請改用 :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" -#: ../../whatsnew/3.12.rst:2290 ../../whatsnew/3.12.rst:2375 +#: ../../whatsnew/3.12.rst:2301 ../../whatsnew/3.12.rst:2386 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." "legacy_windows_stdio`" @@ -3696,7 +3713,7 @@ msgstr "" ":c:var:`Py_LegacyWindowsStdioFlag`: 請改用 :c:member:`PyConfig." "legacy_windows_stdio`" -#: ../../whatsnew/3.12.rst:2291 ../../whatsnew/3.12.rst:2376 +#: ../../whatsnew/3.12.rst:2302 ../../whatsnew/3.12.rst:2387 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" @@ -3704,7 +3721,7 @@ msgstr "" ":c:var:`!Py_FileSystemDefaultEncoding`: 請改用 :c:member:`PyConfig." "filesystem_encoding`" -#: ../../whatsnew/3.12.rst:2292 ../../whatsnew/3.12.rst:2377 +#: ../../whatsnew/3.12.rst:2303 ../../whatsnew/3.12.rst:2388 msgid "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" @@ -3712,7 +3729,7 @@ msgstr "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: 請改用 :c:member:`PyConfig." "filesystem_encoding`" -#: ../../whatsnew/3.12.rst:2293 ../../whatsnew/3.12.rst:2378 +#: ../../whatsnew/3.12.rst:2304 ../../whatsnew/3.12.rst:2389 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." "filesystem_errors`" @@ -3720,7 +3737,7 @@ msgstr "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: 請改用 :c:member:`PyConfig." "filesystem_errors`" -#: ../../whatsnew/3.12.rst:2294 ../../whatsnew/3.12.rst:2379 +#: ../../whatsnew/3.12.rst:2305 ../../whatsnew/3.12.rst:2390 msgid "" ":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:" "`Py_PreInitialize`)" @@ -3728,7 +3745,7 @@ msgstr "" ":c:var:`!Py_UTF8Mode`: 請改用 :c:member:`PyPreConfig.utf8_mode`\\ (參見 :c:" "func:`Py_PreInitialize`)" -#: ../../whatsnew/3.12.rst:2296 +#: ../../whatsnew/3.12.rst:2307 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead. (Contributed by Victor Stinner in :gh:`77782`.)" @@ -3736,25 +3753,25 @@ msgstr "" ":c:func:`Py_InitializeFromConfig` API 應改為與 :c:type:`PyConfig` 一起使用。" "(由 Victor Stinner 於 :gh:`77782` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2300 +#: ../../whatsnew/3.12.rst:2311 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases is deprecated and will be disabled in Python 3.14. (:gh:`95388`)" msgstr "" -#: ../../whatsnew/3.12.rst:2303 +#: ../../whatsnew/3.12.rst:2314 msgid "" "The :file:`structmember.h` header is deprecated, though it continues to be " "available and there are no plans to remove it." msgstr ":file:`structmember.h` 標頭已棄用,但仍可使用,且還沒有移除它的計畫。" -#: ../../whatsnew/3.12.rst:2306 +#: ../../whatsnew/3.12.rst:2317 msgid "" "Its contents are now available just by including :file:`Python.h`, with a " "``Py`` prefix added if it was missing:" msgstr "" -#: ../../whatsnew/3.12.rst:2309 +#: ../../whatsnew/3.12.rst:2320 msgid "" ":c:struct:`PyMemberDef`, :c:func:`PyMember_GetOne` and :c:func:" "`PyMember_SetOne`" @@ -3762,13 +3779,13 @@ msgstr "" ":c:struct:`PyMemberDef`、:c:func:`PyMember_GetOne` 和 :c:func:" "`PyMember_SetOne`" -#: ../../whatsnew/3.12.rst:2311 +#: ../../whatsnew/3.12.rst:2322 msgid "" "Type macros like :c:macro:`Py_T_INT`, :c:macro:`Py_T_DOUBLE`, etc. " "(previously ``T_INT``, ``T_DOUBLE``, etc.)" msgstr "" -#: ../../whatsnew/3.12.rst:2313 +#: ../../whatsnew/3.12.rst:2324 msgid "" "The flags :c:macro:`Py_READONLY` (previously ``READONLY``) and :c:macro:" "`Py_AUDIT_READ` (previously all uppercase)" @@ -3776,23 +3793,23 @@ msgstr "" ":c:macro:`Py_READONLY`\\ (先前為 ``READONLY``)和 :c:macro:" "`Py_AUDIT_READ`\\ (先前全大寫)旗標" -#: ../../whatsnew/3.12.rst:2316 +#: ../../whatsnew/3.12.rst:2327 msgid "Several items are not exposed from :file:`Python.h`:" msgstr "數個項目不再從 :file:`Python.h` 中公開:" -#: ../../whatsnew/3.12.rst:2318 +#: ../../whatsnew/3.12.rst:2329 msgid ":c:macro:`T_OBJECT` (use :c:macro:`Py_T_OBJECT_EX`)" msgstr ":c:macro:`T_OBJECT`\\ (請改用 :c:macro:`Py_T_OBJECT_EX`)" -#: ../../whatsnew/3.12.rst:2319 +#: ../../whatsnew/3.12.rst:2330 msgid ":c:macro:`T_NONE` (previously undocumented, and pretty quirky)" msgstr ":c:macro:`T_NONE`\\ (先前未記錄於文件上,且相當古怪)" -#: ../../whatsnew/3.12.rst:2320 +#: ../../whatsnew/3.12.rst:2331 msgid "The macro ``WRITE_RESTRICTED`` which does nothing." msgstr "不做任何事的巨集 ``WRITE_RESTRICTED``。" -#: ../../whatsnew/3.12.rst:2321 +#: ../../whatsnew/3.12.rst:2332 msgid "" "The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of :c:macro:" "`Py_AUDIT_READ`." @@ -3800,33 +3817,33 @@ msgstr "" "``RESTRICTED`` 和 ``READ_RESTRICTED`` 這兩個巨集,相當於 :c:macro:" "`Py_AUDIT_READ`。" -#: ../../whatsnew/3.12.rst:2323 +#: ../../whatsnew/3.12.rst:2334 msgid "" "In some configurations, ```` is not included from :file:`Python." "h`. It should be included manually when using ``offsetof()``." msgstr "" -#: ../../whatsnew/3.12.rst:2326 +#: ../../whatsnew/3.12.rst:2337 msgid "" "The deprecated header continues to provide its original contents under the " "original names. Your old code can stay unchanged, unless the extra include " "and non-namespaced macros bother you greatly." msgstr "" -#: ../../whatsnew/3.12.rst:2331 +#: ../../whatsnew/3.12.rst:2342 msgid "" "(Contributed in :gh:`47146` by Petr Viktorin, based on earlier work by " "Alexander Belopolsky and Matthias Braun.)" msgstr "" -#: ../../whatsnew/3.12.rst:2334 +#: ../../whatsnew/3.12.rst:2345 msgid "" ":c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` are deprecated. Use :c:" "func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` " "instead. (Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2339 +#: ../../whatsnew/3.12.rst:2350 msgid "" ":c:func:`!PyErr_Display` is deprecated. Use :c:func:`PyErr_DisplayException` " "instead. (Contributed by Irit Katriel in :gh:`102755`)." @@ -3834,7 +3851,7 @@ msgstr "" ":c:func:`!PyErr_Display` 已棄用,請改用 :c:func:`PyErr_DisplayException`。" "(由 Irit Katriel 於 :gh:`102755` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2342 +#: ../../whatsnew/3.12.rst:2353 msgid "" "``_PyErr_ChainExceptions`` is deprecated. Use ``_PyErr_ChainExceptions1`` " "instead. (Contributed by Irit Katriel in :gh:`102192`.)" @@ -3842,56 +3859,56 @@ msgstr "" "``_PyErr_ChainExceptions`` 已棄用,請改用 ``_PyErr_ChainExceptions1``。(由 " "Irit Katriel 於 :gh:`102192` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2345 +#: ../../whatsnew/3.12.rst:2356 msgid "" "Using :c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases` or :c:" "func:`PyType_FromModuleAndSpec` to create a class whose metaclass overrides :" "c:member:`~PyTypeObject.tp_new` is deprecated. Call the metaclass instead." msgstr "" -#: ../../whatsnew/3.12.rst:2353 +#: ../../whatsnew/3.12.rst:2364 msgid "" "The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " "(:pep:`699`; :gh:`101193`)." msgstr "" -#: ../../whatsnew/3.12.rst:2356 +#: ../../whatsnew/3.12.rst:2367 msgid "Global configuration variables:" msgstr "" -#: ../../whatsnew/3.12.rst:2381 +#: ../../whatsnew/3.12.rst:2392 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" ":c:func:`Py_InitializeFromConfig` API 應改為與 :c:type:`PyConfig` 一起使用。" -#: ../../whatsnew/3.12.rst:2384 +#: ../../whatsnew/3.12.rst:2395 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases (:gh:`95388`)." msgstr "" -#: ../../whatsnew/3.12.rst:2390 +#: ../../whatsnew/3.12.rst:2401 msgid "" ":c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule`" msgstr "" ":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:" "`PyImport_ImportModule`" -#: ../../whatsnew/3.12.rst:2391 +#: ../../whatsnew/3.12.rst:2402 msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t`" msgstr ":c:type:`!Py_UNICODE_WIDE` 型別:請改用 :c:type:`wchar_t`" -#: ../../whatsnew/3.12.rst:2392 +#: ../../whatsnew/3.12.rst:2403 msgid ":c:type:`Py_UNICODE` type: use :c:type:`wchar_t`" msgstr ":c:type:`Py_UNICODE` 型別:請改用 :c:type:`wchar_t`" -#: ../../whatsnew/3.12.rst:2393 +#: ../../whatsnew/3.12.rst:2404 msgid "Python initialization functions:" msgstr "Python 初始化函式:" -#: ../../whatsnew/3.12.rst:2395 +#: ../../whatsnew/3.12.rst:2406 msgid "" ":c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and :data:`!" "warnings.filters`" @@ -3899,27 +3916,27 @@ msgstr "" ":c:func:`PySys_ResetWarnOptions`:清除 :data:`sys.warnoptions` 和 :data:`!" "warnings.filters`" -#: ../../whatsnew/3.12.rst:2397 +#: ../../whatsnew/3.12.rst:2408 msgid ":c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix`" msgstr ":c:func:`Py_GetExecPrefix`:取得 :data:`sys.exec_prefix`" -#: ../../whatsnew/3.12.rst:2398 +#: ../../whatsnew/3.12.rst:2409 msgid ":c:func:`Py_GetPath`: get :data:`sys.path`" msgstr ":c:func:`Py_GetPath`:取得 :data:`sys.path`" -#: ../../whatsnew/3.12.rst:2399 +#: ../../whatsnew/3.12.rst:2410 msgid ":c:func:`Py_GetPrefix`: get :data:`sys.prefix`" msgstr ":c:func:`Py_GetPrefix`:取得 :data:`sys.prefix`" -#: ../../whatsnew/3.12.rst:2400 +#: ../../whatsnew/3.12.rst:2411 msgid ":c:func:`Py_GetProgramFullPath`: get :data:`sys.executable`" msgstr ":c:func:`Py_GetProgramFullPath`:取得 :data:`sys.executable`" -#: ../../whatsnew/3.12.rst:2401 +#: ../../whatsnew/3.12.rst:2412 msgid ":c:func:`Py_GetProgramName`: get :data:`sys.executable`" msgstr ":c:func:`Py_GetProgramName`:取得 :data:`sys.executable`" -#: ../../whatsnew/3.12.rst:2402 +#: ../../whatsnew/3.12.rst:2413 msgid "" ":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or the :envvar:" "`PYTHONHOME` environment variable" @@ -3927,41 +3944,41 @@ msgstr "" ":c:func:`Py_GetPythonHome`:取得 :c:member:`PyConfig.home` 或 :envvar:" "`PYTHONHOME` 環境變數" -#: ../../whatsnew/3.12.rst:2408 +#: ../../whatsnew/3.12.rst:2419 msgid "" "The following APIs are deprecated and will be removed, although there is " "currently no date scheduled for their removal." msgstr "以下 API 已棄用,且將會被移除,雖目前尚未定下移除日期。" -#: ../../whatsnew/3.12.rst:2411 +#: ../../whatsnew/3.12.rst:2422 msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8" msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`:自 Python 3.8 起不再需要" -#: ../../whatsnew/3.12.rst:2412 +#: ../../whatsnew/3.12.rst:2423 msgid ":c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException`" msgstr ":c:func:`PyErr_Fetch`:請改用 :c:func:`PyErr_GetRaisedException`" -#: ../../whatsnew/3.12.rst:2413 +#: ../../whatsnew/3.12.rst:2424 msgid "" ":c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException`" msgstr "" ":c:func:`PyErr_NormalizeException`:請改用 :c:func:`PyErr_GetRaisedException`" -#: ../../whatsnew/3.12.rst:2414 +#: ../../whatsnew/3.12.rst:2425 msgid ":c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException`" msgstr ":c:func:`PyErr_Restore`:請改用 :c:func:`PyErr_SetRaisedException`" -#: ../../whatsnew/3.12.rst:2415 +#: ../../whatsnew/3.12.rst:2426 msgid "" ":c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject`" msgstr "" ":c:func:`PyModule_GetFilename`:請改用 :c:func:`PyModule_GetFilenameObject`" -#: ../../whatsnew/3.12.rst:2416 +#: ../../whatsnew/3.12.rst:2427 msgid ":c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child`" msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`" -#: ../../whatsnew/3.12.rst:2417 +#: ../../whatsnew/3.12.rst:2428 msgid "" ":c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices`" @@ -3969,122 +3986,122 @@ msgstr "" ":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:" "`PySlice_AdjustIndices`" -#: ../../whatsnew/3.12.rst:2418 +#: ../../whatsnew/3.12.rst:2429 msgid ":c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode`" msgstr ":c:func:`!PyUnicode_AsDecodedObject`:請改用 :c:func:`PyCodec_Decode`" -#: ../../whatsnew/3.12.rst:2419 +#: ../../whatsnew/3.12.rst:2430 msgid ":c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode`" msgstr ":c:func:`!PyUnicode_AsDecodedUnicode`:請改用 :c:func:`PyCodec_Decode`" -#: ../../whatsnew/3.12.rst:2420 +#: ../../whatsnew/3.12.rst:2431 msgid ":c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode`" msgstr ":c:func:`!PyUnicode_AsEncodedObject`:請改用 :c:func:`PyCodec_Encode`" -#: ../../whatsnew/3.12.rst:2421 +#: ../../whatsnew/3.12.rst:2432 msgid ":c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode`" msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`:請改用 :c:func:`PyCodec_Encode`" -#: ../../whatsnew/3.12.rst:2422 +#: ../../whatsnew/3.12.rst:2433 msgid ":c:func:`PyUnicode_READY`: unneeded since Python 3.12" msgstr ":c:func:`PyUnicode_READY`:自 Python 3.12 起不再需要" -#: ../../whatsnew/3.12.rst:2423 +#: ../../whatsnew/3.12.rst:2434 msgid ":c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException`" msgstr ":c:func:`!PyErr_Display`:請改用 :c:func:`PyErr_DisplayException`" -#: ../../whatsnew/3.12.rst:2424 +#: ../../whatsnew/3.12.rst:2435 msgid ":c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1``" msgstr ":c:func:`!_PyErr_ChainExceptions`:請改用 ``_PyErr_ChainExceptions1``" -#: ../../whatsnew/3.12.rst:2425 +#: ../../whatsnew/3.12.rst:2436 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead" msgstr "" ":c:member:`!PyBytesObject.ob_shash` 成員:請改用 :c:func:`PyObject_Hash`" -#: ../../whatsnew/3.12.rst:2427 +#: ../../whatsnew/3.12.rst:2438 msgid ":c:member:`!PyDictObject.ma_version_tag` member" msgstr ":c:member:`!PyDictObject.ma_version_tag` 成員" -#: ../../whatsnew/3.12.rst:2428 +#: ../../whatsnew/3.12.rst:2439 msgid "Thread Local Storage (TLS) API:" msgstr "" -#: ../../whatsnew/3.12.rst:2430 +#: ../../whatsnew/3.12.rst:2441 msgid ":c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc`" msgstr ":c:func:`PyThread_create_key`:請改用 :c:func:`PyThread_tss_alloc`" -#: ../../whatsnew/3.12.rst:2431 +#: ../../whatsnew/3.12.rst:2442 msgid ":c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free`" msgstr ":c:func:`PyThread_delete_key`:請改用 :c:func:`PyThread_tss_free`" -#: ../../whatsnew/3.12.rst:2432 +#: ../../whatsnew/3.12.rst:2443 msgid ":c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set`" msgstr ":c:func:`PyThread_set_key_value`:請改用 :c:func:`PyThread_tss_set`" -#: ../../whatsnew/3.12.rst:2433 +#: ../../whatsnew/3.12.rst:2444 msgid ":c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`" msgstr ":c:func:`PyThread_get_key_value`:請改用 :c:func:`PyThread_tss_get`" -#: ../../whatsnew/3.12.rst:2434 +#: ../../whatsnew/3.12.rst:2445 msgid ":c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`" msgstr "" ":c:func:`PyThread_delete_key_value`:請改用 :c:func:`PyThread_tss_delete`" -#: ../../whatsnew/3.12.rst:2435 +#: ../../whatsnew/3.12.rst:2446 msgid ":c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7" msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要" -#: ../../whatsnew/3.12.rst:2440 +#: ../../whatsnew/3.12.rst:2451 msgid "" "Remove the :file:`token.h` header file. There was never any public tokenizer " "C API. The :file:`token.h` header file was only designed to be used by " "Python internals. (Contributed by Victor Stinner in :gh:`92651`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2445 +#: ../../whatsnew/3.12.rst:2456 msgid "Legacy Unicode APIs have been removed. See :pep:`623` for detail." msgstr "" -#: ../../whatsnew/3.12.rst:2447 +#: ../../whatsnew/3.12.rst:2458 msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" msgstr ":c:macro:`!PyUnicode_WCHAR_KIND`" -#: ../../whatsnew/3.12.rst:2448 +#: ../../whatsnew/3.12.rst:2459 msgid ":c:func:`!PyUnicode_AS_UNICODE`" msgstr ":c:func:`!PyUnicode_AS_UNICODE`" -#: ../../whatsnew/3.12.rst:2449 +#: ../../whatsnew/3.12.rst:2460 msgid ":c:func:`!PyUnicode_AsUnicode`" msgstr ":c:func:`!PyUnicode_AsUnicode`" -#: ../../whatsnew/3.12.rst:2450 +#: ../../whatsnew/3.12.rst:2461 msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" msgstr ":c:func:`!PyUnicode_AsUnicodeAndSize`" -#: ../../whatsnew/3.12.rst:2451 +#: ../../whatsnew/3.12.rst:2462 msgid ":c:func:`!PyUnicode_AS_DATA`" msgstr ":c:func:`!PyUnicode_AS_DATA`" -#: ../../whatsnew/3.12.rst:2452 +#: ../../whatsnew/3.12.rst:2463 msgid ":c:func:`!PyUnicode_FromUnicode`" msgstr ":c:func:`!PyUnicode_FromUnicode`" -#: ../../whatsnew/3.12.rst:2453 +#: ../../whatsnew/3.12.rst:2464 msgid ":c:func:`!PyUnicode_GET_SIZE`" msgstr ":c:func:`!PyUnicode_GET_SIZE`" -#: ../../whatsnew/3.12.rst:2454 +#: ../../whatsnew/3.12.rst:2465 msgid ":c:func:`!PyUnicode_GetSize`" msgstr ":c:func:`!PyUnicode_GetSize`" -#: ../../whatsnew/3.12.rst:2455 +#: ../../whatsnew/3.12.rst:2466 msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" -#: ../../whatsnew/3.12.rst:2457 +#: ../../whatsnew/3.12.rst:2468 msgid "" "Remove the ``PyUnicode_InternImmortal()`` function macro. (Contributed by " "Victor Stinner in :gh:`85858`.)" @@ -4092,15 +4109,15 @@ msgstr "" "移除 ``PyUnicode_InternImmortal()`` 函式巨集。(由 Victor Stinner 於 :gh:" "`85858` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2461 +#: ../../whatsnew/3.12.rst:2472 msgid "Notable changes in 3.12.4" msgstr "" -#: ../../whatsnew/3.12.rst:2464 +#: ../../whatsnew/3.12.rst:2475 msgid "ipaddress" msgstr "" -#: ../../whatsnew/3.12.rst:2466 +#: ../../whatsnew/3.12.rst:2477 msgid "" "Fixed ``is_global`` and ``is_private`` behavior in ``IPv4Address``, " "``IPv6Address``, ``IPv4Network`` and ``IPv6Network``." From c29939e954a064711c59c6c3f94bf88a0b90c085 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 11 May 2024 00:05:02 +0000 Subject: [PATCH 02/13] sync with cpython af8db2b6 --- library/secrets.po | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/secrets.po b/library/secrets.po index 965492c90d3..5a8b774015e 100644 --- a/library/secrets.po +++ b/library/secrets.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-11 00:03+0000\n" "PO-Revision-Date: 2022-11-30 13:42+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -75,7 +75,8 @@ msgid "Return a randomly chosen element from a non-empty sequence." msgstr "從一非空序列中,回傳一個隨機選取的元素。" #: ../../library/secrets.rst:51 -msgid "Return a random int in the range [0, *n*)." +#, fuzzy +msgid "Return a random int in the range [0, *exclusive_upper_bound*)." msgstr "回傳一個 [0, *n*) 範圍之內的隨機整數。" #: ../../library/secrets.rst:55 From dec0228dfb894ecb6f194876e0e610b74ab55a10 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 May 2024 00:05:00 +0000 Subject: [PATCH 03/13] sync with cpython a0786bcb --- library/pathlib.po | 366 +++++++++++++++++++++++---------------------- 1 file changed, 186 insertions(+), 180 deletions(-) diff --git a/library/pathlib.po b/library/pathlib.po index 31a5e0716fb..abbe5b382c5 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-12 00:03+0000\n" "PO-Revision-Date: 2024-02-29 20:49+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -201,8 +201,8 @@ msgstr "" ":class:`PurePath` 的一個子類別,該路徑類型表示非 Windows 檔案系統的路徑: ::" #: ../../library/pathlib.rst:167 ../../library/pathlib.rst:179 -#: ../../library/pathlib.rst:748 ../../library/pathlib.rst:758 -#: ../../library/pathlib.rst:768 +#: ../../library/pathlib.rst:752 ../../library/pathlib.rst:762 +#: ../../library/pathlib.rst:772 msgid "*pathsegments* is specified similarly to :class:`PurePath`." msgstr "*pathsegments* 的指定方式與 :class:`PurePath` 類似。" @@ -505,25 +505,31 @@ msgid "" "pattern against multiple files::" msgstr "*pattern* 可以是另一個路徑物件;這會加速對多個檔案比對相同的樣式: ::" -#: ../../library/pathlib.rst:585 +#: ../../library/pathlib.rst:586 +msgid "" +"The recursive wildcard \"``**``\" isn't supported by this method (it acts " +"like non-recursive \"``*``\".)" +msgstr "" + +#: ../../library/pathlib.rst:589 msgid "Accepts an object implementing the :class:`os.PathLike` interface." msgstr "接受一個有實作 :class:`os.PathLike` 介面的物件。" -#: ../../library/pathlib.rst:588 +#: ../../library/pathlib.rst:592 msgid "As with other methods, case-sensitivity follows platform defaults::" msgstr "像其它方法一樣,是否區分大小寫會遵循平台的預設行為: ::" -#: ../../library/pathlib.rst:595 +#: ../../library/pathlib.rst:599 msgid "" "Set *case_sensitive* to ``True`` or ``False`` to override this behaviour." msgstr "將 *case_sensitive* 設定成 ``True`` 或 ``False`` 會覆蓋這個行為。" -#: ../../library/pathlib.rst:597 ../../library/pathlib.rst:944 -#: ../../library/pathlib.rst:1357 +#: ../../library/pathlib.rst:601 ../../library/pathlib.rst:948 +#: ../../library/pathlib.rst:1361 msgid "The *case_sensitive* parameter was added." msgstr "新增 *case_sensitive* 參數。" -#: ../../library/pathlib.rst:603 +#: ../../library/pathlib.rst:607 msgid "" "Compute a version of this path relative to the path represented by *other*. " "If it's impossible, :exc:`ValueError` is raised::" @@ -531,7 +537,7 @@ msgstr "" "計算這個路徑相對於 *other* 所表示路徑的版本。如果做不到會引發 :exc:" "`ValueError`: ::" -#: ../../library/pathlib.rst:618 +#: ../../library/pathlib.rst:622 msgid "" "When *walk_up* is false (the default), the path must start with *other*. " "When the argument is true, ``..`` entries may be added to form the relative " @@ -542,7 +548,7 @@ msgstr "" "可能會加入 ``..`` 以組成相對路徑。在其他情況下,例如路徑參考到不同的磁碟機," "則會引發 :exc:`ValueError`: ::" -#: ../../library/pathlib.rst:633 +#: ../../library/pathlib.rst:637 msgid "" "This function is part of :class:`PurePath` and works with strings. It does " "not check or access the underlying file structure. This can impact the " @@ -553,19 +559,19 @@ msgstr "" "的檔案架構。這會影響到 *walk_up* 選項,因為它假設路徑中沒有符號連結;如果需要" "解析符號連結的話可以先呼叫 :meth:`~Path.resolve`。" -#: ../../library/pathlib.rst:639 +#: ../../library/pathlib.rst:643 msgid "" "The *walk_up* parameter was added (old behavior is the same as " "``walk_up=False``)." msgstr "加入 *walk_up* 參數(舊的行為和 ``walk_up=False`` 相同)。" -#: ../../library/pathlib.rst:644 +#: ../../library/pathlib.rst:648 msgid "" "Passing additional positional arguments is deprecated; if supplied, they are " "joined with *other*." msgstr "額外位置引數的傳入已棄用;如果有的話,它們會與 *other* 連接在一起。" -#: ../../library/pathlib.rst:649 +#: ../../library/pathlib.rst:653 msgid "" "Return a new path with the :attr:`name` changed. If the original path " "doesn't have a name, ValueError is raised::" @@ -573,7 +579,7 @@ msgstr "" "回傳一個修改 :attr:`name` 後的新路徑。如果原始路徑沒有名稱則引發 " "ValueError: ::" -#: ../../library/pathlib.rst:666 +#: ../../library/pathlib.rst:670 msgid "" "Return a new path with the :attr:`stem` changed. If the original path " "doesn't have a name, ValueError is raised::" @@ -581,7 +587,7 @@ msgstr "" "回傳一個修改 :attr:`stem` 後的新路徑。如果原始路徑沒有名稱則引發 " "ValueError: ::" -#: ../../library/pathlib.rst:690 +#: ../../library/pathlib.rst:694 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 " @@ -590,7 +596,7 @@ msgstr "" "回傳一個修改 :attr:`suffix` 後的新路徑。如果原始路徑沒有後綴,新的 *suffix* " "會附加在後面。如果 *suffix* 是一個空字串,原來的後綴會被移除: ::" -#: ../../library/pathlib.rst:707 +#: ../../library/pathlib.rst:711 msgid "" "Create a new path object of the same type by combining the given " "*pathsegments*. This method is called whenever a derivative path is created, " @@ -601,11 +607,11 @@ msgstr "" "建立的時候會呼叫這個方法,例如從 :attr:`parent` 和 :meth:`relative_to` 建立衍" "生路徑。子類別可以覆寫此方法來傳遞資訊給衍生路徑,例如: ::" -#: ../../library/pathlib.rst:733 +#: ../../library/pathlib.rst:737 msgid "Concrete paths" msgstr "實體路徑" -#: ../../library/pathlib.rst:735 +#: ../../library/pathlib.rst:739 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 " @@ -614,7 +620,7 @@ msgstr "" "實體路徑是純路徑類別的子類別。除了後者本來就有提供的操作,它們也提供方法可以" "對路徑物件做系統呼叫。有三種方式可以實例化實體路徑:" -#: ../../library/pathlib.rst:741 +#: ../../library/pathlib.rst:745 msgid "" "A subclass of :class:`PurePath`, this class represents concrete paths of the " "system's path flavour (instantiating it creates either a :class:`PosixPath` " @@ -623,7 +629,7 @@ msgstr "" ":class:`PurePath` 的子類別,此類別表示系統的路徑類型的實體路徑(實例化時會建" "立一個 :class:`PosixPath` 或 :class:`WindowsPath`): ::" -#: ../../library/pathlib.rst:752 +#: ../../library/pathlib.rst:756 msgid "" "A subclass of :class:`Path` and :class:`PurePosixPath`, this class " "represents concrete non-Windows filesystem paths::" @@ -631,7 +637,7 @@ msgstr "" ":class:`Path` 和 :class:`PurePosixPath` 的子類別,此類別表示實體非 Windows 檔" "案系統路徑: ::" -#: ../../library/pathlib.rst:762 +#: ../../library/pathlib.rst:766 msgid "" "A subclass of :class:`Path` and :class:`PureWindowsPath`, this class " "represents concrete Windows filesystem paths::" @@ -639,7 +645,7 @@ msgstr "" ":class:`Path` 和 :class:`PureWindowsPath` 的子類別,此類別表示實體 Windows 檔" "案系統路徑: ::" -#: ../../library/pathlib.rst:770 +#: ../../library/pathlib.rst:774 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 " @@ -648,11 +654,11 @@ msgstr "" "你只能實例化對應你的系統的類別類型(允許在不相容的路徑類型上做系統呼叫可能在" "你的應用程式導致漏洞或故障): ::" -#: ../../library/pathlib.rst:790 +#: ../../library/pathlib.rst:794 msgid "Methods" msgstr "方法" -#: ../../library/pathlib.rst:792 +#: ../../library/pathlib.rst:796 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 " @@ -661,7 +667,7 @@ msgstr "" "實體路徑除了純路徑的方法之外也提供以下方法。如果系統呼叫失敗(例如因為路徑不" "存在),以下許多方法會引發 :exc:`OSError`。" -#: ../../library/pathlib.rst:798 +#: ../../library/pathlib.rst:802 msgid "" ":meth:`~Path.exists()`, :meth:`~Path.is_dir()`, :meth:`~Path.is_file()`, :" "meth:`~Path.is_mount()`, :meth:`~Path.is_symlink()`, :meth:`~Path." @@ -676,14 +682,14 @@ msgstr "" "is_fifo()`、:meth:`~Path.is_socket()` 遇到路徑包含 OS 層無法表示的字元時現在" "會回傳 ``False`` 而不是引發例外。" -#: ../../library/pathlib.rst:808 +#: ../../library/pathlib.rst:812 msgid "" "Return a new path object representing the current directory (as returned by :" "func:`os.getcwd`)::" msgstr "" "回傳一個代表目前目錄的新的路徑物件(像 :func:`os.getcwd` 回傳的一樣): ::" -#: ../../library/pathlib.rst:817 +#: ../../library/pathlib.rst:821 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 " @@ -692,7 +698,7 @@ msgstr "" "回傳一個代表使用者家目錄的新的路徑物件(像以 ``~`` 構成的 :func:`os.path." "expanduser` 的回傳一樣)。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" -#: ../../library/pathlib.rst:831 +#: ../../library/pathlib.rst:835 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 " @@ -701,7 +707,7 @@ msgstr "" "回傳一個包含該路徑資訊的 :class:`os.stat_result` 物件,像 :func:`os.stat` 一" "樣。每次呼叫此方法都會重新查詢結果。" -#: ../../library/pathlib.rst:834 +#: ../../library/pathlib.rst:838 msgid "" "This method normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :meth:`~Path.lstat`." @@ -709,16 +715,16 @@ msgstr "" "此方法通常會跟隨 (follow) 符號連結;想要取得符號連結的資訊,可以加上引數 " "``follow_symlinks=False`` 或使用 :meth:`~Path.lstat`。" -#: ../../library/pathlib.rst:845 ../../library/pathlib.rst:865 -#: ../../library/pathlib.rst:886 +#: ../../library/pathlib.rst:849 ../../library/pathlib.rst:869 +#: ../../library/pathlib.rst:890 msgid "The *follow_symlinks* parameter was added." msgstr "新增 *follow_symlinks* 參數。" -#: ../../library/pathlib.rst:850 +#: ../../library/pathlib.rst:854 msgid "Change the file mode and permissions, like :func:`os.chmod`." msgstr "修改檔案模式 (file mode) 與權限,像 :func:`os.chmod` 一樣。" -#: ../../library/pathlib.rst:852 +#: ../../library/pathlib.rst:856 msgid "" "This method normally follows symlinks. Some Unix flavours support changing " "permissions on the symlink itself; on these platforms you may add the " @@ -727,11 +733,11 @@ msgstr "" "此方法通常會跟隨符號連結。一些 Unix 類型支援修改符號連結本身的權限;在這些平" "台上你可以加上引數 ``follow_symlinks=False`` 或使用 :meth:`~Path.lchmod`。" -#: ../../library/pathlib.rst:870 +#: ../../library/pathlib.rst:874 msgid "Return ``True`` if the path points to an existing file or directory." msgstr "如果路徑指向存在的檔案或目錄則回傳 ``True``。" -#: ../../library/pathlib.rst:872 +#: ../../library/pathlib.rst:876 msgid "" "This method normally follows symlinks; to check if a symlink exists, add the " "argument ``follow_symlinks=False``." @@ -739,7 +745,7 @@ msgstr "" "此方法通常會跟隨符號連結;如果想檢查符號連結是否存在,可以加上引數 " "``follow_symlinks=False``。" -#: ../../library/pathlib.rst:891 +#: ../../library/pathlib.rst:895 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:" @@ -748,7 +754,7 @@ msgstr "" "回傳一個展開 ``~`` 和 ``~user`` 構成的新路徑,像 :meth:`os.path.expanduser` " "回傳的一樣。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" -#: ../../library/pathlib.rst:906 +#: ../../library/pathlib.rst:910 msgid "" "Glob the given relative *pattern* in the directory represented by this path, " "yielding all matching files (of any kind)::" @@ -756,7 +762,7 @@ msgstr "" "在該路徑表示的目錄裡,以 glob 方式比對所給定的相對 *pattern*,並 yield 所有比" "對到的檔案(任意類型): ::" -#: ../../library/pathlib.rst:914 +#: ../../library/pathlib.rst:918 msgid "" "Patterns are the same as for :mod:`fnmatch`, with the addition of \"``**``\" " "which means \"this directory and all subdirectories, recursively\". In " @@ -765,7 +771,7 @@ msgstr "" "模式 (pattern) 和給 :mod:`fnmatch` 的一樣,加上 \"``**``\" 代表「目前目錄及所" "有遞迴的子目錄」。也就是說它能夠做遞迴的 glob 比對: ::" -#: ../../library/pathlib.rst:925 +#: ../../library/pathlib.rst:929 msgid "" "This method calls :meth:`Path.is_dir` on the top-level directory and " "propagates any :exc:`OSError` exception that is raised. Subsequent :exc:" @@ -774,7 +780,7 @@ msgstr "" "此方法在頂層目錄上呼叫 :meth:`Path.is_dir` 並傳遞引發的任何 :exc:`OSError` 例" "外。將會抑制在目錄對於 :exc:`OSError` 例外的後續掃描。" -#: ../../library/pathlib.rst:929 ../../library/pathlib.rst:1346 +#: ../../library/pathlib.rst:933 ../../library/pathlib.rst:1350 msgid "" "By default, or when the *case_sensitive* keyword-only argument is set to " "``None``, this method matches paths using platform-specific casing rules: " @@ -786,13 +792,13 @@ msgstr "" "在 Windows 上不區分大小寫。將 *case_sensitive* 設成 ``True`` 或 ``False`` 會" "覆寫這個行為。" -#: ../../library/pathlib.rst:935 +#: ../../library/pathlib.rst:939 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." msgstr "在很大的目錄樹裡使用 \"``**``\" 可能會耗費過多的時間。" -#: ../../library/pathlib.rst:938 +#: ../../library/pathlib.rst:942 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.glob`` with " "arguments ``self``, ``pattern``." @@ -800,7 +806,7 @@ msgstr "" "引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " "``pathlib.Path.glob``。" -#: ../../library/pathlib.rst:940 ../../library/pathlib.rst:1353 +#: ../../library/pathlib.rst:944 ../../library/pathlib.rst:1357 msgid "" "Return only directories if *pattern* ends with a pathname components " "separator (:data:`~os.sep` or :data:`~os.altsep`)." @@ -808,7 +814,7 @@ msgstr "" "如果 *pattern* 以路徑名稱組成的分隔符號(:data:`~os.sep` 或 :data:`~os." "altsep`)作結尾則只會回傳目錄。" -#: ../../library/pathlib.rst:950 +#: ../../library/pathlib.rst:954 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." @@ -816,7 +822,7 @@ msgstr "" "回傳擁有該檔案的群組名稱。如果在系統資料庫裡找不到檔案的 gid 會引發 :exc:" "`KeyError`。" -#: ../../library/pathlib.rst:956 +#: ../../library/pathlib.rst:960 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." @@ -824,9 +830,9 @@ msgstr "" "如果該路徑指向一個目錄(或者是一個指向目錄的符號連結)則回傳 ``True``,如果指" "向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:959 ../../library/pathlib.rst:968 -#: ../../library/pathlib.rst:1010 ../../library/pathlib.rst:1019 -#: ../../library/pathlib.rst:1028 ../../library/pathlib.rst:1037 +#: ../../library/pathlib.rst:963 ../../library/pathlib.rst:972 +#: ../../library/pathlib.rst:1014 ../../library/pathlib.rst:1023 +#: ../../library/pathlib.rst:1032 ../../library/pathlib.rst:1041 msgid "" "``False`` is also returned if the path doesn't exist or is a broken symlink; " "other errors (such as permission errors) are propagated." @@ -834,7 +840,7 @@ msgstr "" "如果路徑不存在或者是一個斷掉的符號連結則也會回傳 ``False``;其他錯誤(例如權" "限錯誤)則會傳遞出來。" -#: ../../library/pathlib.rst:965 +#: ../../library/pathlib.rst:969 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." @@ -842,7 +848,7 @@ msgstr "" "如果該路徑指向一個普通檔案(或者是一個指向普通檔案的符號連結)則回傳 " "``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:974 +#: ../../library/pathlib.rst:978 msgid "" "Return ``True`` if the path points to a junction, and ``False`` for any " "other type of file. Currently only Windows supports junctions." @@ -850,7 +856,7 @@ msgstr "" "如果該路徑指向一個連接點 (junction) 則回傳 ``True``,對其他類型的檔案則回傳 " "``False``。目前只有 Windows 支援連接點。" -#: ../../library/pathlib.rst:982 +#: ../../library/pathlib.rst:986 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 " @@ -868,23 +874,23 @@ msgstr "" "Windows 上,一個掛載點被視為一個根磁碟機字母(例如 ``c:\\``)、一個 UNC share" "(例如 ``\\\\server\\share``)或是掛載的檔案系統目錄。" -#: ../../library/pathlib.rst:993 +#: ../../library/pathlib.rst:997 msgid "Windows support was added." msgstr "加入對 Windows 的支援。" -#: ../../library/pathlib.rst:999 +#: ../../library/pathlib.rst:1003 msgid "" "Return ``True`` if the path points to a symbolic link, ``False`` otherwise." msgstr "如果該路徑指向一個符號連結則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/pathlib.rst:1001 +#: ../../library/pathlib.rst:1005 msgid "" "``False`` is also returned if the path doesn't exist; other errors (such as " "permission errors) are propagated." msgstr "" "如果該路徑不存在也會回傳 ``False``;其他錯誤(例如權限錯誤)則會傳遞出來。" -#: ../../library/pathlib.rst:1007 +#: ../../library/pathlib.rst:1011 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." @@ -892,7 +898,7 @@ msgstr "" "如果該路徑指向一個 Unix socket(或者是一個指向 Unix socket 的符號連結)則會回" "傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1016 +#: ../../library/pathlib.rst:1020 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." @@ -900,7 +906,7 @@ msgstr "" "如果該路徑指向一個 FIFO(或者是一個指向 FIFO 的符號連結)則會回傳 ``True``," "如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1025 +#: ../../library/pathlib.rst:1029 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." @@ -908,7 +914,7 @@ msgstr "" "如果該路徑指向一個區塊裝置 (block device)(或者是一個指向區塊裝置的符號連結)" "則會回傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1034 +#: ../../library/pathlib.rst:1038 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 " @@ -917,13 +923,13 @@ msgstr "" "如果該路徑指向一個字元裝置 (character device)(或者是一個指向字元裝置的符號連" "結)則會回傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1043 +#: ../../library/pathlib.rst:1047 msgid "" "When the path points to a directory, yield path objects of the directory " "contents::" msgstr "當該路徑指向一個目錄,會 yield 目錄裡面的路徑物件: ::" -#: ../../library/pathlib.rst:1057 +#: ../../library/pathlib.rst:1061 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 " @@ -934,13 +940,13 @@ msgstr "" "檔案在建立這個疊代器之後加到該目錄或從目錄刪除,是否會包含這個檔案的路徑物件" "是不確定的。" -#: ../../library/pathlib.rst:1064 +#: ../../library/pathlib.rst:1068 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up." msgstr "透過由上而下或由下而上地走訪目錄樹產生目錄樹裡的檔案名稱。" -#: ../../library/pathlib.rst:1067 +#: ../../library/pathlib.rst:1071 msgid "" "For each directory in the directory tree rooted at *self* (including *self* " "but excluding '.' and '..'), the method yields a 3-tuple of ``(dirpath, " @@ -949,7 +955,7 @@ msgstr "" "對每個以 *self* 為根且在目錄樹裡的目錄(包含 *self* 但不包含 '.' 和 '..' )," "此方法會 yield 一個 ``(dirpath, dirnames, filenames)`` 的三元素元組。" -#: ../../library/pathlib.rst:1071 +#: ../../library/pathlib.rst:1075 msgid "" "*dirpath* is a :class:`Path` to the directory currently being walked, " "*dirnames* is a list of strings for the names of subdirectories in *dirpath* " @@ -964,7 +970,7 @@ msgstr "" "裡檔案或目錄的完整路徑(以 *self* 開頭),可以使用 ``dirpath / name``。會根據" "檔案系統來決定串列是否有排序。" -#: ../../library/pathlib.rst:1079 +#: ../../library/pathlib.rst:1083 msgid "" "If the optional argument *top_down* is true (which is the default), the " "triple for a directory is generated before the triples for any of its " @@ -980,7 +986,7 @@ msgstr "" "不論 *top_down* 的值是什麼,子目錄的串列會在走訪該目錄及其子目錄的三元素元組" "之前取得。" -#: ../../library/pathlib.rst:1087 +#: ../../library/pathlib.rst:1091 msgid "" "When *top_down* is true, the caller can modify the *dirnames* list in-place " "(for example, using :keyword:`del` or slice assignment), and :meth:`Path." @@ -1000,7 +1006,7 @@ msgstr "" "*dirnames* 對 :meth:`Path.walk()` 的行為沒有影響,因為 *dirnames* 裡的目錄已" "經在 *dirnames* yield 給呼叫者之前被產生。" -#: ../../library/pathlib.rst:1097 +#: ../../library/pathlib.rst:1101 msgid "" "By default, errors from :func:`os.scandir` are ignored. If the optional " "argument *on_error* is specified, it should be a callable; it will be called " @@ -1013,7 +1019,7 @@ msgstr "" "這個可呼叫物件可以處理錯誤以繼續走訪,或者再次引發錯誤來停止走訪。注意,檔案" "名稱可以從例外物件的 ``filename`` 屬性來取得。" -#: ../../library/pathlib.rst:1103 +#: ../../library/pathlib.rst:1107 msgid "" "By default, :meth:`Path.walk` does not follow symbolic links, and instead " "adds them to the *filenames* list. Set *follow_symlinks* to true to resolve " @@ -1026,7 +1032,7 @@ msgstr "" "適當的 *dirnames* 和 *filenames*,而因此訪問到符號連結指向的目錄(在有支援符" "號連結的地方)。" -#: ../../library/pathlib.rst:1110 +#: ../../library/pathlib.rst:1114 msgid "" "Be aware that setting *follow_symlinks* to true can lead to infinite " "recursion if a link points to a parent directory of itself. :meth:`Path." @@ -1035,7 +1041,7 @@ msgstr "" "需要注意的是如果符號連結指向一個其本身的父目錄,則將 *follow_symlinks* 設定" "為 true 會導致無窮的遞迴。:meth:`Path.walk` 不會紀錄其已經訪問過的目錄。" -#: ../../library/pathlib.rst:1115 +#: ../../library/pathlib.rst:1119 msgid "" ":meth:`Path.walk` assumes the directories it walks are not modified during " "execution. For example, if a directory from *dirnames* has been replaced " @@ -1048,7 +1054,7 @@ msgstr "" "meth:`Path.walk` 依然會試著往下進入它。為了防止這樣的行為,可以從 *dirnames* " "適當地移除目錄。" -#: ../../library/pathlib.rst:1123 +#: ../../library/pathlib.rst:1127 msgid "" "Unlike :func:`os.walk`, :meth:`Path.walk` lists symlinks to directories in " "*filenames* if *follow_symlinks* is false." @@ -1056,7 +1062,7 @@ msgstr "" "如果 *follow_symlinks* 是 false,和 :func:`os.walk` 行為不同的是 :meth:`Path." "walk` 會將指向目錄的符號連結放在 *filenames* 串列。" -#: ../../library/pathlib.rst:1126 +#: ../../library/pathlib.rst:1130 msgid "" "This example displays the number of bytes used by all files in each " "directory, while ignoring ``__pycache__`` directories::" @@ -1064,7 +1070,7 @@ msgstr "" "這個範例會顯示在每個目錄裡所有檔案使用的位元組數量,同時間忽略 " "``__pycache__`` 目錄: ::" -#: ../../library/pathlib.rst:1142 +#: ../../library/pathlib.rst:1146 msgid "" "This next example is a simple implementation of :func:`shutil.rmtree`. " "Walking the tree bottom-up is essential as :func:`rmdir` doesn't allow " @@ -1073,7 +1079,7 @@ msgstr "" "下一個範例是 :func:`shutil.rmtree` 的一個簡單的實作方式。由下而上走訪目錄樹是" "必要的,因為 :func:`rmdir` 不允許在目錄為空之前刪除它: ::" -#: ../../library/pathlib.rst:1159 +#: ../../library/pathlib.rst:1163 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." @@ -1081,7 +1087,7 @@ msgstr "" "類似 :meth:`Path.chmod`,但如果該路徑指向一個符號連結,則符號連結的模式 " "(mode) 會被改變而不是其指向的目標。" -#: ../../library/pathlib.rst:1165 +#: ../../library/pathlib.rst:1169 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." @@ -1089,7 +1095,7 @@ msgstr "" "類似 :meth:`Path.stat`,但如果該路徑指向一個符號連結,則回傳符號連結的資訊而" "不是其指向的目標。" -#: ../../library/pathlib.rst:1171 +#: ../../library/pathlib.rst:1175 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 " @@ -1099,7 +1105,7 @@ msgstr "" "``umask`` 值來決定檔案模式與存取旗標 (access flag)。如果路徑已經存在,會引" "發 :exc:`FileExistsError`。" -#: ../../library/pathlib.rst:1176 +#: ../../library/pathlib.rst:1180 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* " @@ -1108,7 +1114,7 @@ msgstr "" "如果 *parents* 是 true,則任何缺少的父路徑都會依需要被建立;它們不考慮 " "*mode* 而會以預設的權限來建立(模仿 POSIX 的 ``mkdir -p`` 指令)。" -#: ../../library/pathlib.rst:1180 +#: ../../library/pathlib.rst:1184 msgid "" "If *parents* is false (the default), a missing parent raises :exc:" "`FileNotFoundError`." @@ -1116,7 +1122,7 @@ msgstr "" "如果 *parents* 是 false(預設值),缺少的父路徑會引發 :exc:" "`FileNotFoundError`。" -#: ../../library/pathlib.rst:1183 +#: ../../library/pathlib.rst:1187 msgid "" "If *exist_ok* is false (the default), :exc:`FileExistsError` is raised if " "the target directory already exists." @@ -1124,7 +1130,7 @@ msgstr "" "如果 *exist_ok* 是 false(預設值),則當目標目錄已經存在的話會引發 :exc:" "`FileExistsError`。" -#: ../../library/pathlib.rst:1186 +#: ../../library/pathlib.rst:1190 msgid "" "If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the " "given path already exists in the file system and is not a directory (same " @@ -1133,17 +1139,17 @@ msgstr "" "如果 *exist_ok* 是 true,只有當最後的路徑組成不是一個已存在的非目錄檔案,:" "exc:`FileExistsError` 例外會被忽略(與 POSIX 的 ``mkdir -p`` 指令行為相同)。" -#: ../../library/pathlib.rst:1190 +#: ../../library/pathlib.rst:1194 msgid "The *exist_ok* parameter was added." msgstr "新增 *exist_ok* 參數。" -#: ../../library/pathlib.rst:1196 +#: ../../library/pathlib.rst:1200 msgid "" "Open the file pointed to by the path, like the built-in :func:`open` " "function does::" msgstr "開啟該路徑指向的檔案,像內建的 :func:`open` 函式做的一樣: ::" -#: ../../library/pathlib.rst:1208 +#: ../../library/pathlib.rst:1212 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." @@ -1151,27 +1157,27 @@ msgstr "" "回傳擁有該檔案的用戶名稱。如果在系統資料庫中找不到該檔案的 uid,則會引發 :" "exc:`KeyError`。" -#: ../../library/pathlib.rst:1214 +#: ../../library/pathlib.rst:1218 msgid "Return the binary contents of the pointed-to file as a bytes object::" msgstr "將路徑指向的檔案的二進位內容以一個位元組物件回傳: ::" -#: ../../library/pathlib.rst:1227 +#: ../../library/pathlib.rst:1231 msgid "Return the decoded contents of the pointed-to file as a string::" msgstr "將路徑指向的檔案的解碼內容以字串形式回傳: ::" -#: ../../library/pathlib.rst:1235 +#: ../../library/pathlib.rst:1239 msgid "" "The file is opened and then closed. The optional parameters have the same " "meaning as in :func:`open`." msgstr "該檔案被打開並且隨後關閉。可選參數的含義與 :func:`open` 中的相同。" -#: ../../library/pathlib.rst:1243 +#: ../../library/pathlib.rst:1247 msgid "" "Return the path to which the symbolic link points (as returned by :func:`os." "readlink`)::" msgstr "回傳符號連結指向的路徑(如 :func:`os.readlink` 的回傳值): ::" -#: ../../library/pathlib.rst:1256 +#: ../../library/pathlib.rst:1260 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, " @@ -1184,7 +1190,7 @@ msgstr "" "則會在不顯示訊息的情況下進行取代。在 Windows 系統上,若 *target* 存在,則會引" "發 :exc:`FileExistsError` 錯誤。*target* 可以是字串或另一個路徑物件: ::" -#: ../../library/pathlib.rst:1271 ../../library/pathlib.rst:1287 +#: ../../library/pathlib.rst:1275 ../../library/pathlib.rst:1291 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 " @@ -1193,17 +1199,17 @@ msgstr "" "目標路徑可以是絕對路徑或相對路徑。相對路徑會相對於當前的工作目錄進行解釋,*而" "不是*\\ 相對於路徑物件所在的目錄。" -#: ../../library/pathlib.rst:1275 +#: ../../library/pathlib.rst:1279 msgid "" "It is implemented in terms of :func:`os.rename` and gives the same " "guarantees." msgstr "此功能是使用 :func:`os.rename` 實現的,並提供相同的保證。" -#: ../../library/pathlib.rst:1277 ../../library/pathlib.rst:1291 +#: ../../library/pathlib.rst:1281 ../../library/pathlib.rst:1295 msgid "Added return value, return the new Path instance." msgstr "新增了回傳值,回傳新的路徑 (Path) 物件。" -#: ../../library/pathlib.rst:1283 +#: ../../library/pathlib.rst:1287 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 " @@ -1212,26 +1218,26 @@ msgstr "" "將此檔案或目錄重新命名為給定的 *target*,並回傳一個指向 *target* 的新路徑物" "件。如果 *target* 指向一個現有的檔案或空目錄,它將被無條件地取代。" -#: ../../library/pathlib.rst:1297 +#: ../../library/pathlib.rst:1301 msgid "" "Make the path absolute, without normalization or resolving symlinks. Returns " "a new path object::" msgstr "" "將路徑轉換為絕對路徑,不進行標準化或解析符號連結。回傳一個新的路徑物件: ::" -#: ../../library/pathlib.rst:1309 +#: ../../library/pathlib.rst:1313 msgid "" "Make the path absolute, resolving any symlinks. A new path object is " "returned::" msgstr "將路徑轉換為絕對路徑,解析所有符號連結。回傳一個新的路徑物件: ::" -#: ../../library/pathlib.rst:1318 +#: ../../library/pathlib.rst:1322 msgid "" "\"``..``\" components are also eliminated (this is the only method to do " "so)::" msgstr "同時也會消除 \"``..``\" 的路徑組成(只有此方法這樣做): ::" -#: ../../library/pathlib.rst:1324 +#: ../../library/pathlib.rst:1328 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 " @@ -1243,11 +1249,11 @@ msgstr "" "*strict* 為 ``False``,則將盡可能解析該路徑,並將任何剩餘部分追加到路徑中,而" "不檢查其是否存在。如果在解析過程中遇到無窮迴圈,則引發 :exc:`RuntimeError`。" -#: ../../library/pathlib.rst:1330 +#: ../../library/pathlib.rst:1334 msgid "The *strict* parameter was added (pre-3.6 behavior is strict)." msgstr "新增 *strict* 參數(在 3.6 版本之前的行為是嚴格的)。" -#: ../../library/pathlib.rst:1335 +#: ../../library/pathlib.rst:1339 msgid "" "Glob the given relative *pattern* recursively. This is like calling :func:" "`Path.glob` with \"``**/``\" added in front of the *pattern*, where " @@ -1257,7 +1263,7 @@ msgstr "" "\"``**/``\" 並呼叫 :func:`Path.glob`,其中 *patterns* 和給 :mod:`fnmatch` 的" "相同: ::" -#: ../../library/pathlib.rst:1351 +#: ../../library/pathlib.rst:1355 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.rglob`` with " "arguments ``self``, ``pattern``." @@ -1265,11 +1271,11 @@ msgstr "" "引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " "``pathlib.Path.rglob``。" -#: ../../library/pathlib.rst:1363 +#: ../../library/pathlib.rst:1367 msgid "Remove this directory. The directory must be empty." msgstr "移除此目錄。該目錄必須為空。" -#: ../../library/pathlib.rst:1368 +#: ../../library/pathlib.rst:1372 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:" @@ -1279,17 +1285,17 @@ msgstr "" "物件或字串。其語義類似於 :func:`os.path.samefile` 和 :func:`os.path." "samestat`。" -#: ../../library/pathlib.rst:1372 +#: ../../library/pathlib.rst:1376 msgid "" "An :exc:`OSError` can be raised if either file cannot be accessed for some " "reason." msgstr "若任何一個檔案因為某些原因無法存取,則引發 :exc:`OSError`。" -#: ../../library/pathlib.rst:1389 +#: ../../library/pathlib.rst:1393 msgid "Make this path a symbolic link pointing to *target*." msgstr "使這個路徑成為一個指向 *target* 的符號連結。" -#: ../../library/pathlib.rst:1391 +#: ../../library/pathlib.rst:1395 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -1303,21 +1309,21 @@ msgstr "" "*target_is_directory* 是 ``True``,該符號連結會被建立成目錄,如果不是則建立成" "檔案(預設值)。在非 Windows 平台上,*target_is_directory* 會被忽略。" -#: ../../library/pathlib.rst:1409 +#: ../../library/pathlib.rst:1413 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.symlink`'s." msgstr "引數的順序 (link, target) 和 :func:`os.symlink` 相反。" -#: ../../library/pathlib.rst:1414 +#: ../../library/pathlib.rst:1418 msgid "Make this path a hard link to the same file as *target*." msgstr "使這個路徑成為與 *target* 相同檔案的一個硬連結 (hard link)。" -#: ../../library/pathlib.rst:1417 +#: ../../library/pathlib.rst:1421 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.link`'s." msgstr "引數的順序 (link, target) 和 :func:`os.link` 相反。" -#: ../../library/pathlib.rst:1425 +#: ../../library/pathlib.rst:1429 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. " @@ -1329,13 +1335,13 @@ msgstr "" "合,以確定檔案模式和存取旗標。當檔案已經存在時,若 *exist_ok* 為 true 則函式" "不會失敗(其變更時間會被更新為當下時間),否則會引發 :exc:`FileExistsError`。" -#: ../../library/pathlib.rst:1434 +#: ../../library/pathlib.rst:1438 msgid "" "Remove this file or symbolic link. If the path points to a directory, use :" "func:`Path.rmdir` instead." msgstr "移除這個檔案或符號連結。如果路徑指向目錄,請改用 :func:`Path.rmdir`。" -#: ../../library/pathlib.rst:1437 +#: ../../library/pathlib.rst:1441 msgid "" "If *missing_ok* is false (the default), :exc:`FileNotFoundError` is raised " "if the path does not exist." @@ -1343,7 +1349,7 @@ msgstr "" "如果 *missing_ok* 是 false(預設值),:exc:`FileNotFoundError` 會在路徑不存在" "時被引發。" -#: ../../library/pathlib.rst:1440 +#: ../../library/pathlib.rst:1444 msgid "" "If *missing_ok* is true, :exc:`FileNotFoundError` exceptions will be ignored " "(same behavior as the POSIX ``rm -f`` command)." @@ -1351,42 +1357,42 @@ msgstr "" "如果 *missing_ok* 是 true,:exc:`FileNotFoundError` 例外會被忽略(行為與 " "POSIX ``rm -f`` 指令相同)。" -#: ../../library/pathlib.rst:1443 +#: ../../library/pathlib.rst:1447 msgid "The *missing_ok* parameter was added." msgstr "新增 *missing_ok* 參數。" -#: ../../library/pathlib.rst:1449 +#: ../../library/pathlib.rst:1453 msgid "" "Open the file pointed to in bytes mode, write *data* to it, and close the " "file::" msgstr "以位元組模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" -#: ../../library/pathlib.rst:1458 +#: ../../library/pathlib.rst:1462 msgid "An existing file of the same name is overwritten." msgstr "一個名稱相同的已存在檔案會被覆寫。" -#: ../../library/pathlib.rst:1465 +#: ../../library/pathlib.rst:1469 msgid "" "Open the file pointed to in text mode, write *data* to it, and close the " "file::" msgstr "以文字模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" -#: ../../library/pathlib.rst:1474 +#: ../../library/pathlib.rst:1478 msgid "" "An existing file of the same name is overwritten. The optional parameters " "have the same meaning as in :func:`open`." msgstr "" "一個名稱相同的已存在檔案會被覆寫。可選參數和 :func:`open` 的參數有相同意義。" -#: ../../library/pathlib.rst:1479 +#: ../../library/pathlib.rst:1483 msgid "The *newline* parameter was added." msgstr "新增 *newline* 參數。" -#: ../../library/pathlib.rst:1483 +#: ../../library/pathlib.rst:1487 msgid "Correspondence to tools in the :mod:`os` module" msgstr "與 :mod:`os` 模組裡的工具的對應關係" -#: ../../library/pathlib.rst:1485 +#: ../../library/pathlib.rst:1489 msgid "" "Below is a table mapping various :mod:`os` functions to their corresponding :" "class:`PurePath`/:class:`Path` equivalent." @@ -1394,7 +1400,7 @@ msgstr "" "以下是一張表格,對應許多 :mod:`os` 函式及其相符於 :class:`PurePath`/:class:" "`Path` 的項目。" -#: ../../library/pathlib.rst:1490 +#: ../../library/pathlib.rst:1494 msgid "" "Not all pairs of functions/methods below are equivalent. Some of them, " "despite having some overlapping use-cases, have different semantics. They " @@ -1405,239 +1411,239 @@ msgstr "" "意。它們包含 :func:`os.path.abspath` 和 :meth:`Path.absolute`、:func:`os." "path.relpath` 和 :meth:`PurePath.relative_to`。" -#: ../../library/pathlib.rst:1496 +#: ../../library/pathlib.rst:1500 msgid ":mod:`os` and :mod:`os.path`" msgstr ":mod:`os` 和 :mod:`os.path`" -#: ../../library/pathlib.rst:1496 +#: ../../library/pathlib.rst:1500 msgid ":mod:`pathlib`" msgstr ":mod:`pathlib`" -#: ../../library/pathlib.rst:1498 +#: ../../library/pathlib.rst:1502 msgid ":func:`os.path.abspath`" msgstr ":func:`os.path.abspath`" -#: ../../library/pathlib.rst:1498 +#: ../../library/pathlib.rst:1502 msgid ":meth:`Path.absolute` [#]_" msgstr ":meth:`Path.absolute` [#]_" -#: ../../library/pathlib.rst:1499 +#: ../../library/pathlib.rst:1503 msgid ":func:`os.path.realpath`" msgstr ":func:`os.path.realpath`" -#: ../../library/pathlib.rst:1499 +#: ../../library/pathlib.rst:1503 msgid ":meth:`Path.resolve`" msgstr ":meth:`Path.resolve`" -#: ../../library/pathlib.rst:1500 +#: ../../library/pathlib.rst:1504 msgid ":func:`os.chmod`" msgstr ":func:`os.chmod`" -#: ../../library/pathlib.rst:1500 +#: ../../library/pathlib.rst:1504 msgid ":meth:`Path.chmod`" msgstr ":meth:`Path.chmod`" -#: ../../library/pathlib.rst:1501 +#: ../../library/pathlib.rst:1505 msgid ":func:`os.mkdir`" msgstr ":func:`os.mkdir`" -#: ../../library/pathlib.rst:1501 ../../library/pathlib.rst:1502 +#: ../../library/pathlib.rst:1505 ../../library/pathlib.rst:1506 msgid ":meth:`Path.mkdir`" msgstr ":meth:`Path.mkdir`" -#: ../../library/pathlib.rst:1502 +#: ../../library/pathlib.rst:1506 msgid ":func:`os.makedirs`" msgstr ":func:`os.makedirs`" -#: ../../library/pathlib.rst:1503 +#: ../../library/pathlib.rst:1507 msgid ":func:`os.rename`" msgstr ":func:`os.rename`" -#: ../../library/pathlib.rst:1503 +#: ../../library/pathlib.rst:1507 msgid ":meth:`Path.rename`" msgstr ":meth:`Path.rename`" -#: ../../library/pathlib.rst:1504 +#: ../../library/pathlib.rst:1508 msgid ":func:`os.replace`" msgstr ":func:`os.replace`" -#: ../../library/pathlib.rst:1504 +#: ../../library/pathlib.rst:1508 msgid ":meth:`Path.replace`" msgstr ":meth:`Path.replace`" -#: ../../library/pathlib.rst:1505 +#: ../../library/pathlib.rst:1509 msgid ":func:`os.rmdir`" msgstr ":func:`os.rmdir`" -#: ../../library/pathlib.rst:1505 +#: ../../library/pathlib.rst:1509 msgid ":meth:`Path.rmdir`" msgstr ":meth:`Path.rmdir`" -#: ../../library/pathlib.rst:1506 +#: ../../library/pathlib.rst:1510 msgid ":func:`os.remove`, :func:`os.unlink`" msgstr ":func:`os.remove`、:func:`os.unlink`" -#: ../../library/pathlib.rst:1506 +#: ../../library/pathlib.rst:1510 msgid ":meth:`Path.unlink`" msgstr ":meth:`Path.unlink`" -#: ../../library/pathlib.rst:1507 +#: ../../library/pathlib.rst:1511 msgid ":func:`os.getcwd`" msgstr ":func:`os.getcwd`" -#: ../../library/pathlib.rst:1507 +#: ../../library/pathlib.rst:1511 msgid ":func:`Path.cwd`" msgstr ":func:`Path.cwd`" -#: ../../library/pathlib.rst:1508 +#: ../../library/pathlib.rst:1512 msgid ":func:`os.path.exists`" msgstr ":func:`os.path.exists`" -#: ../../library/pathlib.rst:1508 +#: ../../library/pathlib.rst:1512 msgid ":meth:`Path.exists`" msgstr ":meth:`Path.exists`" -#: ../../library/pathlib.rst:1509 +#: ../../library/pathlib.rst:1513 msgid ":func:`os.path.expanduser`" msgstr ":func:`os.path.expanduser`" -#: ../../library/pathlib.rst:1509 +#: ../../library/pathlib.rst:1513 msgid ":meth:`Path.expanduser` and :meth:`Path.home`" msgstr ":meth:`Path.expanduser` 和 :meth:`Path.home`" -#: ../../library/pathlib.rst:1511 +#: ../../library/pathlib.rst:1515 msgid ":func:`os.listdir`" msgstr ":func:`os.listdir`" -#: ../../library/pathlib.rst:1511 +#: ../../library/pathlib.rst:1515 msgid ":meth:`Path.iterdir`" msgstr ":meth:`Path.iterdir`" -#: ../../library/pathlib.rst:1512 +#: ../../library/pathlib.rst:1516 msgid ":func:`os.walk`" msgstr ":func:`os.walk`" -#: ../../library/pathlib.rst:1512 +#: ../../library/pathlib.rst:1516 msgid ":meth:`Path.walk`" msgstr ":meth:`Path.walk`" -#: ../../library/pathlib.rst:1513 +#: ../../library/pathlib.rst:1517 msgid ":func:`os.path.isdir`" msgstr ":func:`os.path.isdir`" -#: ../../library/pathlib.rst:1513 +#: ../../library/pathlib.rst:1517 msgid ":meth:`Path.is_dir`" msgstr ":meth:`Path.is_dir`" -#: ../../library/pathlib.rst:1514 +#: ../../library/pathlib.rst:1518 msgid ":func:`os.path.isfile`" msgstr ":func:`os.path.isfile`" -#: ../../library/pathlib.rst:1514 +#: ../../library/pathlib.rst:1518 msgid ":meth:`Path.is_file`" msgstr ":meth:`Path.is_file`" -#: ../../library/pathlib.rst:1515 +#: ../../library/pathlib.rst:1519 msgid ":func:`os.path.islink`" msgstr ":func:`os.path.islink`" -#: ../../library/pathlib.rst:1515 +#: ../../library/pathlib.rst:1519 msgid ":meth:`Path.is_symlink`" msgstr ":meth:`Path.is_symlink`" -#: ../../library/pathlib.rst:1516 +#: ../../library/pathlib.rst:1520 msgid ":func:`os.link`" msgstr ":func:`os.link`" -#: ../../library/pathlib.rst:1516 +#: ../../library/pathlib.rst:1520 msgid ":meth:`Path.hardlink_to`" msgstr ":meth:`Path.hardlink_to`" -#: ../../library/pathlib.rst:1517 +#: ../../library/pathlib.rst:1521 msgid ":func:`os.symlink`" msgstr ":func:`os.symlink`" -#: ../../library/pathlib.rst:1517 +#: ../../library/pathlib.rst:1521 msgid ":meth:`Path.symlink_to`" msgstr ":meth:`Path.symlink_to`" -#: ../../library/pathlib.rst:1518 +#: ../../library/pathlib.rst:1522 msgid ":func:`os.readlink`" msgstr ":func:`os.readlink`" -#: ../../library/pathlib.rst:1518 +#: ../../library/pathlib.rst:1522 msgid ":meth:`Path.readlink`" msgstr ":meth:`Path.readlink`" -#: ../../library/pathlib.rst:1519 +#: ../../library/pathlib.rst:1523 msgid ":func:`os.path.relpath`" msgstr ":func:`os.path.relpath`" -#: ../../library/pathlib.rst:1519 +#: ../../library/pathlib.rst:1523 msgid ":meth:`PurePath.relative_to` [#]_" msgstr ":meth:`PurePath.relative_to` [#]_" -#: ../../library/pathlib.rst:1520 +#: ../../library/pathlib.rst:1524 msgid ":func:`os.stat`" msgstr ":func:`os.stat`" -#: ../../library/pathlib.rst:1520 +#: ../../library/pathlib.rst:1524 msgid ":meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group`" msgstr ":meth:`Path.stat`、:meth:`Path.owner`、:meth:`Path.group`" -#: ../../library/pathlib.rst:1523 +#: ../../library/pathlib.rst:1527 msgid ":func:`os.path.isabs`" msgstr ":func:`os.path.isabs`" -#: ../../library/pathlib.rst:1523 +#: ../../library/pathlib.rst:1527 msgid ":meth:`PurePath.is_absolute`" msgstr ":meth:`PurePath.is_absolute`" -#: ../../library/pathlib.rst:1524 +#: ../../library/pathlib.rst:1528 msgid ":func:`os.path.join`" msgstr ":func:`os.path.join`" -#: ../../library/pathlib.rst:1524 +#: ../../library/pathlib.rst:1528 msgid ":func:`PurePath.joinpath`" msgstr ":func:`PurePath.joinpath`" -#: ../../library/pathlib.rst:1525 +#: ../../library/pathlib.rst:1529 msgid ":func:`os.path.basename`" msgstr ":func:`os.path.basename`" -#: ../../library/pathlib.rst:1525 +#: ../../library/pathlib.rst:1529 msgid ":attr:`PurePath.name`" msgstr ":attr:`PurePath.name`" -#: ../../library/pathlib.rst:1526 +#: ../../library/pathlib.rst:1530 msgid ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`" -#: ../../library/pathlib.rst:1526 +#: ../../library/pathlib.rst:1530 msgid ":attr:`PurePath.parent`" msgstr ":attr:`PurePath.parent`" -#: ../../library/pathlib.rst:1527 +#: ../../library/pathlib.rst:1531 msgid ":func:`os.path.samefile`" msgstr ":func:`os.path.samefile`" -#: ../../library/pathlib.rst:1527 +#: ../../library/pathlib.rst:1531 msgid ":meth:`Path.samefile`" msgstr ":meth:`Path.samefile`" -#: ../../library/pathlib.rst:1528 +#: ../../library/pathlib.rst:1532 msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" -#: ../../library/pathlib.rst:1528 +#: ../../library/pathlib.rst:1532 msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`" msgstr ":attr:`PurePath.stem` 和 :attr:`PurePath.suffix`" -#: ../../library/pathlib.rst:1533 +#: ../../library/pathlib.rst:1537 msgid "Footnotes" msgstr "註解" -#: ../../library/pathlib.rst:1534 +#: ../../library/pathlib.rst:1538 msgid "" ":func:`os.path.abspath` normalizes the resulting path, which may change its " "meaning in the presence of symlinks, while :meth:`Path.absolute` does not." @@ -1645,7 +1651,7 @@ msgstr "" ":func:`os.path.abspath` 會標準化產生的路徑,因而當有符號連結的時候會改變其意" "義,但 :meth:`Path.absolute` 不會。" -#: ../../library/pathlib.rst:1535 +#: ../../library/pathlib.rst:1539 msgid "" ":meth:`PurePath.relative_to` requires ``self`` to be the subpath of the " "argument, but :func:`os.path.relpath` does not." From 35bc74bdbd149a315594c9123488fd4e64d805f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 00:05:01 +0000 Subject: [PATCH 04/13] sync with cpython 5bf7f5c6 --- library/functools.po | 38 +++++++++++++++++++++----------------- library/shutil.po | 5 +++-- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/library/functools.po b/library/functools.po index 96a5a28af3a..a0c05bc8140 100644 --- a/library/functools.po +++ b/library/functools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-14 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:02+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -551,12 +551,12 @@ msgid "" "corresponding attributes from the original function. The default values for " "these arguments are the module level constants ``WRAPPER_ASSIGNMENTS`` " "(which assigns to the wrapper function's ``__module__``, ``__name__``, " -"``__qualname__``, ``__annotations__`` and ``__doc__``, the documentation " -"string) and ``WRAPPER_UPDATES`` (which updates the wrapper function's " -"``__dict__``, i.e. the instance dictionary)." +"``__qualname__``, ``__annotations__``, ``__type_params__``, and ``__doc__``, " +"the documentation string) and ``WRAPPER_UPDATES`` (which updates the wrapper " +"function's ``__dict__``, i.e. the instance dictionary)." msgstr "" -#: ../../library/functools.rst:651 +#: ../../library/functools.rst:652 msgid "" "To allow access to the original function for introspection and other " "purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), " @@ -564,7 +564,7 @@ msgid "" "that refers to the function being wrapped." msgstr "" -#: ../../library/functools.rst:656 +#: ../../library/functools.rst:657 msgid "" "The main intended use for this function is in :term:`decorator` functions " "which wrap the decorated function and return the wrapper. If the wrapper " @@ -573,7 +573,7 @@ msgid "" "is typically less than helpful." msgstr "" -#: ../../library/functools.rst:662 +#: ../../library/functools.rst:663 msgid "" ":func:`update_wrapper` may be used with callables other than functions. Any " "attributes named in *assigned* or *updated* that are missing from the object " @@ -582,21 +582,25 @@ msgid "" "wrapper function itself is missing any attributes named in *updated*." msgstr "" -#: ../../library/functools.rst:668 +#: ../../library/functools.rst:669 msgid "" "The ``__wrapped__`` attribute is now automatically added. The " "``__annotations__`` attribute is now copied by default. Missing attributes " "no longer trigger an :exc:`AttributeError`." msgstr "" -#: ../../library/functools.rst:673 +#: ../../library/functools.rst:674 msgid "" "The ``__wrapped__`` attribute now always refers to the wrapped function, " "even if that function defined a ``__wrapped__`` attribute. (see :issue:" "`17482`)" msgstr "" -#: ../../library/functools.rst:681 +#: ../../library/functools.rst:679 +msgid "The ``__type_params__`` attribute is now copied by default." +msgstr "" + +#: ../../library/functools.rst:685 msgid "" "This is a convenience function for invoking :func:`update_wrapper` as a " "function decorator when defining a wrapper function. It is equivalent to " @@ -604,42 +608,42 @@ msgid "" "updated=updated)``. For example::" msgstr "" -#: ../../library/functools.rst:707 +#: ../../library/functools.rst:711 msgid "" "Without the use of this decorator factory, the name of the example function " "would have been ``'wrapper'``, and the docstring of the original :func:" "`example` would have been lost." msgstr "" -#: ../../library/functools.rst:715 +#: ../../library/functools.rst:719 msgid ":class:`partial` Objects" msgstr ":class:`partial` 物件" -#: ../../library/functools.rst:717 +#: ../../library/functools.rst:721 msgid "" ":class:`partial` objects are callable objects created by :func:`partial`. " "They have three read-only attributes:" msgstr "" -#: ../../library/functools.rst:723 +#: ../../library/functools.rst:727 msgid "" "A callable object or function. Calls to the :class:`partial` object will be " "forwarded to :attr:`func` with new arguments and keywords." msgstr "" -#: ../../library/functools.rst:729 +#: ../../library/functools.rst:733 msgid "" "The leftmost positional arguments that will be prepended to the positional " "arguments provided to a :class:`partial` object call." msgstr "" -#: ../../library/functools.rst:735 +#: ../../library/functools.rst:739 msgid "" "The keyword arguments that will be supplied when the :class:`partial` object " "is called." msgstr "" -#: ../../library/functools.rst:738 +#: ../../library/functools.rst:742 msgid "" ":class:`partial` objects are like :class:`function` objects in that they are " "callable, weak referenceable, and can have attributes. There are some " diff --git a/library/shutil.po b/library/shutil.po index fdb5de38fc8..fa6da4fbdb7 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-14 00:03+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-" @@ -442,7 +442,8 @@ msgid "" msgstr "" #: ../../library/shutil.rst:340 -msgid "The *dir_fd* parameter." +#, fuzzy +msgid "Added the *dir_fd* parameter." msgstr "*dir_fd* 參數。" #: ../../library/shutil.rst:343 From 411aeb6e7b92c3b0c8a56a79fed5c40b4e6c0c20 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 May 2024 00:05:31 +0000 Subject: [PATCH 05/13] sync with cpython bac277f1 --- library/itertools.po | 132 +++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 69 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index e2f951bd59b..2a573fbbd8c 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-15 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -445,9 +445,10 @@ msgid "" msgstr "" #: ../../library/itertools.rst:118 ../../library/itertools.rst:191 -#: ../../library/itertools.rst:242 ../../library/itertools.rst:291 -#: ../../library/itertools.rst:491 ../../library/itertools.rst:520 -#: ../../library/itertools.rst:549 ../../library/itertools.rst:629 +#: ../../library/itertools.rst:240 ../../library/itertools.rst:289 +#: ../../library/itertools.rst:489 ../../library/itertools.rst:518 +#: ../../library/itertools.rst:547 ../../library/itertools.rst:627 +#: ../../library/itertools.rst:689 msgid "Roughly equivalent to::" msgstr "大致等價於: ::" @@ -495,69 +496,69 @@ msgid "" "sequence. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:220 +#: ../../library/itertools.rst:219 msgid "" "Alternate constructor for :func:`chain`. Gets chained inputs from a single " "iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:232 +#: ../../library/itertools.rst:230 msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:234 ../../library/itertools.rst:283 +#: ../../library/itertools.rst:232 ../../library/itertools.rst:281 msgid "" "The combination tuples are emitted in lexicographic ordering according to " "the order of the input *iterable*. So, if the input *iterable* is sorted, " "the output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:238 +#: ../../library/itertools.rst:236 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, there will be no repeated values in " "each combination." msgstr "" -#: ../../library/itertools.rst:264 +#: ../../library/itertools.rst:262 msgid "" "The code for :func:`combinations` can be also expressed as a subsequence of :" "func:`permutations` after filtering entries where the elements are not in " "sorted order (according to their position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:275 +#: ../../library/itertools.rst:273 msgid "" "The number of items returned is ``n! / r! / (n-r)!`` when ``0 <= r <= n`` or " "zero when ``r > n``." msgstr "" -#: ../../library/itertools.rst:280 +#: ../../library/itertools.rst:278 msgid "" "Return *r* length subsequences of elements from the input *iterable* " "allowing individual elements to be repeated more than once." msgstr "" -#: ../../library/itertools.rst:287 +#: ../../library/itertools.rst:285 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, the generated combinations will also be " "unique." msgstr "" -#: ../../library/itertools.rst:310 +#: ../../library/itertools.rst:308 msgid "" "The code for :func:`combinations_with_replacement` can be also expressed as " "a subsequence of :func:`product` after filtering entries where the elements " "are not in sorted order (according to their position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:321 +#: ../../library/itertools.rst:319 msgid "" "The number of items returned is ``(n+r-1)! / r! / (n-1)!`` when ``n > 0``." msgstr "" -#: ../../library/itertools.rst:328 +#: ../../library/itertools.rst:326 msgid "" "Make an iterator that filters elements from *data* returning only those that " "have a corresponding element in *selectors* that evaluates to ``True``. " @@ -565,7 +566,7 @@ msgid "" "Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:342 +#: ../../library/itertools.rst:340 msgid "" "Make an iterator that returns evenly spaced values starting with number " "*start*. Often used as an argument to :func:`map` to generate consecutive " @@ -573,31 +574,31 @@ msgid "" "equivalent to::" msgstr "" -#: ../../library/itertools.rst:354 +#: ../../library/itertools.rst:352 msgid "" "When counting with floating point numbers, better accuracy can sometimes be " "achieved by substituting multiplicative code such as: ``(start + step * i " "for i in count())``." msgstr "" -#: ../../library/itertools.rst:358 +#: ../../library/itertools.rst:356 msgid "Added *step* argument and allowed non-integer arguments." msgstr "新增 *step* 引數並允許非整數引數。" -#: ../../library/itertools.rst:363 +#: ../../library/itertools.rst:361 msgid "" "Make an iterator returning elements from the iterable and saving a copy of " "each. When the iterable is exhausted, return elements from the saved copy. " "Repeats indefinitely. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:377 +#: ../../library/itertools.rst:375 msgid "" "Note, this member of the toolkit may require significant auxiliary storage " "(depending on the length of the iterable)." msgstr "" -#: ../../library/itertools.rst:383 +#: ../../library/itertools.rst:381 msgid "" "Make an iterator that drops elements from the iterable as long as the " "predicate is true; afterwards, returns every element. Note, the iterator " @@ -605,14 +606,14 @@ msgid "" "may have a lengthy start-up time. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:400 +#: ../../library/itertools.rst:398 msgid "" "Make an iterator that filters elements from iterable returning only those " "for which the predicate is false. If *predicate* is ``None``, return the " "items that are false. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:415 +#: ../../library/itertools.rst:413 msgid "" "Make an iterator that returns consecutive keys and groups from the " "*iterable*. The *key* is a function computing a key value for each element. " @@ -621,7 +622,7 @@ msgid "" "sorted on the same key function." msgstr "" -#: ../../library/itertools.rst:421 +#: ../../library/itertools.rst:419 msgid "" "The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. " "It generates a break or new group every time the value of the key function " @@ -630,7 +631,7 @@ msgid "" "aggregates common elements regardless of their input order." msgstr "" -#: ../../library/itertools.rst:427 +#: ../../library/itertools.rst:425 msgid "" "The returned group is itself an iterator that shares the underlying iterable " "with :func:`groupby`. Because the source is shared, when the :func:" @@ -638,14 +639,14 @@ msgid "" "if that data is needed later, it should be stored as a list::" msgstr "" -#: ../../library/itertools.rst:439 +#: ../../library/itertools.rst:437 msgid ":func:`groupby` is roughly equivalent to::" msgstr "" ":func:`groupby` 大致等價於:\n" "\n" "::" -#: ../../library/itertools.rst:476 +#: ../../library/itertools.rst:474 msgid "" "Make an iterator that returns selected elements from the iterable. If " "*start* is non-zero, then elements from the iterable are skipped until start " @@ -655,13 +656,13 @@ msgid "" "all; otherwise, it stops at the specified position." msgstr "" -#: ../../library/itertools.rst:483 +#: ../../library/itertools.rst:481 msgid "" "If *start* is ``None``, then iteration starts at zero. If *step* is " "``None``, then the step defaults to one." msgstr "" -#: ../../library/itertools.rst:486 +#: ../../library/itertools.rst:484 msgid "" "Unlike regular slicing, :func:`islice` does not support negative values for " "*start*, *stop*, or *step*. Can be used to extract related fields from data " @@ -669,67 +670,67 @@ msgid "" "report may list a name field on every third line)." msgstr "" -#: ../../library/itertools.rst:514 +#: ../../library/itertools.rst:512 msgid "Return successive overlapping pairs taken from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:516 +#: ../../library/itertools.rst:514 msgid "" "The number of 2-tuples in the output iterator will be one fewer than the " "number of inputs. It will be empty if the input iterable has fewer than two " "values." msgstr "" -#: ../../library/itertools.rst:535 +#: ../../library/itertools.rst:533 msgid "" "Return successive *r* length permutations of elements in the *iterable*." msgstr "" -#: ../../library/itertools.rst:537 +#: ../../library/itertools.rst:535 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" -#: ../../library/itertools.rst:541 +#: ../../library/itertools.rst:539 msgid "" "The permutation tuples are emitted in lexicographic order according to the " "order of the input *iterable*. So, if the input *iterable* is sorted, the " "output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:545 +#: ../../library/itertools.rst:543 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, there will be no repeated values within " "a permutation." msgstr "" -#: ../../library/itertools.rst:576 +#: ../../library/itertools.rst:574 msgid "" "The code for :func:`permutations` can be also expressed as a subsequence of :" "func:`product`, filtered to exclude entries with repeated elements (those " "from the same position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:588 +#: ../../library/itertools.rst:586 msgid "" "The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero " "when ``r > n``." msgstr "" -#: ../../library/itertools.rst:593 +#: ../../library/itertools.rst:591 msgid "Cartesian product of input iterables." msgstr "" -#: ../../library/itertools.rst:595 +#: ../../library/itertools.rst:593 msgid "" "Roughly equivalent to nested for-loops in a generator expression. For " "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" -#: ../../library/itertools.rst:598 +#: ../../library/itertools.rst:596 msgid "" "The nested loops cycle like an odometer with the rightmost element advancing " "on every iteration. This pattern creates a lexicographic ordering so that " @@ -737,39 +738,39 @@ msgid "" "sorted order." msgstr "" -#: ../../library/itertools.rst:603 +#: ../../library/itertools.rst:601 msgid "" "To compute the product of an iterable with itself, specify the number of " "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" -#: ../../library/itertools.rst:607 +#: ../../library/itertools.rst:605 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" -#: ../../library/itertools.rst:620 +#: ../../library/itertools.rst:618 msgid "" "Before :func:`product` runs, it completely consumes the input iterables, " "keeping pools of values in memory to generate the products. Accordingly, it " "is only useful with finite inputs." msgstr "" -#: ../../library/itertools.rst:626 +#: ../../library/itertools.rst:624 msgid "" "Make an iterator that returns *object* over and over again. Runs " "indefinitely unless the *times* argument is specified." msgstr "" -#: ../../library/itertools.rst:640 +#: ../../library/itertools.rst:638 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " "or *zip*:" msgstr "" -#: ../../library/itertools.rst:650 +#: ../../library/itertools.rst:648 msgid "" "Make an iterator that computes the function using arguments obtained from " "the iterable. Used instead of :func:`map` when argument parameters are " @@ -777,20 +778,20 @@ msgid "" "\"pre-zipped\")." msgstr "" -#: ../../library/itertools.rst:655 +#: ../../library/itertools.rst:653 msgid "" "The difference between :func:`map` and :func:`starmap` parallels the " "distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" -#: ../../library/itertools.rst:667 +#: ../../library/itertools.rst:665 msgid "" "Make an iterator that returns elements from the iterable as long as the " "predicate is true. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:678 +#: ../../library/itertools.rst:676 msgid "" "Note, the element that first fails the predicate condition is consumed from " "the input iterator and there is no way to access it. This could be an issue " @@ -800,32 +801,25 @@ msgid "" "io/en/stable/api.html#more_itertools.before_and_after>`_ instead." msgstr "" -#: ../../library/itertools.rst:689 +#: ../../library/itertools.rst:687 msgid "Return *n* independent iterators from a single iterable." msgstr "" -#: ../../library/itertools.rst:691 -msgid "" -"The following Python code helps explain what *tee* does (although the actual " -"implementation is more complex and uses only a single underlying :abbr:`FIFO " -"(first-in, first-out)` queue)::" -msgstr "" - -#: ../../library/itertools.rst:710 +#: ../../library/itertools.rst:706 msgid "" "Once a :func:`tee` has been created, the original *iterable* should not be " "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" -#: ../../library/itertools.rst:714 +#: ../../library/itertools.rst:710 msgid "" "``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be raised " "when simultaneously using iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" -#: ../../library/itertools.rst:718 +#: ../../library/itertools.rst:714 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " @@ -833,7 +827,7 @@ msgid "" "func:`list` instead of :func:`tee`." msgstr "" -#: ../../library/itertools.rst:726 +#: ../../library/itertools.rst:722 msgid "" "Make an iterator that aggregates elements from each of the iterables. If the " "iterables are of uneven length, missing values are filled-in with " @@ -841,7 +835,7 @@ msgid "" "Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:750 +#: ../../library/itertools.rst:746 msgid "" "If one of the iterables is potentially infinite, then the :func:" "`zip_longest` function should be wrapped with something that limits the " @@ -849,17 +843,17 @@ msgid "" "specified, *fillvalue* defaults to ``None``." msgstr "" -#: ../../library/itertools.rst:759 +#: ../../library/itertools.rst:755 msgid "Itertools Recipes" msgstr "" -#: ../../library/itertools.rst:761 +#: ../../library/itertools.rst:757 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" -#: ../../library/itertools.rst:764 +#: ../../library/itertools.rst:760 msgid "" "The primary purpose of the itertools recipes is educational. The recipes " "show various ways of thinking about individual tools — for example, that " @@ -871,7 +865,7 @@ msgid "" "``map()``, ``filter()``, ``reversed()``, and ``enumerate()``." msgstr "" -#: ../../library/itertools.rst:773 +#: ../../library/itertools.rst:769 msgid "" "A secondary purpose of the recipes is to serve as an incubator. The " "``accumulate()``, ``compress()``, and ``pairwise()`` itertools started out " @@ -879,13 +873,13 @@ msgid "" "``sieve()`` recipes are being tested to see whether they prove their worth." msgstr "" -#: ../../library/itertools.rst:778 +#: ../../library/itertools.rst:774 msgid "" "Substantially all of these recipes and many, many others can be installed " "from the :pypi:`more-itertools` project found on the Python Package Index::" msgstr "" -#: ../../library/itertools.rst:784 +#: ../../library/itertools.rst:780 msgid "" "Many of the recipes offer the same high performance as the underlying " "toolset. Superior memory performance is kept by processing elements one at a " @@ -897,6 +891,6 @@ msgid "" "overhead." msgstr "" -#: ../../library/itertools.rst:965 +#: ../../library/itertools.rst:956 msgid "The following recipes have a more mathematical flavor:" msgstr "" From 97784a8c06e9bddab61051fc5a677f6676b373cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 May 2024 00:04:50 +0000 Subject: [PATCH 06/13] sync with cpython a3db4e8f --- library/dataclasses.po | 59 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/library/dataclasses.po b/library/dataclasses.po index 57eab8d9882..b660424c63e 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-17 00:03+0000\n" "PO-Revision-Date: 2023-02-11 15:02+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -951,16 +951,17 @@ msgstr "" msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`~object.__init__` cannot use simple assignment to initialize fields, and " -"must use :meth:`!__setattr__`." +"must use :meth:`!object.__setattr__`. .. Make sure to not remove \"object\" " +"from \"object.__setattr__\" in the above markup" msgstr "" "使用 ``frozen=True`` 時有一個微小的性能損失::meth:`~object.__init__` 不能使" "用簡單賦值來初始化欄位,必須使用 :meth:`!__setattr__`。" -#: ../../library/dataclasses.rst:621 +#: ../../library/dataclasses.rst:622 msgid "Inheritance" msgstr "繼承" -#: ../../library/dataclasses.rst:623 +#: ../../library/dataclasses.rst:624 #, fuzzy msgid "" "When the dataclass is being created by the :func:`@dataclass ` " @@ -978,7 +979,7 @@ msgstr "" "將自己的欄位新增到有序映射中。所有生成的方法都將使用這種組合的、計算的有序欄" "位映射。因為欄位是按插入順序排列的,所以派生類會覆蓋基底類別。一個例子: ::" -#: ../../library/dataclasses.rst:643 +#: ../../library/dataclasses.rst:644 #, fuzzy msgid "" "The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " @@ -988,19 +989,19 @@ msgstr "" "最終的欄位列表按順序為 :attr:`!x`、:attr:`!y`、:attr:`!z`。:attr:`!x` 的最終" "型別是 :class:`int`,如類別 :class:`!C` 中指定的那樣。" -#: ../../library/dataclasses.rst:646 +#: ../../library/dataclasses.rst:647 #, fuzzy msgid "" "The generated :meth:`~object.__init__` method for :class:`!C` will look " "like::" msgstr "為 ``C`` 生成的 :meth:`~object.__init__` 方法將如下所示:" -#: ../../library/dataclasses.rst:651 +#: ../../library/dataclasses.rst:652 #, fuzzy msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" msgstr ":meth:`__init__` 中僅關鍵字參數的重新排序" -#: ../../library/dataclasses.rst:653 +#: ../../library/dataclasses.rst:654 #, fuzzy msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " @@ -1012,7 +1013,7 @@ msgstr "" "僅關鍵字)參數之後。這是如何在 Python 中實作僅關鍵字參數的要求:它們必須位於" "非僅關鍵字參數之後。" -#: ../../library/dataclasses.rst:659 +#: ../../library/dataclasses.rst:660 #, fuzzy msgid "" "In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " @@ -1022,12 +1023,12 @@ msgstr "" "在此示例中,:attr:`!Base.y`、:attr:`!Base.w` 和 :attr:`!D.t` 是僅限關鍵字的欄" "位,:attr:`!Base.x` 和 :attr:`!D.z` 是常規欄位: ::" -#: ../../library/dataclasses.rst:674 +#: ../../library/dataclasses.rst:675 #, fuzzy msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" msgstr "為 :class:`!D` 生成的 :meth:`!__init__` 方法將如下所示:" -#: ../../library/dataclasses.rst:678 +#: ../../library/dataclasses.rst:679 #, fuzzy msgid "" "Note that the parameters have been re-ordered from how they appear in the " @@ -1037,18 +1038,18 @@ msgstr "" "請注意,參數已根據它們在欄位列表中的顯示方式重新排序:從常規欄位派生的參數後" "跟從僅關鍵字欄位派生的參數。" -#: ../../library/dataclasses.rst:682 +#: ../../library/dataclasses.rst:683 #, fuzzy msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" "ordered :meth:`!__init__` parameter list." msgstr "僅關鍵字參數的相對順序在重新排序的 :meth:`!__init__` 參數列表中維護。" -#: ../../library/dataclasses.rst:687 +#: ../../library/dataclasses.rst:688 msgid "Default factory functions" msgstr "預設工廠函式" -#: ../../library/dataclasses.rst:689 +#: ../../library/dataclasses.rst:690 #, fuzzy msgid "" "If a :func:`field` specifies a *default_factory*, it is called with zero " @@ -1058,7 +1059,7 @@ msgstr "" "如果 :func:`field` 指定了 *default_factory*,當需要該欄位的預設值時,它會以零" "參數呼叫。例如,要建立列表的新實例,請使用:" -#: ../../library/dataclasses.rst:695 +#: ../../library/dataclasses.rst:696 #, fuzzy msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " @@ -1071,11 +1072,11 @@ msgstr "" "位還指定了 ``default_factory``,那麼預設工廠函式將始終從生成的 :meth:" "`__init__ 中呼叫`功能。發生這種情況是因為沒有其他方法可以為該欄位賦予初始值。" -#: ../../library/dataclasses.rst:702 +#: ../../library/dataclasses.rst:703 msgid "Mutable default values" msgstr "可變預設值" -#: ../../library/dataclasses.rst:704 +#: ../../library/dataclasses.rst:705 #, fuzzy msgid "" "Python stores default member variable values in class attributes. Consider " @@ -1083,7 +1084,7 @@ msgid "" msgstr "" "Python 將預設成員變數值存儲在類別屬性中。考慮這個例子,不使用資料類別::" -#: ../../library/dataclasses.rst:719 +#: ../../library/dataclasses.rst:720 #, fuzzy msgid "" "Note that the two instances of class :class:`!C` share the same class " @@ -1092,16 +1093,16 @@ msgstr "" "請注意,類別 :class:`!C` 的兩個實例共享同一個類別變數 :attr:`!x`,正如預期的" "那樣。" -#: ../../library/dataclasses.rst:722 +#: ../../library/dataclasses.rst:723 #, fuzzy msgid "Using dataclasses, *if* this code was valid::" msgstr "使用資料類別,*如果*此程式碼有效: ::" -#: ../../library/dataclasses.rst:730 +#: ../../library/dataclasses.rst:731 msgid "it would generate code similar to::" msgstr "它會生成類似的程式碼: ::" -#: ../../library/dataclasses.rst:741 +#: ../../library/dataclasses.rst:742 #, fuzzy msgid "" "This has the same issue as the original example using class :class:`!C`. " @@ -1121,14 +1122,14 @@ msgstr "" "到不可散列的預設參數,它將引發 :exc:`TypeError`。假設是如果一個值是不可散列" "的,那麼它就是可變的。這是一個部分解決方案,但它確實可以防止許多常見錯誤。" -#: ../../library/dataclasses.rst:752 +#: ../../library/dataclasses.rst:753 #, fuzzy msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "使用預設工廠函式是一種建立可變型別的新實例作為欄位預設值的方法:" -#: ../../library/dataclasses.rst:761 +#: ../../library/dataclasses.rst:762 #, fuzzy msgid "" "Instead of looking for and disallowing objects of type :class:`list`, :class:" @@ -1138,12 +1139,12 @@ msgstr "" "不再查找和禁止型別為 :class:`list`、:class:`dict` 或 :class:`set` 的物件,現" "在不允許使用不可散列的對像作為預設值。不可散列性用於近似可變性。" -#: ../../library/dataclasses.rst:768 +#: ../../library/dataclasses.rst:769 #, fuzzy msgid "Descriptor-typed fields" msgstr "描述器型別的欄位" -#: ../../library/dataclasses.rst:770 +#: ../../library/dataclasses.rst:771 #, fuzzy msgid "" "Fields that are assigned :ref:`descriptor objects ` as their " @@ -1151,7 +1152,7 @@ msgid "" msgstr "" "指定為\\ :ref:`描述器物件 `\\ 作為預設值的欄位具有以下特殊行為:" -#: ../../library/dataclasses.rst:773 +#: ../../library/dataclasses.rst:774 #, fuzzy msgid "" "The value for the field passed to the dataclass's :meth:`~object.__init__` " @@ -1161,7 +1162,7 @@ msgstr "" "傳遞給資料類別的 :meth:`~object.__init__` 方法的欄位值被傳遞給描述器的 :meth:" "`~object.__set__` 方法,而不是覆蓋描述器物件。" -#: ../../library/dataclasses.rst:777 +#: ../../library/dataclasses.rst:778 #, fuzzy msgid "" "Similarly, when getting or setting the field, the descriptor's :meth:" @@ -1171,7 +1172,7 @@ msgstr "" "同樣,在獲取或設定欄位時,將呼叫描述器的 :meth:`~object.__get__` 或 :meth:`!" "__set__` 方法,而不是回傳或覆蓋描述器物件。" -#: ../../library/dataclasses.rst:781 +#: ../../library/dataclasses.rst:782 #, fuzzy msgid "" "To determine whether a field contains a default value, :func:`@dataclass " @@ -1187,7 +1188,7 @@ msgstr "" "面,如果描述器在這種情況下引發 :exc:`AttributeError`,則不會為該欄位提供預設" "值。" -#: ../../library/dataclasses.rst:816 +#: ../../library/dataclasses.rst:817 #, fuzzy msgid "" "Note that if a field is annotated with a descriptor type, but is not " From 6b2d91895fe6d812e2bd64a948042a6609b3a737 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 May 2024 00:05:03 +0000 Subject: [PATCH 07/13] sync with cpython d76d95ea --- library/itertools.po | 26 +++++++++++++------------- tutorial/venv.po | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index 2a573fbbd8c..2d2be027390 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-15 00:04+0000\n" +"POT-Creation-Date: 2024-05-19 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -805,21 +805,21 @@ msgstr "" msgid "Return *n* independent iterators from a single iterable." msgstr "" -#: ../../library/itertools.rst:706 +#: ../../library/itertools.rst:707 msgid "" "Once a :func:`tee` has been created, the original *iterable* should not be " "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" -#: ../../library/itertools.rst:710 +#: ../../library/itertools.rst:711 msgid "" "``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be raised " "when simultaneously using iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" -#: ../../library/itertools.rst:714 +#: ../../library/itertools.rst:715 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " @@ -827,7 +827,7 @@ msgid "" "func:`list` instead of :func:`tee`." msgstr "" -#: ../../library/itertools.rst:722 +#: ../../library/itertools.rst:723 msgid "" "Make an iterator that aggregates elements from each of the iterables. If the " "iterables are of uneven length, missing values are filled-in with " @@ -835,7 +835,7 @@ msgid "" "Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:746 +#: ../../library/itertools.rst:747 msgid "" "If one of the iterables is potentially infinite, then the :func:" "`zip_longest` function should be wrapped with something that limits the " @@ -843,17 +843,17 @@ msgid "" "specified, *fillvalue* defaults to ``None``." msgstr "" -#: ../../library/itertools.rst:755 +#: ../../library/itertools.rst:756 msgid "Itertools Recipes" msgstr "" -#: ../../library/itertools.rst:757 +#: ../../library/itertools.rst:758 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" -#: ../../library/itertools.rst:760 +#: ../../library/itertools.rst:761 msgid "" "The primary purpose of the itertools recipes is educational. The recipes " "show various ways of thinking about individual tools — for example, that " @@ -865,7 +865,7 @@ msgid "" "``map()``, ``filter()``, ``reversed()``, and ``enumerate()``." msgstr "" -#: ../../library/itertools.rst:769 +#: ../../library/itertools.rst:770 msgid "" "A secondary purpose of the recipes is to serve as an incubator. The " "``accumulate()``, ``compress()``, and ``pairwise()`` itertools started out " @@ -873,13 +873,13 @@ msgid "" "``sieve()`` recipes are being tested to see whether they prove their worth." msgstr "" -#: ../../library/itertools.rst:774 +#: ../../library/itertools.rst:775 msgid "" "Substantially all of these recipes and many, many others can be installed " "from the :pypi:`more-itertools` project found on the Python Package Index::" msgstr "" -#: ../../library/itertools.rst:780 +#: ../../library/itertools.rst:781 msgid "" "Many of the recipes offer the same high performance as the underlying " "toolset. Superior memory performance is kept by processing elements one at a " @@ -891,6 +891,6 @@ msgid "" "overhead." msgstr "" -#: ../../library/itertools.rst:956 +#: ../../library/itertools.rst:957 msgid "The following recipes have a more mathematical flavor:" msgstr "" diff --git a/tutorial/venv.po b/tutorial/venv.po index f9b8fef770e..00a95697ad1 100644 --- a/tutorial/venv.po +++ b/tutorial/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-18 00:03+0000\n" +"POT-Creation-Date: 2024-05-19 00:03+0000\n" "PO-Revision-Date: 2022-10-16 05:35+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -80,12 +80,12 @@ msgid "Creating Virtual Environments" msgstr "建立虛擬環境" #: ../../tutorial/venv.rst:38 +#, fuzzy msgid "" "The module used to create and manage virtual environments is called :mod:" -"`venv`. :mod:`venv` will usually install the most recent version of Python " -"that you have available. If you have multiple versions of Python on your " -"system, you can select a specific Python version by running ``python3`` or " -"whichever version you want." +"`venv`. :mod:`venv` will install the Python version from which the command " +"was run (as reported by the :option:`--version` option). For instance, " +"excuting the command with ``python3.12`` will install version 3.12." msgstr "" "用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 通常會安裝你能夠取" "得的最新版本的 Python。要是你的系統有不同版本的 Python,你可以透過 " From bfbbc31921947c149db269992c2be62bb3e92339 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 May 2024 00:05:39 +0000 Subject: [PATCH 08/13] sync with cpython 30c687cd --- library/marshal.po | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/marshal.po b/library/marshal.po index baab5e2f562..a0ea145ae95 100644 --- a/library/marshal.po +++ b/library/marshal.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-20 00:04+0000\n" "PO-Revision-Date: 2023-04-24 21:28+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -27,11 +27,12 @@ msgid ":mod:`!marshal` --- Internal Python object serialization" msgstr ":mod:`!marshal` --- 内部 Python 物件序列化" #: ../../library/marshal.rst:10 +#, fuzzy msgid "" "This module contains functions that can read and write Python values in a " "binary format. The format is specific to Python, but independent of machine " "architecture issues (e.g., you can write a Python value to a file on a PC, " -"transport the file to a Sun, and read it back there). Details of the format " +"transport the file to a Mac, and read it back there). Details of the format " "are undocumented on purpose; it may change between Python versions (although " "it rarely does). [#]_" msgstr "" From 3b0ddc7bfaf6c9e0a981201fb5104b87f0233911 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 May 2024 00:04:51 +0000 Subject: [PATCH 09/13] sync with cpython d8981abb --- library/dataclasses.po | 59 ++-- library/functions.po | 580 ++++++++++++++++++++------------------- library/unittest.mock.po | 166 +++++------ 3 files changed, 409 insertions(+), 396 deletions(-) diff --git a/library/dataclasses.po b/library/dataclasses.po index b660424c63e..02f0c7274ac 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-17 00:03+0000\n" +"POT-Creation-Date: 2024-05-21 00:03+0000\n" "PO-Revision-Date: 2023-02-11 15:02+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -951,17 +951,16 @@ msgstr "" msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`~object.__init__` cannot use simple assignment to initialize fields, and " -"must use :meth:`!object.__setattr__`. .. Make sure to not remove \"object\" " -"from \"object.__setattr__\" in the above markup" +"must use :meth:`!object.__setattr__`." msgstr "" "使用 ``frozen=True`` 時有一個微小的性能損失::meth:`~object.__init__` 不能使" "用簡單賦值來初始化欄位,必須使用 :meth:`!__setattr__`。" -#: ../../library/dataclasses.rst:622 +#: ../../library/dataclasses.rst:623 msgid "Inheritance" msgstr "繼承" -#: ../../library/dataclasses.rst:624 +#: ../../library/dataclasses.rst:625 #, fuzzy msgid "" "When the dataclass is being created by the :func:`@dataclass ` " @@ -979,7 +978,7 @@ msgstr "" "將自己的欄位新增到有序映射中。所有生成的方法都將使用這種組合的、計算的有序欄" "位映射。因為欄位是按插入順序排列的,所以派生類會覆蓋基底類別。一個例子: ::" -#: ../../library/dataclasses.rst:644 +#: ../../library/dataclasses.rst:645 #, fuzzy msgid "" "The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " @@ -989,19 +988,19 @@ msgstr "" "最終的欄位列表按順序為 :attr:`!x`、:attr:`!y`、:attr:`!z`。:attr:`!x` 的最終" "型別是 :class:`int`,如類別 :class:`!C` 中指定的那樣。" -#: ../../library/dataclasses.rst:647 +#: ../../library/dataclasses.rst:648 #, fuzzy msgid "" "The generated :meth:`~object.__init__` method for :class:`!C` will look " "like::" msgstr "為 ``C`` 生成的 :meth:`~object.__init__` 方法將如下所示:" -#: ../../library/dataclasses.rst:652 +#: ../../library/dataclasses.rst:653 #, fuzzy msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" msgstr ":meth:`__init__` 中僅關鍵字參數的重新排序" -#: ../../library/dataclasses.rst:654 +#: ../../library/dataclasses.rst:655 #, fuzzy msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " @@ -1013,7 +1012,7 @@ msgstr "" "僅關鍵字)參數之後。這是如何在 Python 中實作僅關鍵字參數的要求:它們必須位於" "非僅關鍵字參數之後。" -#: ../../library/dataclasses.rst:660 +#: ../../library/dataclasses.rst:661 #, fuzzy msgid "" "In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " @@ -1023,12 +1022,12 @@ msgstr "" "在此示例中,:attr:`!Base.y`、:attr:`!Base.w` 和 :attr:`!D.t` 是僅限關鍵字的欄" "位,:attr:`!Base.x` 和 :attr:`!D.z` 是常規欄位: ::" -#: ../../library/dataclasses.rst:675 +#: ../../library/dataclasses.rst:676 #, fuzzy msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" msgstr "為 :class:`!D` 生成的 :meth:`!__init__` 方法將如下所示:" -#: ../../library/dataclasses.rst:679 +#: ../../library/dataclasses.rst:680 #, fuzzy msgid "" "Note that the parameters have been re-ordered from how they appear in the " @@ -1038,18 +1037,18 @@ msgstr "" "請注意,參數已根據它們在欄位列表中的顯示方式重新排序:從常規欄位派生的參數後" "跟從僅關鍵字欄位派生的參數。" -#: ../../library/dataclasses.rst:683 +#: ../../library/dataclasses.rst:684 #, fuzzy msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" "ordered :meth:`!__init__` parameter list." msgstr "僅關鍵字參數的相對順序在重新排序的 :meth:`!__init__` 參數列表中維護。" -#: ../../library/dataclasses.rst:688 +#: ../../library/dataclasses.rst:689 msgid "Default factory functions" msgstr "預設工廠函式" -#: ../../library/dataclasses.rst:690 +#: ../../library/dataclasses.rst:691 #, fuzzy msgid "" "If a :func:`field` specifies a *default_factory*, it is called with zero " @@ -1059,7 +1058,7 @@ msgstr "" "如果 :func:`field` 指定了 *default_factory*,當需要該欄位的預設值時,它會以零" "參數呼叫。例如,要建立列表的新實例,請使用:" -#: ../../library/dataclasses.rst:696 +#: ../../library/dataclasses.rst:697 #, fuzzy msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " @@ -1072,11 +1071,11 @@ msgstr "" "位還指定了 ``default_factory``,那麼預設工廠函式將始終從生成的 :meth:" "`__init__ 中呼叫`功能。發生這種情況是因為沒有其他方法可以為該欄位賦予初始值。" -#: ../../library/dataclasses.rst:703 +#: ../../library/dataclasses.rst:704 msgid "Mutable default values" msgstr "可變預設值" -#: ../../library/dataclasses.rst:705 +#: ../../library/dataclasses.rst:706 #, fuzzy msgid "" "Python stores default member variable values in class attributes. Consider " @@ -1084,7 +1083,7 @@ msgid "" msgstr "" "Python 將預設成員變數值存儲在類別屬性中。考慮這個例子,不使用資料類別::" -#: ../../library/dataclasses.rst:720 +#: ../../library/dataclasses.rst:721 #, fuzzy msgid "" "Note that the two instances of class :class:`!C` share the same class " @@ -1093,16 +1092,16 @@ msgstr "" "請注意,類別 :class:`!C` 的兩個實例共享同一個類別變數 :attr:`!x`,正如預期的" "那樣。" -#: ../../library/dataclasses.rst:723 +#: ../../library/dataclasses.rst:724 #, fuzzy msgid "Using dataclasses, *if* this code was valid::" msgstr "使用資料類別,*如果*此程式碼有效: ::" -#: ../../library/dataclasses.rst:731 +#: ../../library/dataclasses.rst:732 msgid "it would generate code similar to::" msgstr "它會生成類似的程式碼: ::" -#: ../../library/dataclasses.rst:742 +#: ../../library/dataclasses.rst:743 #, fuzzy msgid "" "This has the same issue as the original example using class :class:`!C`. " @@ -1122,14 +1121,14 @@ msgstr "" "到不可散列的預設參數,它將引發 :exc:`TypeError`。假設是如果一個值是不可散列" "的,那麼它就是可變的。這是一個部分解決方案,但它確實可以防止許多常見錯誤。" -#: ../../library/dataclasses.rst:753 +#: ../../library/dataclasses.rst:754 #, fuzzy msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "使用預設工廠函式是一種建立可變型別的新實例作為欄位預設值的方法:" -#: ../../library/dataclasses.rst:762 +#: ../../library/dataclasses.rst:763 #, fuzzy msgid "" "Instead of looking for and disallowing objects of type :class:`list`, :class:" @@ -1139,12 +1138,12 @@ msgstr "" "不再查找和禁止型別為 :class:`list`、:class:`dict` 或 :class:`set` 的物件,現" "在不允許使用不可散列的對像作為預設值。不可散列性用於近似可變性。" -#: ../../library/dataclasses.rst:769 +#: ../../library/dataclasses.rst:770 #, fuzzy msgid "Descriptor-typed fields" msgstr "描述器型別的欄位" -#: ../../library/dataclasses.rst:771 +#: ../../library/dataclasses.rst:772 #, fuzzy msgid "" "Fields that are assigned :ref:`descriptor objects ` as their " @@ -1152,7 +1151,7 @@ msgid "" msgstr "" "指定為\\ :ref:`描述器物件 `\\ 作為預設值的欄位具有以下特殊行為:" -#: ../../library/dataclasses.rst:774 +#: ../../library/dataclasses.rst:775 #, fuzzy msgid "" "The value for the field passed to the dataclass's :meth:`~object.__init__` " @@ -1162,7 +1161,7 @@ msgstr "" "傳遞給資料類別的 :meth:`~object.__init__` 方法的欄位值被傳遞給描述器的 :meth:" "`~object.__set__` 方法,而不是覆蓋描述器物件。" -#: ../../library/dataclasses.rst:778 +#: ../../library/dataclasses.rst:779 #, fuzzy msgid "" "Similarly, when getting or setting the field, the descriptor's :meth:" @@ -1172,7 +1171,7 @@ msgstr "" "同樣,在獲取或設定欄位時,將呼叫描述器的 :meth:`~object.__get__` 或 :meth:`!" "__set__` 方法,而不是回傳或覆蓋描述器物件。" -#: ../../library/dataclasses.rst:782 +#: ../../library/dataclasses.rst:783 #, fuzzy msgid "" "To determine whether a field contains a default value, :func:`@dataclass " @@ -1188,7 +1187,7 @@ msgstr "" "面,如果描述器在這種情況下引發 :exc:`AttributeError`,則不會為該欄位提供預設" "值。" -#: ../../library/dataclasses.rst:817 +#: ../../library/dataclasses.rst:818 #, fuzzy msgid "" "Note that if a field is annotated with a descriptor type, but is not " diff --git a/library/functions.po b/library/functions.po index 2f6ebb09d47..21c99071a79 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-08 00:03+0000\n" +"POT-Creation-Date: 2024-05-21 00:03+0000\n" "PO-Revision-Date: 2024-05-06 17:06+0800\n" "Last-Translator: KNChiu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -489,8 +489,8 @@ msgid "" "ways." msgstr "如果不一定需要 \"0b\" 前綴,還可以使用如下的方法。" -#: ../../library/functions.rst:141 ../../library/functions.rst:855 -#: ../../library/functions.rst:1173 +#: ../../library/functions.rst:141 ../../library/functions.rst:859 +#: ../../library/functions.rst:1177 msgid "See also :func:`format` for more information." msgstr "可參考 :func:`format` 獲取更多資訊。" @@ -509,8 +509,8 @@ msgstr "" "(參見 :ref:`typesnumeric`),其他 class 不能繼承自它。它只有 ``False`` 和 " "``True`` 兩個實例(參見 :ref:`typebool`)。" -#: ../../library/functions.rst:155 ../../library/functions.rst:720 -#: ../../library/functions.rst:944 +#: ../../library/functions.rst:155 ../../library/functions.rst:724 +#: ../../library/functions.rst:948 msgid "*x* is now a positional-only parameter." msgstr "*x* 現在為僅限位置參數。" @@ -943,8 +943,8 @@ msgstr "" msgid "The complex type is described in :ref:`typesnumeric`." msgstr "複數型別在 :ref:`typesnumeric` 中有相關描述。" -#: ../../library/functions.rst:400 ../../library/functions.rst:717 -#: ../../library/functions.rst:941 +#: ../../library/functions.rst:400 ../../library/functions.rst:721 +#: ../../library/functions.rst:945 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "可以使用底線將程式碼文字中的數字進行分組。" @@ -1202,14 +1202,14 @@ msgstr "" "另外可以參閱 :func:`ast.literal_eval`,該函式可以安全執行僅包含文字的運算式字" "串。" -#: ../../library/functions.rst:581 ../../library/functions.rst:622 +#: ../../library/functions.rst:581 ../../library/functions.rst:626 msgid "" "Raises an :ref:`auditing event ` ``exec`` with argument " "``code_object``." msgstr "" "引發一個附帶引數 ``code_object`` 的\\ :ref:`稽核事件 ` ``exec``。" -#: ../../library/functions.rst:583 ../../library/functions.rst:624 +#: ../../library/functions.rst:583 ../../library/functions.rst:628 msgid "" "Raises an :ref:`auditing event ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." @@ -1238,6 +1238,7 @@ msgstr "" "``None``。" #: ../../library/functions.rst:601 +#, fuzzy msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " "current scope. If only *globals* is provided, it must be a dictionary (and " @@ -1245,9 +1246,7 @@ msgid "" "the local variables. If *globals* and *locals* are given, they are used for " "the global and local variables, respectively. If provided, *locals* can be " "any mapping object. Remember that at the module level, globals and locals " -"are the same dictionary. If exec gets two separate objects as *globals* and " -"*locals*, the code will be executed as if it were embedded in a class " -"definition." +"are the same dictionary." msgstr "" "無論哪種情況,如果省略了選擇性引數,程式碼將在當前作用域內執行。如果只提供了 " "*globals* 引數,就必須是 dictionary 型別,而且會被用作全域性和本地變數。如果" @@ -1258,6 +1257,13 @@ msgstr "" #: ../../library/functions.rst:611 msgid "" +"Most users should just pass a *globals* argument and never *locals*. If exec " +"gets two separate objects as *globals* and *locals*, the code will be " +"executed as if it were embedded in a class definition." +msgstr "" + +#: ../../library/functions.rst:615 +msgid "" "If the *globals* dictionary does not contain a value for the key " "``__builtins__``, a reference to the dictionary of the built-in module :mod:" "`builtins` is inserted under that key. That way you can control what " @@ -1269,7 +1275,7 @@ msgstr "" "func:`exec` 之前,可以通過將自己的 ``__builtins__`` dictionary 插入到 " "*globals* 中來控制可以使用哪些內建程式碼。" -#: ../../library/functions.rst:617 +#: ../../library/functions.rst:621 msgid "" "The *closure* argument specifies a closure--a tuple of cellvars. It's only " "valid when the *object* is a code object containing free variables. The " @@ -1277,7 +1283,7 @@ msgid "" "referenced by the code object." msgstr "" -#: ../../library/functions.rst:629 +#: ../../library/functions.rst:633 msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " "global and local dictionary, respectively, which may be useful to pass " @@ -1286,7 +1292,7 @@ msgstr "" "內建 :func:`globals` 和 :func:`locals` 函式各自回傳當前的全域性和本地 " "dictionary,因此可以將它們傳遞給 :func:`exec` 的第二個和第三個引數。" -#: ../../library/functions.rst:635 +#: ../../library/functions.rst:639 msgid "" "The default *locals* act as described for function :func:`locals` below: " "modifications to the default *locals* dictionary should not be attempted. " @@ -1297,11 +1303,11 @@ msgstr "" "預設的 *locals* dictionary。如果您想在 :func:`exec` 函式回傳時知道程式碼對 " "*locals* 的變動,請明確地傳遞 *locals* dictionary 。" -#: ../../library/functions.rst:640 +#: ../../library/functions.rst:644 msgid "Added the *closure* parameter." msgstr "增加了 *closure* 參數。" -#: ../../library/functions.rst:646 +#: ../../library/functions.rst:650 msgid "" "Construct an iterator from those elements of *iterable* for which *function* " "is true. *iterable* may be either a sequence, a container which supports " @@ -1313,7 +1319,7 @@ msgstr "" "*function* 是 ``None``,則會假設它是一個識別性函式,即 *iterable* 中所有假值" "元素會被移除。" -#: ../../library/functions.rst:652 +#: ../../library/functions.rst:656 msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " "expression ``(item for item in iterable if function(item))`` if function is " @@ -1324,7 +1330,7 @@ msgstr "" "是 ``None`` 的時候為 ``(item for item in iterable if function(item))``;" "function 是 ``None`` 的時候為 ``(item for item in iterable if item)``。" -#: ../../library/functions.rst:657 +#: ../../library/functions.rst:661 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." @@ -1332,11 +1338,11 @@ msgstr "" "請參閱 :func:`itertools.filterfalse`,只有 *function* 為 false 時才選取 " "*iterable* 中元素的互補函式。" -#: ../../library/functions.rst:667 +#: ../../library/functions.rst:671 msgid "Return a floating point number constructed from a number or string *x*." msgstr "回傳從數字或字串 *x* 生成的浮點數。" -#: ../../library/functions.rst:669 +#: ../../library/functions.rst:673 msgid "" "If the argument is a string, it should contain a decimal number, optionally " "preceded by a sign, and optionally embedded in whitespace. The optional " @@ -1351,7 +1357,7 @@ msgstr "" "數也可以是 NaN(非數字)或正負無窮大的字串。確切地說,除去首尾的空格後,輸入" "必須遵循以下語法中 ``floatvalue`` 的生成規則:" -#: ../../library/functions.rst:688 +#: ../../library/functions.rst:692 msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " "and \"iNfINity\" are all acceptable spellings for positive infinity." @@ -1359,7 +1365,7 @@ msgstr "" "字母大小寫不影響,例如,\"inf\"、\"Inf\"、\"INFINITY\"、\"iNfINity\" 都可以表" "示正無窮大。" -#: ../../library/functions.rst:691 +#: ../../library/functions.rst:695 msgid "" "Otherwise, if the argument is an integer or a floating point number, a " "floating point number with the same value (within Python's floating point " @@ -1369,7 +1375,7 @@ msgstr "" "否則,如果引數是整數或浮點數,則回傳具有相同值(在 Python 浮點精度範圍內)的" "浮點數。如果引數在 Python 浮點精度範圍外,則會觸發 :exc:`OverflowError`。" -#: ../../library/functions.rst:696 +#: ../../library/functions.rst:700 msgid "" "For a general Python object ``x``, ``float(x)`` delegates to ``x." "__float__()``. If :meth:`~object.__float__` is not defined then it falls " @@ -1378,28 +1384,28 @@ msgstr "" "對於一般的 Python 物件 ``x``,``float(x)`` 指派給 ``x.__float__()``。如果未定" "義 :meth:`~object.__float__` 則回退使用 :meth:`~object.__index__`。" -#: ../../library/functions.rst:700 +#: ../../library/functions.rst:704 msgid "If no argument is given, ``0.0`` is returned." msgstr "如果沒有引數,則回傳 ``0.0``。" -#: ../../library/functions.rst:702 +#: ../../library/functions.rst:706 msgid "Examples::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:715 +#: ../../library/functions.rst:719 msgid "The float type is described in :ref:`typesnumeric`." msgstr ":ref:`typesnumeric` 描述了浮點數型別。" -#: ../../library/functions.rst:723 +#: ../../library/functions.rst:727 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." msgstr "" -#: ../../library/functions.rst:733 +#: ../../library/functions.rst:737 msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " "*format_spec*. The interpretation of *format_spec* will depend on the type " @@ -1410,7 +1416,7 @@ msgstr "" "取決於 *value* 引數的型別,但是大多數內建型別使用標準格式化語法::ref:" "`formatspec`。" -#: ../../library/functions.rst:738 +#: ../../library/functions.rst:742 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." @@ -1418,7 +1424,7 @@ msgstr "" "預設的 *format_spec* 是一個空字串,它通常和呼叫 :func:`str(value) ` 的效" "果相同。" -#: ../../library/functions.rst:741 +#: ../../library/functions.rst:745 msgid "" "A call to ``format(value, format_spec)`` is translated to ``type(value)." "__format__(value, format_spec)`` which bypasses the instance dictionary when " @@ -1432,7 +1438,7 @@ msgstr "" "實例中的字典。如果搜尋到 :mod:`object` 這個 method 但 *format_spec* 不為空," "或是 *format_spec* 或回傳值不是字串,則會觸發 :exc:`TypeError`。" -#: ../../library/functions.rst:748 +#: ../../library/functions.rst:752 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." @@ -1440,7 +1446,7 @@ msgstr "" "當 *format_spec* 不是空字串時,``object().__format__(format_spec)`` 會觸發 :" "exc:`TypeError`。" -#: ../../library/functions.rst:757 +#: ../../library/functions.rst:761 msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " "*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" @@ -1450,7 +1456,7 @@ msgstr "" "素。\\ ``frozenset`` 是一個內建的 class。有關此 class 的文件,請參閱 :class:" "`frozenset` 和 :ref:`types-set`。" -#: ../../library/functions.rst:761 +#: ../../library/functions.rst:765 msgid "" "For other containers see the built-in :class:`set`, :class:`list`, :class:" "`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." @@ -1458,7 +1464,7 @@ msgstr "" "請參閱內建的 :class:`set`、:class:`list`、:class:`tuple` 和 :class:`dict` " "class,以及 :mod:`collections` module 來了解其它的容器。" -#: ../../library/functions.rst:769 +#: ../../library/functions.rst:773 msgid "" "Return the value of the named attribute of *object*. *name* must be a " "string. If the string is the name of one of the object's attributes, the " @@ -1473,7 +1479,7 @@ msgstr "" "`AttributeError`。*name* 不必是個 Python 識別符 (identifier)(請見 :func:" "`setattr`)。" -#: ../../library/functions.rst:778 +#: ../../library/functions.rst:782 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1481,7 +1487,7 @@ msgid "" "`getattr`." msgstr "" -#: ../../library/functions.rst:786 +#: ../../library/functions.rst:790 msgid "" "Return the dictionary implementing the current module namespace. For code " "within functions, this is set when the function is defined and remains the " @@ -1490,7 +1496,7 @@ msgstr "" "回傳代表當前 module 命名空間的 dictionary。對於在函式中的程式碼來說,這在定義" "函式時設定且不論該函式是在何處呼叫都會保持相同。" -#: ../../library/functions.rst:793 +#: ../../library/functions.rst:797 msgid "" "The arguments are an object and a string. The result is ``True`` if the " "string is the name of one of the object's attributes, ``False`` if not. " @@ -1501,7 +1507,7 @@ msgstr "" "則回傳 ``False``。(此功能是通過呼叫 ``getattr(object, name)`` 看是否有 :exc:" "`AttributeError` 來實現的。)" -#: ../../library/functions.rst:801 +#: ../../library/functions.rst:805 msgid "" "Return the hash value of the object (if it has one). Hash values are " "integers. They are used to quickly compare dictionary keys during a " @@ -1512,7 +1518,7 @@ msgstr "" "時用來快速比較 dictionary 的鍵。相同大小的數字數值有相同的雜湊值(即使它們型" "別不同,如 1 和 1.0)。" -#: ../../library/functions.rst:808 +#: ../../library/functions.rst:812 msgid "" "For objects with custom :meth:`~object.__hash__` methods, note that :func:" "`hash` truncates the return value based on the bit width of the host machine." @@ -1520,7 +1526,7 @@ msgstr "" "請注意,如果物件帶有自訂的 :meth:`~object.__hash__` 方法,:func:`hash` 將根據" "運行機器的位元長度來截斷回傳值。" -#: ../../library/functions.rst:815 +#: ../../library/functions.rst:819 msgid "" "Invoke the built-in help system. (This function is intended for interactive " "use.) If no argument is given, the interactive help system starts on the " @@ -1534,7 +1540,7 @@ msgstr "" "鍵字或文件主題中搜索該字串,並在控制台上列印幫助資訊。如果引數是其他任意物" "件,則會生成該物件的幫助頁。" -#: ../../library/functions.rst:822 +#: ../../library/functions.rst:826 msgid "" "Note that if a slash(/) appears in the parameter list of a function when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1542,12 +1548,12 @@ msgid "" "parameters `." msgstr "" -#: ../../library/functions.rst:827 +#: ../../library/functions.rst:831 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "該函式透過 :mod:`site` module 加入到內建命名空間。" -#: ../../library/functions.rst:829 +#: ../../library/functions.rst:833 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." @@ -1555,7 +1561,7 @@ msgstr "" "變更至 :mod:`pydoc` 和 :mod:`inspect` 使得可呼叫物件的簽名信息 (signature) 更" "加全面和一致。" -#: ../../library/functions.rst:836 +#: ../../library/functions.rst:840 msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " "\"0x\". If *x* is not a Python :class:`int` object, it has to define an :" @@ -1565,7 +1571,7 @@ msgstr "" "class:`int` 物件,則必須定義一個 :meth:`~object.__index__` method 並且回傳一" "個整數。舉例來說:" -#: ../../library/functions.rst:845 +#: ../../library/functions.rst:849 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " @@ -1574,20 +1580,20 @@ msgstr "" "如果要將整數轉換為大寫或小寫的十六進位制字串,並可選擇有無 \"0x\" 前綴,則可" "以使用如下方法:" -#: ../../library/functions.rst:857 +#: ../../library/functions.rst:861 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." msgstr "另請參閱 :func:`int` 將十六進位制字串轉換為以 16 為基數的整數。" -#: ../../library/functions.rst:862 +#: ../../library/functions.rst:866 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." msgstr "" "如果要獲取浮點數的十六進位制字串形式,請使用 :meth:`float.hex` method。" -#: ../../library/functions.rst:868 +#: ../../library/functions.rst:872 msgid "" "Return the \"identity\" of an object. This is an integer which is " "guaranteed to be unique and constant for this object during its lifetime. " @@ -1597,18 +1603,18 @@ msgstr "" "回傳物件的 \"識別性\" 。該值是一個整數,在此物件的生命週期中保證是唯一且恆定" "的。兩個生命期不重疊的物件可能具有相同的 :func:`id` 值。" -#: ../../library/functions.rst:873 +#: ../../library/functions.rst:877 msgid "This is the address of the object in memory." msgstr "" -#: ../../library/functions.rst:875 +#: ../../library/functions.rst:879 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" "引發一個附帶引數 ``id`` 的\\ :ref:`稽核事件 ` ``builtins.id``。" -#: ../../library/functions.rst:881 +#: ../../library/functions.rst:885 msgid "" "If the *prompt* argument is present, it is written to standard output " "without a trailing newline. The function then reads a line from input, " @@ -1621,7 +1627,7 @@ msgstr "" "\n" "::" -#: ../../library/functions.rst:891 +#: ../../library/functions.rst:895 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." @@ -1629,7 +1635,7 @@ msgstr "" "如果載入了 :mod:`readline` module,:func:`input` 將使用它來提供複雜的行編輯和" "歷史記錄功能。" -#: ../../library/functions.rst:894 +#: ../../library/functions.rst:898 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt``." @@ -1637,7 +1643,7 @@ msgstr "" "引發一個附帶引數 ``prompt`` 的\\ :ref:`稽核事件 ` ``builtins." "input``。" -#: ../../library/functions.rst:896 +#: ../../library/functions.rst:900 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1645,7 +1651,7 @@ msgstr "" "引發一個附帶讀取輸入前的引數 ``prompt`` 的\\ :ref:`稽核事件 ` " "``builtins.input``。" -#: ../../library/functions.rst:899 +#: ../../library/functions.rst:903 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "argument ``result``." @@ -1653,7 +1659,7 @@ msgstr "" "引發一個附帶引數 ``result`` 的\\ :ref:`稽核事件 ` ``builtins.input/" "result``。" -#: ../../library/functions.rst:901 +#: ../../library/functions.rst:905 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." @@ -1661,7 +1667,7 @@ msgstr "" "引發一個附帶成功讀取結果的\\ :ref:`稽核事件 ` ``builtins.input/" "result``。" -#: ../../library/functions.rst:908 +#: ../../library/functions.rst:912 msgid "" "Return an integer object constructed from a number or string *x*, or return " "``0`` if no arguments are given. If *x* defines :meth:`~object.__int__`, " @@ -1675,7 +1681,7 @@ msgstr "" "*x* 定義了 :meth:`~object.__index__` 則回傳 ``x.__index__()``。如果 *x* 定義" "了 :meth:`~object.__trunc__` 則回傳 ``x.__trunc__()``。對於浮點數則向零舍入。" -#: ../../library/functions.rst:915 +#: ../../library/functions.rst:919 msgid "" "If *x* is not a number or if *base* is given, then *x* must be a string, :" "class:`bytes`, or :class:`bytearray` instance representing an integer in " @@ -1688,7 +1694,7 @@ msgstr "" "前可以有 ``+`` 或 ``-``\\ (中間沒有空格)、可有個前導的零、也可被空格包圍、" "或在數字間有單一底線。" -#: ../../library/functions.rst:921 +#: ../../library/functions.rst:925 msgid "" "A base-n integer string contains digits, each representing a value from 0 to " "n-1. The values 0--9 can be represented by any Unicode decimal digit. The " @@ -1710,11 +1716,11 @@ msgstr "" "進制中的一個,所以 ``int('010', 0)`` 是非法的,但 ``int('010')`` 和 " "``int('010', 8)`` 是有效的。" -#: ../../library/functions.rst:932 +#: ../../library/functions.rst:936 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "整數型別定義請參閱 :ref:`typesnumeric`。" -#: ../../library/functions.rst:934 +#: ../../library/functions.rst:938 msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" "meth:`base.__index__ ` method, that method is called to " @@ -1726,17 +1732,17 @@ msgstr "" "使用 :meth:`base.__int__ ` 而不是 :meth:`base.__index__ " "`。" -#: ../../library/functions.rst:947 +#: ../../library/functions.rst:951 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." msgstr "" -#: ../../library/functions.rst:950 +#: ../../library/functions.rst:954 msgid "The delegation to :meth:`~object.__trunc__` is deprecated." msgstr "" -#: ../../library/functions.rst:953 +#: ../../library/functions.rst:957 msgid "" ":class:`int` string inputs and string representations can be limited to help " "avoid denial of service attacks. A :exc:`ValueError` is raised when the " @@ -1746,7 +1752,7 @@ msgid "" "documentation." msgstr "" -#: ../../library/functions.rst:963 +#: ../../library/functions.rst:967 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a " @@ -1786,7 +1792,7 @@ msgstr "" "*class* 是 *classinfo* 中任一元素的 subclass 時則回傳 ``True``。其他情況,會" "觸發 :exc:`TypeError`。" -#: ../../library/functions.rst:995 +#: ../../library/functions.rst:999 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1810,18 +1816,18 @@ msgstr "" "__next__` 時會不帶引數地呼叫 *object*\\ ;如果回傳的結果是 *sentinel* 則觸" "發 :exc:`StopIteration`,否則回傳呼叫結果。" -#: ../../library/functions.rst:1009 +#: ../../library/functions.rst:1013 msgid "See also :ref:`typeiter`." msgstr "另請參閱 :ref:`typeiter`。" -#: ../../library/functions.rst:1011 +#: ../../library/functions.rst:1015 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " "file until the end of file is reached::" msgstr "" -#: ../../library/functions.rst:1023 +#: ../../library/functions.rst:1027 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -1830,13 +1836,13 @@ msgstr "" "回傳物件的長度(元素個數)。引數可以是序列(如 string、bytes、tuple、list 或 " "range)或集合(如 dictionary、set 或 frozen set)。" -#: ../../library/functions.rst:1029 +#: ../../library/functions.rst:1033 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../library/functions.rst:1038 +#: ../../library/functions.rst:1042 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -1844,7 +1850,7 @@ msgstr "" "除了是函式,:class:`list` 也是可變序列型別,詳情請參閱 :ref:`typesseq-list` " "和 :ref:`typesseq`。" -#: ../../library/functions.rst:1044 +#: ../../library/functions.rst:1048 msgid "" "Update and return a dictionary representing the current local symbol table. " "Free variables are returned by :func:`locals` when it is called in function " @@ -1855,7 +1861,7 @@ msgstr "" "叫 :func:`locals` 時會回傳自由變數。請注意,在 module 階層中,\\ :func:" "`locals` 和 :func:`globals` 是相同的 dictionary。" -#: ../../library/functions.rst:1050 +#: ../../library/functions.rst:1054 msgid "" "The contents of this dictionary should not be modified; changes may not " "affect the values of local and free variables used by the interpreter." @@ -1863,7 +1869,7 @@ msgstr "" "此 dictionary 的內容不應該被更動;更改可能不會影響直譯器使用的本地變數或自由" "變數的值。" -#: ../../library/functions.rst:1055 +#: ../../library/functions.rst:1059 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " @@ -1878,13 +1884,13 @@ msgstr "" "iteratable 耗盡時 iterator 也會結束。如果函式的輸入已經是 tuple 的引數,請參" "閱 :func:`itertools.starmap`\\。" -#: ../../library/functions.rst:1067 +#: ../../library/functions.rst:1071 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "回傳 iterable 中最大的元素,或者回傳兩個及以上引數中最大的。" -#: ../../library/functions.rst:1070 +#: ../../library/functions.rst:1074 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -1893,7 +1899,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是個 :term:`iterable`,iterable 中最大的元素" "會被回傳。如果提供了兩個或以上的位置引數,則回傳最大的位置引數。" -#: ../../library/functions.rst:1075 ../../library/functions.rst:1113 +#: ../../library/functions.rst:1079 ../../library/functions.rst:1117 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1905,7 +1911,7 @@ msgstr "" "式,如同 :meth:`list.sort` 使用方式。*default* 引數是當 iterable 為空時回傳的" "值。如果 iterable 為空,並且沒有提供 *default*,則會觸發 :exc:`ValueError`。" -#: ../../library/functions.rst:1081 +#: ../../library/functions.rst:1085 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1916,15 +1922,15 @@ msgstr "" "``sorted(iterable, key=keyfunc, reverse=True)[0]`` 和 ``heapq.nlargest(1, " "iterable, key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1086 ../../library/functions.rst:1124 +#: ../../library/functions.rst:1090 ../../library/functions.rst:1128 msgid "Added the *default* keyword-only parameter." msgstr "新增 *default* 僅限關鍵字參數。" -#: ../../library/functions.rst:1089 ../../library/functions.rst:1127 +#: ../../library/functions.rst:1093 ../../library/functions.rst:1131 msgid "The *key* can be ``None``." msgstr "" -#: ../../library/functions.rst:1097 +#: ../../library/functions.rst:1101 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -1932,13 +1938,13 @@ msgstr "" "回傳由給定的引數建立之 \"memory view\" 物件。有關詳細資訊,請參閱 :ref:" "`typememoryview`。" -#: ../../library/functions.rst:1105 +#: ../../library/functions.rst:1109 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "回傳 iterable 中最小的元素,或者回傳兩個及以上引數中最小的。" -#: ../../library/functions.rst:1108 +#: ../../library/functions.rst:1112 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -1947,7 +1953,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是 :term:`iterable`,iterable 中最小的元素會" "被回傳。如果提供了兩個或以上的位置引數,則回傳最小的位置引數。" -#: ../../library/functions.rst:1119 +#: ../../library/functions.rst:1123 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1958,7 +1964,7 @@ msgstr "" "``sorted(iterable, key=keyfunc)[0]`` 和 ``heapq.nsmallest(1, iterable, " "key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1134 +#: ../../library/functions.rst:1138 msgid "" "Retrieve the next item from the :term:`iterator` by calling its :meth:" "`~iterator.__next__` method. If *default* is given, it is returned if the " @@ -1968,7 +1974,7 @@ msgstr "" "素。如果 iterator 耗盡,則回傳給定的預設值 *default*,如果沒有預設值則觸發 :" "exc:`StopIteration`。" -#: ../../library/functions.rst:1141 +#: ../../library/functions.rst:1145 msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " "It has methods that are common to all instances of Python classes. This " @@ -1977,7 +1983,7 @@ msgstr "" "回傳一個沒有特徵的新物件。:class:`object` 是所有 class 的基礎,它具有所有 " "Python class 實例的通用 method。這個函式不接受任何引數。" -#: ../../library/functions.rst:1147 +#: ../../library/functions.rst:1151 msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " "assign arbitrary attributes to an instance of the :class:`object` class." @@ -1985,7 +1991,7 @@ msgstr "" "由於 :class:`object` *沒有* :attr:`~object.__dict__`,因此無法將任意屬性賦" "給 :class:`object` class 的實例。" -#: ../../library/functions.rst:1153 +#: ../../library/functions.rst:1157 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -1996,7 +2002,7 @@ msgstr "" "Python 運算式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:" "`~object.__index__` method 回傳一個整數。舉例來說:" -#: ../../library/functions.rst:1163 +#: ../../library/functions.rst:1167 msgid "" "If you want to convert an integer number to an octal string either with the " "prefix \"0o\" or not, you can use either of the following ways." @@ -2004,7 +2010,7 @@ msgstr "" "如果要將整數轉換為八進位制字串,不論是否具備 \"0o\" 前綴,都可以使用下面的方" "法。" -#: ../../library/functions.rst:1180 +#: ../../library/functions.rst:1184 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " @@ -2013,7 +2019,7 @@ msgstr "" "開啟 *file* 並回傳對應的 :term:`file object`。如果該檔案不能開啟,則觸發 :" "exc:`OSError`。關於使用此函式的更多方法請參閱\\ :ref:`tut-files`。" -#: ../../library/functions.rst:1184 +#: ../../library/functions.rst:1188 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -2026,7 +2032,7 @@ msgstr "" "果有提供檔案描述器,它會隨著回傳的 I/O 物件關閉而關閉,除非 *closefd* 被設為 " "``False``。)" -#: ../../library/functions.rst:1190 +#: ../../library/functions.rst:1194 msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " @@ -2047,71 +2053,71 @@ msgstr "" "getencoding()` 來獲取當前的本地編碼。(要讀取和寫入原始 bytes,請使用二進位制" "模式且不要指定 *encoding*。)可用的模式有:" -#: ../../library/functions.rst:1207 +#: ../../library/functions.rst:1211 msgid "Character" msgstr "字元" -#: ../../library/functions.rst:1207 +#: ../../library/functions.rst:1211 msgid "Meaning" msgstr "意義" -#: ../../library/functions.rst:1209 +#: ../../library/functions.rst:1213 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/functions.rst:1209 +#: ../../library/functions.rst:1213 msgid "open for reading (default)" msgstr "讀取(預設)" -#: ../../library/functions.rst:1210 +#: ../../library/functions.rst:1214 msgid "``'w'``" msgstr "``'w'``" -#: ../../library/functions.rst:1210 +#: ../../library/functions.rst:1214 msgid "open for writing, truncating the file first" msgstr "" -#: ../../library/functions.rst:1211 +#: ../../library/functions.rst:1215 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/functions.rst:1211 +#: ../../library/functions.rst:1215 msgid "open for exclusive creation, failing if the file already exists" msgstr "唯一性建立,如果文件已存在則會失敗" -#: ../../library/functions.rst:1212 +#: ../../library/functions.rst:1216 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/functions.rst:1212 +#: ../../library/functions.rst:1216 msgid "open for writing, appending to the end of file if it exists" msgstr "寫入,如果文件存在則在末尾追加寫入內容" -#: ../../library/functions.rst:1213 +#: ../../library/functions.rst:1217 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/functions.rst:1213 ../../library/functions.rst:1357 +#: ../../library/functions.rst:1217 ../../library/functions.rst:1361 msgid "binary mode" msgstr "binary mode(二進位模式)" -#: ../../library/functions.rst:1214 +#: ../../library/functions.rst:1218 msgid "``'t'``" msgstr "``'t'``" -#: ../../library/functions.rst:1214 +#: ../../library/functions.rst:1218 msgid "text mode (default)" msgstr "文字模式(預設)" -#: ../../library/functions.rst:1215 +#: ../../library/functions.rst:1219 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/functions.rst:1215 +#: ../../library/functions.rst:1219 msgid "open for updating (reading and writing)" msgstr "更新(讀取並寫入)" -#: ../../library/functions.rst:1218 +#: ../../library/functions.rst:1222 msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " @@ -2120,7 +2126,7 @@ msgstr "" "預設的模式是 ``'r'``\\ (開啟並讀取文字,同 ``'rt'``)。對於二進位制寫入," "``'w+b'`` 模式開啟並把檔案內容變成 0 bytes,``'r+b'`` 則不會捨棄原始內容。" -#: ../../library/functions.rst:1222 +#: ../../library/functions.rst:1226 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -2131,14 +2137,14 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../library/functions.rst:1232 +#: ../../library/functions.rst:1236 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " "platform-independent." msgstr "" -#: ../../library/functions.rst:1236 +#: ../../library/functions.rst:1240 msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " @@ -2151,7 +2157,7 @@ msgid "" "*buffering* argument is given, the default buffering policy works as follows:" msgstr "" -#: ../../library/functions.rst:1246 +#: ../../library/functions.rst:1250 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2159,14 +2165,14 @@ msgid "" "systems, the buffer will typically be 4096 or 8192 bytes long." msgstr "" -#: ../../library/functions.rst:1251 +#: ../../library/functions.rst:1255 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " "described above for binary files." msgstr "" -#: ../../library/functions.rst:1255 +#: ../../library/functions.rst:1259 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -2175,7 +2181,7 @@ msgid "" "the list of supported encodings." msgstr "" -#: ../../library/functions.rst:1261 +#: ../../library/functions.rst:1265 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -2184,25 +2190,25 @@ msgid "" "register_error` is also valid. The standard names include:" msgstr "" -#: ../../library/functions.rst:1269 +#: ../../library/functions.rst:1273 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." msgstr "" -#: ../../library/functions.rst:1273 +#: ../../library/functions.rst:1277 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." msgstr "" -#: ../../library/functions.rst:1276 +#: ../../library/functions.rst:1280 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." msgstr "" -#: ../../library/functions.rst:1279 +#: ../../library/functions.rst:1283 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " @@ -2211,33 +2217,33 @@ msgid "" "an unknown encoding." msgstr "" -#: ../../library/functions.rst:1286 +#: ../../library/functions.rst:1290 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " "character reference :samp:`&#{nnn};`." msgstr "" -#: ../../library/functions.rst:1290 +#: ../../library/functions.rst:1294 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." msgstr "" -#: ../../library/functions.rst:1293 +#: ../../library/functions.rst:1297 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." msgstr "" -#: ../../library/functions.rst:1301 +#: ../../library/functions.rst:1305 msgid "" "*newline* determines how to parse newline characters from the stream. It can " "be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " "follows:" msgstr "" -#: ../../library/functions.rst:1305 +#: ../../library/functions.rst:1309 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2248,7 +2254,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../library/functions.rst:1313 +#: ../../library/functions.rst:1317 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2257,7 +2263,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../library/functions.rst:1319 +#: ../../library/functions.rst:1323 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -2265,7 +2271,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../library/functions.rst:1324 +#: ../../library/functions.rst:1328 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2274,11 +2280,11 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../library/functions.rst:1330 +#: ../../library/functions.rst:1334 msgid "The newly created file is :ref:`non-inheritable `." msgstr "新建立的檔案是\\ :ref:`不可繼承的 `。" -#: ../../library/functions.rst:1332 +#: ../../library/functions.rst:1336 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" @@ -2288,7 +2294,7 @@ msgstr "" "\n" "::" -#: ../../library/functions.rst:1345 +#: ../../library/functions.rst:1349 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -2303,7 +2309,7 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../library/functions.rst:1366 +#: ../../library/functions.rst:1370 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" @@ -2313,7 +2319,7 @@ msgstr "" "`open` 的 module )、:mod:`os`、:mod:`os.path`、:mod:`tempfile` 以及 :mod:" "`shutil`。" -#: ../../library/functions.rst:1370 +#: ../../library/functions.rst:1374 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." @@ -2321,25 +2327,25 @@ msgstr "" "引發一個附帶引數 ``file``、``model``、``flags`` 的\\ :ref:`稽核事件 " "` ``open``。" -#: ../../library/functions.rst:1372 +#: ../../library/functions.rst:1376 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../library/functions.rst:1377 +#: ../../library/functions.rst:1381 msgid "The *opener* parameter was added." msgstr "增加了 *opener* 參數。" -#: ../../library/functions.rst:1378 +#: ../../library/functions.rst:1382 msgid "The ``'x'`` mode was added." msgstr "增加了 ``'x'`` 模式。" -#: ../../library/functions.rst:1379 +#: ../../library/functions.rst:1383 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "過去觸發的 :exc:`IOError`,現在是 :exc:`OSError` 的別名。" -#: ../../library/functions.rst:1380 +#: ../../library/functions.rst:1384 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2347,11 +2353,11 @@ msgstr "" "如果檔案已存在但使用了唯一性建立模式 (\\ ``'x'``\\ ),現在會觸發 :exc:" "`FileExistsError`。" -#: ../../library/functions.rst:1385 +#: ../../library/functions.rst:1389 msgid "The file is now non-inheritable." msgstr "檔案在當前版本開始禁止繼承。" -#: ../../library/functions.rst:1389 +#: ../../library/functions.rst:1393 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -2360,15 +2366,15 @@ msgstr "" "如果系統呼叫被中斷,但訊號處理程序沒有觸發例外,此函式現在會重試系統呼叫,而" "不是觸發 :exc:`InterruptedError`\\ (原因詳見 :pep:`475`)。" -#: ../../library/functions.rst:1392 +#: ../../library/functions.rst:1396 msgid "The ``'namereplace'`` error handler was added." msgstr "增加了 ``'namereplace'`` 錯誤處理程式。" -#: ../../library/functions.rst:1396 +#: ../../library/functions.rst:1400 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "增加對實現了 :class:`os.PathLike` 物件的支援。" -#: ../../library/functions.rst:1397 +#: ../../library/functions.rst:1401 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2376,11 +2382,11 @@ msgstr "" "在 Windows 上,開啟一個控制臺緩衝區可能會回傳 :class:`io.RawIOBase` 的 " "subclass,而不是 :class:`io.FileIO`。" -#: ../../library/functions.rst:1400 +#: ../../library/functions.rst:1404 msgid "The ``'U'`` mode has been removed." msgstr "``'U'`` 模式被移除。" -#: ../../library/functions.rst:1405 +#: ../../library/functions.rst:1409 msgid "" "Given a string representing one Unicode character, return an integer " "representing the Unicode code point of that character. For example, " @@ -2391,7 +2397,7 @@ msgstr "" "``ord('a')`` 回傳整數 ``97``、\\ ``ord('€')``\\ (歐元符號)回傳 ``8364``。這" "是 :func:`chr` 的逆函式。" -#: ../../library/functions.rst:1413 +#: ../../library/functions.rst:1417 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2402,7 +2408,7 @@ msgstr "" "*mod* 取餘數(比直接呼叫 ``pow(base, exp) % mod`` 計算更高效)。兩個引數形式" "的 ``pow(exp, exp)`` 等價於次方運算子:``base**exp``。" -#: ../../library/functions.rst:1418 +#: ../../library/functions.rst:1422 msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2415,7 +2421,7 @@ msgid "" "close to ``3j``." msgstr "" -#: ../../library/functions.rst:1428 +#: ../../library/functions.rst:1432 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2424,29 +2430,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../library/functions.rst:1434 +#: ../../library/functions.rst:1438 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../library/functions.rst:1441 +#: ../../library/functions.rst:1445 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." msgstr "" -#: ../../library/functions.rst:1446 +#: ../../library/functions.rst:1450 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../library/functions.rst:1453 +#: ../../library/functions.rst:1457 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " "keyword arguments." msgstr "" -#: ../../library/functions.rst:1457 +#: ../../library/functions.rst:1461 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2455,7 +2461,7 @@ msgid "" "*end*." msgstr "" -#: ../../library/functions.rst:1463 +#: ../../library/functions.rst:1467 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2463,38 +2469,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../library/functions.rst:1468 +#: ../../library/functions.rst:1472 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." msgstr "" -#: ../../library/functions.rst:1472 +#: ../../library/functions.rst:1476 msgid "Added the *flush* keyword argument." msgstr "增加了 *flush* 關鍵字引數。" -#: ../../library/functions.rst:1478 +#: ../../library/functions.rst:1482 msgid "Return a property attribute." msgstr "回傳 property 屬性。" -#: ../../library/functions.rst:1480 +#: ../../library/functions.rst:1484 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " "attribute value. And *doc* creates a docstring for the attribute." msgstr "" -#: ../../library/functions.rst:1484 +#: ../../library/functions.rst:1488 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../library/functions.rst:1501 +#: ../../library/functions.rst:1505 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter, and ``del c.x`` the deleter." msgstr "" -#: ../../library/functions.rst:1504 +#: ../../library/functions.rst:1508 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2502,14 +2508,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../library/functions.rst:1517 +#: ../../library/functions.rst:1521 msgid "" "The ``@property`` decorator turns the :meth:`!voltage` method into a " "\"getter\" for a read-only attribute with the same name, and it sets the " "docstring for *voltage* to \"Get the current voltage.\"" msgstr "" -#: ../../library/functions.rst:1525 +#: ../../library/functions.rst:1529 msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " "as decorators that create a copy of the property with the corresponding " @@ -2517,30 +2523,30 @@ msgid "" "with an example:" msgstr "" -#: ../../library/functions.rst:1549 +#: ../../library/functions.rst:1553 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " "case.)" msgstr "" -#: ../../library/functions.rst:1553 +#: ../../library/functions.rst:1557 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../library/functions.rst:1556 +#: ../../library/functions.rst:1560 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../library/functions.rst:1565 +#: ../../library/functions.rst:1569 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1571 +#: ../../library/functions.rst:1575 msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " @@ -2553,11 +2559,11 @@ msgid "" "raise :exc:`RuntimeError`." msgstr "" -#: ../../library/functions.rst:1582 +#: ../../library/functions.rst:1586 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: ../../library/functions.rst:1595 +#: ../../library/functions.rst:1599 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`~object.__reversed__` method or supports the sequence protocol (the :" @@ -2565,14 +2571,14 @@ msgid "" "with integer arguments starting at ``0``)." msgstr "" -#: ../../library/functions.rst:1603 +#: ../../library/functions.rst:1607 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " "input." msgstr "" -#: ../../library/functions.rst:1607 +#: ../../library/functions.rst:1611 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2583,13 +2589,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../library/functions.rst:1616 +#: ../../library/functions.rst:1620 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../library/functions.rst:1621 +#: ../../library/functions.rst:1625 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2598,21 +2604,21 @@ msgid "" "information." msgstr "" -#: ../../library/functions.rst:1633 +#: ../../library/functions.rst:1637 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" "set` for documentation about this class." msgstr "" -#: ../../library/functions.rst:1637 +#: ../../library/functions.rst:1641 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " "module." msgstr "" -#: ../../library/functions.rst:1644 +#: ../../library/functions.rst:1648 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string, and an arbitrary value. The string may name an existing attribute " @@ -2621,7 +2627,7 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../library/functions.rst:1650 +#: ../../library/functions.rst:1654 msgid "" "*name* need not be a Python identifier as defined in :ref:`identifiers` " "unless the object chooses to enforce that, for example in a custom :meth:" @@ -2630,21 +2636,21 @@ msgid "" "notation, but is accessible through :func:`getattr` etc.." msgstr "" -#: ../../library/functions.rst:1658 +#: ../../library/functions.rst:1662 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " "with two leading underscores) name in order to set it with :func:`setattr`." msgstr "" -#: ../../library/functions.rst:1667 +#: ../../library/functions.rst:1671 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " "``None``." msgstr "" -#: ../../library/functions.rst:1675 +#: ../../library/functions.rst:1679 msgid "" "Slice objects have read-only data attributes :attr:`!start`, :attr:`!stop`, " "and :attr:`!step` which merely return the argument values (or their " @@ -2652,48 +2658,48 @@ msgid "" "by NumPy and other third-party packages." msgstr "" -#: ../../library/functions.rst:1680 +#: ../../library/functions.rst:1684 msgid "" "Slice objects are also generated when extended indexing syntax is used. For " "example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :func:" "`itertools.islice` for an alternate version that returns an :term:`iterator`." msgstr "" -#: ../../library/functions.rst:1685 +#: ../../library/functions.rst:1689 msgid "" "Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" "`~slice.stop`, and :attr:`~slice.step` are hashable)." msgstr "" -#: ../../library/functions.rst:1691 +#: ../../library/functions.rst:1695 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../library/functions.rst:1693 +#: ../../library/functions.rst:1697 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選擇性引數,只能使用關鍵字引數來指定。" -#: ../../library/functions.rst:1695 +#: ../../library/functions.rst:1699 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." "lower``). The default value is ``None`` (compare the elements directly)." msgstr "" -#: ../../library/functions.rst:1699 +#: ../../library/functions.rst:1703 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/functions.rst:1702 +#: ../../library/functions.rst:1706 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../library/functions.rst:1705 +#: ../../library/functions.rst:1709 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2701,7 +2707,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../library/functions.rst:1710 +#: ../../library/functions.rst:1714 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2713,22 +2719,22 @@ msgid "" "method." msgstr "" -#: ../../library/functions.rst:1719 +#: ../../library/functions.rst:1723 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/functions.rst:1723 +#: ../../library/functions.rst:1727 msgid "Transform a method into a static method." msgstr "" -#: ../../library/functions.rst:1725 +#: ../../library/functions.rst:1729 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../library/functions.rst:1732 +#: ../../library/functions.rst:1736 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2736,7 +2742,7 @@ msgstr "" "``@staticmethod`` 語法是一個函式 :term:`decorator` - 參見 :ref:`function` 中" "的詳細介紹。" -#: ../../library/functions.rst:1735 +#: ../../library/functions.rst:1739 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). Moreover, the static method :term:" @@ -2744,14 +2750,14 @@ msgid "" "(such as ``f()``)." msgstr "" -#: ../../library/functions.rst:1740 +#: ../../library/functions.rst:1744 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " "class constructors." msgstr "" -#: ../../library/functions.rst:1744 +#: ../../library/functions.rst:1748 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2760,36 +2766,36 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../library/functions.rst:1756 +#: ../../library/functions.rst:1760 msgid "For more information on static methods, see :ref:`types`." msgstr "關於 static method 的更多資訊,請參考 :ref:`types`。" -#: ../../library/functions.rst:1758 +#: ../../library/functions.rst:1762 msgid "" "Static methods now inherit the method attributes (``__module__``, " "``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), have a " "new ``__wrapped__`` attribute, and are now callable as regular functions." msgstr "" -#: ../../library/functions.rst:1773 +#: ../../library/functions.rst:1777 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../library/functions.rst:1775 +#: ../../library/functions.rst:1779 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../library/functions.rst:1781 +#: ../../library/functions.rst:1785 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " "is not allowed to be a string." msgstr "" -#: ../../library/functions.rst:1785 +#: ../../library/functions.rst:1789 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2798,37 +2804,37 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../library/functions.rst:1791 +#: ../../library/functions.rst:1795 msgid "The *start* parameter can be specified as a keyword argument." msgstr "*start* 參數可被指定為關鍵字引數。" -#: ../../library/functions.rst:1794 +#: ../../library/functions.rst:1798 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy on " "most builds." msgstr "" -#: ../../library/functions.rst:1801 +#: ../../library/functions.rst:1805 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " "been overridden in a class." msgstr "" -#: ../../library/functions.rst:1805 +#: ../../library/functions.rst:1809 msgid "" "The *object_or_type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." msgstr "" -#: ../../library/functions.rst:1809 +#: ../../library/functions.rst:1813 msgid "" "For example, if :attr:`~class.__mro__` of *object_or_type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " "searches ``C -> A -> object``." msgstr "" -#: ../../library/functions.rst:1813 +#: ../../library/functions.rst:1817 msgid "" "The :attr:`~class.__mro__` attribute of the *object_or_type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2836,7 +2842,7 @@ msgid "" "hierarchy is updated." msgstr "" -#: ../../library/functions.rst:1818 +#: ../../library/functions.rst:1822 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2844,7 +2850,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../library/functions.rst:1823 +#: ../../library/functions.rst:1827 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2852,7 +2858,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../library/functions.rst:1828 +#: ../../library/functions.rst:1832 msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " @@ -2865,18 +2871,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../library/functions.rst:1838 +#: ../../library/functions.rst:1842 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../library/functions.rst:1845 +#: ../../library/functions.rst:1849 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " "` in a parent or sibling class." msgstr "" -#: ../../library/functions.rst:1849 +#: ../../library/functions.rst:1853 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2886,7 +2892,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../library/functions.rst:1857 +#: ../../library/functions.rst:1861 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -2896,33 +2902,33 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../library/functions.rst:1864 +#: ../../library/functions.rst:1868 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../library/functions.rst:1874 +#: ../../library/functions.rst:1878 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1883 +#: ../../library/functions.rst:1887 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." "__class__ `." msgstr "" -#: ../../library/functions.rst:1887 +#: ../../library/functions.rst:1891 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." msgstr "" -#: ../../library/functions.rst:1891 +#: ../../library/functions.rst:1895 msgid "" "With three arguments, return a new type object. This is essentially a " "dynamic form of the :keyword:`class` statement. The *name* string is the " @@ -2935,11 +2941,11 @@ msgid "" "identical :class:`type` objects:" msgstr "" -#: ../../library/functions.rst:1906 +#: ../../library/functions.rst:1910 msgid "See also :ref:`bltin-type-objects`." msgstr "另請參閱 :ref:`bltin-type-objects`。" -#: ../../library/functions.rst:1908 +#: ../../library/functions.rst:1912 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2947,23 +2953,23 @@ msgid "" "would." msgstr "" -#: ../../library/functions.rst:1913 +#: ../../library/functions.rst:1917 msgid "See also :ref:`class-customization`." msgstr "另請參閱 :ref:`class-customization`。" -#: ../../library/functions.rst:1915 +#: ../../library/functions.rst:1919 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 "" -#: ../../library/functions.rst:1922 +#: ../../library/functions.rst:1926 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`~object.__dict__` attribute." msgstr "" -#: ../../library/functions.rst:1925 +#: ../../library/functions.rst:1929 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2971,54 +2977,54 @@ msgid "" "`types.MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../library/functions.rst:1930 +#: ../../library/functions.rst:1934 msgid "" "Without an argument, :func:`vars` acts like :func:`locals`. Note, the " "locals dictionary is only useful for reads since updates to the locals " "dictionary are ignored." msgstr "" -#: ../../library/functions.rst:1934 +#: ../../library/functions.rst:1938 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: ../../library/functions.rst:1940 +#: ../../library/functions.rst:1944 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../library/functions.rst:1943 +#: ../../library/functions.rst:1947 msgid "Example::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:1952 +#: ../../library/functions.rst:1956 msgid "" "More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " "tuple contains the *i*-th element from each of the argument iterables." msgstr "" -#: ../../library/functions.rst:1955 +#: ../../library/functions.rst:1959 msgid "" "Another way to think of :func:`zip` is that it turns rows into columns, and " "columns into rows. This is similar to `transposing a matrix `_." msgstr "" -#: ../../library/functions.rst:1959 +#: ../../library/functions.rst:1963 msgid "" ":func:`zip` is lazy: The elements won't be processed until the iterable is " "iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" "`list`." msgstr "" -#: ../../library/functions.rst:1963 +#: ../../library/functions.rst:1967 msgid "" "One thing to consider is that the iterables passed to :func:`zip` could have " "different lengths; sometimes by design, and sometimes because of a bug in " @@ -3026,51 +3032,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../library/functions.rst:1968 +#: ../../library/functions.rst:1972 msgid "" "By default, :func:`zip` stops when the shortest iterable is exhausted. It " "will ignore the remaining items in the longer iterables, cutting off the " "result to the length of the shortest iterable::" msgstr "" -#: ../../library/functions.rst:1975 +#: ../../library/functions.rst:1979 msgid "" ":func:`zip` is often used in cases where the iterables are assumed to be of " "equal length. In such cases, it's recommended to use the ``strict=True`` " "option. Its output is the same as regular :func:`zip`::" msgstr "" -#: ../../library/functions.rst:1982 +#: ../../library/functions.rst:1986 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -#: ../../library/functions.rst:2000 +#: ../../library/functions.rst:2004 msgid "" "Without the ``strict=True`` argument, any bug that results in iterables of " "different lengths will be silenced, possibly manifesting as a hard-to-find " "bug in another part of the program." msgstr "" -#: ../../library/functions.rst:2004 +#: ../../library/functions.rst:2008 msgid "" "Shorter iterables can be padded with a constant value to make all the " "iterables have the same length. This is done by :func:`itertools." "zip_longest`." msgstr "" -#: ../../library/functions.rst:2008 +#: ../../library/functions.rst:2012 msgid "" "Edge cases: With a single iterable argument, :func:`zip` returns an iterator " "of 1-tuples. With no arguments, it returns an empty iterator." msgstr "" -#: ../../library/functions.rst:2011 +#: ../../library/functions.rst:2015 msgid "Tips and tricks:" msgstr "" -#: ../../library/functions.rst:2013 +#: ../../library/functions.rst:2017 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -3079,23 +3085,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../library/functions.rst:2019 +#: ../../library/functions.rst:2023 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../library/functions.rst:2030 +#: ../../library/functions.rst:2034 msgid "Added the ``strict`` argument." msgstr "增加了 ``strict`` 引數。" -#: ../../library/functions.rst:2042 +#: ../../library/functions.rst:2046 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2045 +#: ../../library/functions.rst:2049 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3107,7 +3113,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2054 +#: ../../library/functions.rst:2058 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3117,7 +3123,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:2061 +#: ../../library/functions.rst:2065 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3126,7 +3132,7 @@ msgid "" "details)." msgstr "" -#: ../../library/functions.rst:2067 +#: ../../library/functions.rst:2071 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -3134,58 +3140,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../library/functions.rst:2072 +#: ../../library/functions.rst:2076 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../library/functions.rst:2077 +#: ../../library/functions.rst:2081 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../library/functions.rst:2081 +#: ../../library/functions.rst:2085 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:2084 +#: ../../library/functions.rst:2088 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../library/functions.rst:2091 +#: ../../library/functions.rst:2095 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " "respective names." msgstr "" -#: ../../library/functions.rst:2095 +#: ../../library/functions.rst:2099 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2098 +#: ../../library/functions.rst:2102 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../library/functions.rst:2102 +#: ../../library/functions.rst:2106 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" -#: ../../library/functions.rst:2107 +#: ../../library/functions.rst:2111 msgid "Footnotes" msgstr "註解" -#: ../../library/functions.rst:2108 +#: ../../library/functions.rst:2112 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " @@ -3198,7 +3204,7 @@ msgstr "" msgid "Boolean" msgstr "Boolean(布林值)" -#: ../../library/functions.rst:153 ../../library/functions.rst:1881 +#: ../../library/functions.rst:153 ../../library/functions.rst:1885 msgid "type" msgstr "type(型別)" @@ -3210,95 +3216,95 @@ msgstr "built-in function(內建函式)" msgid "exec" msgstr "exec" -#: ../../library/functions.rst:663 +#: ../../library/functions.rst:667 msgid "NaN" msgstr "NaN" -#: ../../library/functions.rst:663 +#: ../../library/functions.rst:667 msgid "Infinity" msgstr "Infinity(無窮)" -#: ../../library/functions.rst:727 +#: ../../library/functions.rst:731 msgid "__format__" msgstr "__format__" -#: ../../library/functions.rst:727 ../../library/functions.rst:1765 +#: ../../library/functions.rst:731 ../../library/functions.rst:1769 msgid "string" msgstr "string(字串)" -#: ../../library/functions.rst:727 +#: ../../library/functions.rst:731 msgid "format() (built-in function)" msgstr "format()(內建函式)" -#: ../../library/functions.rst:1175 +#: ../../library/functions.rst:1179 msgid "file object" msgstr "file object(檔案物件)" -#: ../../library/functions.rst:1175 ../../library/functions.rst:1296 +#: ../../library/functions.rst:1179 ../../library/functions.rst:1300 msgid "open() built-in function" msgstr "open() 內建函式" -#: ../../library/functions.rst:1203 +#: ../../library/functions.rst:1207 msgid "file" msgstr "file(檔案)" -#: ../../library/functions.rst:1203 +#: ../../library/functions.rst:1207 msgid "modes" msgstr "modes(模式)" -#: ../../library/functions.rst:1296 +#: ../../library/functions.rst:1300 msgid "universal newlines" msgstr "universal newlines" -#: ../../library/functions.rst:1357 +#: ../../library/functions.rst:1361 msgid "line-buffered I/O" msgstr "line-buffered I/O(列緩衝 I/O)" -#: ../../library/functions.rst:1357 +#: ../../library/functions.rst:1361 msgid "unbuffered I/O" msgstr "unbuffered I/O(非緩衝 I/O)" -#: ../../library/functions.rst:1357 +#: ../../library/functions.rst:1361 msgid "buffer size, I/O" msgstr "buffer size, I/O(緩衝區大小、I/O)" -#: ../../library/functions.rst:1357 +#: ../../library/functions.rst:1361 msgid "I/O control" msgstr "I/O control(I/O 控制)" -#: ../../library/functions.rst:1357 +#: ../../library/functions.rst:1361 msgid "buffering" msgstr "buffering(緩衝)" -#: ../../library/functions.rst:1357 +#: ../../library/functions.rst:1361 msgid "text mode" msgstr "text mode(文字模式)" -#: ../../library/functions.rst:1357 ../../library/functions.rst:2036 +#: ../../library/functions.rst:1361 ../../library/functions.rst:2040 msgid "module" msgstr "module(模組)" -#: ../../library/functions.rst:1357 +#: ../../library/functions.rst:1361 msgid "sys" msgstr "sys" -#: ../../library/functions.rst:1765 +#: ../../library/functions.rst:1769 msgid "str() (built-in function)" msgstr "str() (內建函式)" -#: ../../library/functions.rst:1881 +#: ../../library/functions.rst:1885 msgid "object" msgstr "object(物件)" -#: ../../library/functions.rst:2036 +#: ../../library/functions.rst:2040 msgid "statement" msgstr "statement(陳述式)" -#: ../../library/functions.rst:2036 +#: ../../library/functions.rst:2040 msgid "import" msgstr "import(引入)" -#: ../../library/functions.rst:2036 +#: ../../library/functions.rst:2040 msgid "builtins" msgstr "builtins(內建)" diff --git a/library/unittest.mock.po b/library/unittest.mock.po index 1074a6cc522..cf39b04d3bd 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-21 00:03+0000\n" "PO-Revision-Date: 2024-02-19 21:27+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -459,13 +459,15 @@ msgid "Added two keyword-only arguments to the reset_mock function." msgstr "reset_mock 函式新增了兩個僅限關鍵字引數 (keyword-only arguments)。" #: ../../library/unittest.mock.rst:411 +#, fuzzy msgid "" "This can be useful where you want to make a series of assertions that reuse " -"the same object. Note that :meth:`reset_mock` *doesn't* clear the return " -"value, :attr:`side_effect` or any child attributes you have set using normal " -"assignment by default. In case you want to reset *return_value* or :attr:" -"`side_effect`, then pass the corresponding parameter as ``True``. Child " -"mocks and the return value mock (if any) are reset as well." +"the same object. Note that :meth:`reset_mock` *doesn't* clear the :attr:" +"`return_value`, :attr:`side_effect` or any child attributes you have set " +"using normal assignment by default. In case you want to reset :attr:" +"`return_value` or :attr:`side_effect`, then pass the corresponding parameter " +"as ``True``. Child mocks and the return value mock (if any) are reset as " +"well." msgstr "" "這在你想要進行一系列重複使用同一物件的斷言時非常有用。請注意,預設情況下,:" "meth:`reset_mock` *不會*\\ 清除回傳值、:attr:`side_effect` 或使用普通賦值設定" @@ -473,7 +475,8 @@ msgstr "" "的參數設置為 ``True``。Child mock 和回傳值 mock(如果有的話)也會被重置。" #: ../../library/unittest.mock.rst:419 -msgid "*return_value*, and :attr:`side_effect` are keyword-only arguments." +#, fuzzy +msgid "*return_value*, and *side_effect* are keyword-only arguments." msgstr "*return_value* 和 :attr:`side_effect` 是僅限關鍵字引數。" #: ../../library/unittest.mock.rst:425 @@ -2737,50 +2740,26 @@ msgid "Before I explain how auto-speccing works, here's why it is needed." msgstr "在解釋自動規格如何運作之前,我們先解釋為什麼需要它。" #: ../../library/unittest.mock.rst:2538 +#, fuzzy msgid "" -":class:`Mock` is a very powerful and flexible object, but it suffers from " -"two flaws when used to mock out objects from a system under test. One of " -"these flaws is specific to the :class:`Mock` api and the other is a more " -"general problem with using mock objects." -msgstr "" -":class:`Mock` 是一個非常強大且靈活的物件,但是當用於從被測試的系統中 mock " -"out 物件時,它有兩個缺陷。其中一個缺陷是 :class:`Mock` api 特有的,另一個缺陷" -"是使用 mock 物件時出現的更普遍的問題。" - -#: ../../library/unittest.mock.rst:2543 -msgid "" -"First the problem specific to :class:`Mock`. :class:`Mock` has two assert " -"methods that are extremely handy: :meth:`~Mock.assert_called_with` and :meth:" -"`~Mock.assert_called_once_with`." -msgstr "" -"首先是 :class:`Mock` 特有的問題。:class:`Mock` 有兩個非常方便的斷言方法::" -"meth:`~Mock.assert_used_with` 和 :meth:`~Mock.assert_used_once_with`。" - -#: ../../library/unittest.mock.rst:2556 -msgid "" -"Because mocks auto-create attributes on demand, and allow you to call them " -"with arbitrary arguments, if you misspell one of these assert methods then " -"your assertion is gone:" -msgstr "" -"因為 mock 會根據需要自動建立屬性,並允許你使用任意引數呼叫它們,所以如果你拼" -"錯了其中一個斷言方法,那麼你的斷言就不見了:" - -#: ../../library/unittest.mock.rst:2566 -msgid "Your tests can pass silently and incorrectly because of the typo." -msgstr "由於拼字錯誤,你的測試可能會安靜且錯誤地通過。" - -#: ../../library/unittest.mock.rst:2568 -msgid "" -"The second issue is more general to mocking. If you refactor some of your " -"code, rename members and so on, any tests for code that is still using the " -"*old api* but uses mocks instead of the real objects will still pass. This " -"means your tests can all pass even though your code is broken." +":class:`Mock` is a very powerful and flexible object, but it suffers from a " +"flaw which is general to mocking. If you refactor some of your code, rename " +"members and so on, any tests for code that is still using the *old api* but " +"uses mocks instead of the real objects will still pass. This means your " +"tests can all pass even though your code is broken." msgstr "" "第二個問題對於 mock 來說更為普遍。如果你重構某些程式碼、重新命名成員等等,則" "對任何仍然使用\\ *舊 api* 但使用 mock 而不是真實物件的程式碼的測試仍然會通" "過。這意味著即使你的程式碼已經壞了,你的測試也可以全部通過。" -#: ../../library/unittest.mock.rst:2573 +#: ../../library/unittest.mock.rst:2546 +msgid "" +"Before 3.5, tests with a typo in the word assert would silently pass when " +"they should raise an error. You can still achieve this behavior by passing " +"``unsafe=True`` to Mock." +msgstr "" + +#: ../../library/unittest.mock.rst:2549 msgid "" "Note that this is another reason why you need integration tests as well as " "unit tests. Testing everything in isolation is all fine and dandy, but if " @@ -2790,7 +2769,7 @@ msgstr "" "謹記這是你需要有整合測試和單元測試的另一個原因。單獨測試所有內容都很好,但如" "果你不測試你的單元是如何「連接在一起」的,那麼測試還是有機會發現很多錯誤。" -#: ../../library/unittest.mock.rst:2578 +#: ../../library/unittest.mock.rst:2554 msgid "" ":mod:`mock` already provides a feature to help with this, called speccing. " "If you use a class or instance as the :attr:`spec` for a mock then you can " @@ -2800,13 +2779,13 @@ msgstr "" "類別或實例作為 mock 的 :attr:`spec`,那麼你在 mock 上只能存取真實類別中存在的" "屬性:" -#: ../../library/unittest.mock.rst:2589 +#: ../../library/unittest.mock.rst:2565 msgid "" "The spec only applies to the mock itself, so we still have the same issue " "with any methods on the mock:" msgstr "該規格僅適用於 mock 本身,因此在 mock 上的任何方法仍然有相同的問題:" -#: ../../library/unittest.mock.rst:2598 +#: ../../library/unittest.mock.rst:2574 msgid "" "Auto-speccing solves this problem. You can either pass ``autospec=True`` to :" "func:`patch` / :func:`patch.object` or use the :func:`create_autospec` " @@ -2824,11 +2803,11 @@ msgstr "" "的),所以你可以將它與非常複雜或深度巢狀使用的物件(例如連續引用的模組)一起" "使用,而不會過於影響性能。" -#: ../../library/unittest.mock.rst:2607 +#: ../../library/unittest.mock.rst:2583 msgid "Here's an example of it in use::" msgstr "這是一個正在使用的例子: ::" -#: ../../library/unittest.mock.rst:2617 +#: ../../library/unittest.mock.rst:2593 msgid "" "You can see that :class:`request.Request` has a spec. :class:`request." "Request` takes two arguments in the constructor (one of which is *self*). " @@ -2838,13 +2817,13 @@ msgstr "" "構函式中接受兩個引數(其中之一是 *self*\\ )。如果我們錯誤地呼叫它,會發生以" "下情況: ::" -#: ../../library/unittest.mock.rst:2626 +#: ../../library/unittest.mock.rst:2602 msgid "" "The spec also applies to instantiated classes (i.e. the return value of " "specced mocks)::" msgstr "此規格也適用於實例化的類別(即有規格的 mock 的回傳值): ::" -#: ../../library/unittest.mock.rst:2633 +#: ../../library/unittest.mock.rst:2609 msgid "" ":class:`Request` objects are not callable, so the return value of " "instantiating our mocked out :class:`request.Request` is a non-callable " @@ -2855,7 +2834,7 @@ msgstr "" "`request.Request` 的回傳值是不可呼叫的 mock。規格到位後,斷言中的任何拼字錯誤" "都會引發正確的錯誤: ::" -#: ../../library/unittest.mock.rst:2645 +#: ../../library/unittest.mock.rst:2621 msgid "" "In many cases you will just be able to add ``autospec=True`` to your " "existing :func:`patch` calls and then be protected against bugs due to typos " @@ -2864,7 +2843,7 @@ msgstr "" "在許多情況下,你只需要將 ``autospec=True`` 新增至現有的 :func:`patch` 呼叫" "中,然後就可以防止因拼字錯誤和 api 變更而導致的錯誤。" -#: ../../library/unittest.mock.rst:2649 +#: ../../library/unittest.mock.rst:2625 msgid "" "As well as using *autospec* through :func:`patch` there is a :func:" "`create_autospec` for creating autospecced mocks directly:" @@ -2872,7 +2851,7 @@ msgstr "" "除了透過 :func:`patch` 使用 *autospec* 之外,還有一個 :func:" "`create_autospec` 用於直接建立有自動規格的 mock:" -#: ../../library/unittest.mock.rst:2657 +#: ../../library/unittest.mock.rst:2633 msgid "" "This isn't without caveats and limitations however, which is why it is not " "the default behaviour. In order to know what attributes are available on the " @@ -2889,7 +2868,7 @@ msgstr "" "描述器,那麼你可能無法使用 autospec。換句話說,設計你的物件讓內省是安全的 " "[#]_ 會比較好。" -#: ../../library/unittest.mock.rst:2666 +#: ../../library/unittest.mock.rst:2642 msgid "" "A more serious problem is that it is common for instance attributes to be " "created in the :meth:`~object.__init__` method and not to exist on the class " @@ -2900,7 +2879,7 @@ msgstr "" "而其根本不存在於類別中。*autospec* 無法知道任何動態建立的屬性,並將 api 限制" "為可見的屬性。: ::" -#: ../../library/unittest.mock.rst:2683 +#: ../../library/unittest.mock.rst:2659 msgid "" "There are a few different ways of resolving this problem. The easiest, but " "not necessarily the least annoying, way is to simply set the required " @@ -2912,7 +2891,7 @@ msgstr "" "在 mock 上設定所需的屬性。因為雖然 *autospec* 不允許你取得規格中不存在的屬" "性,但是它不會阻止你設定它們: ::" -#: ../../library/unittest.mock.rst:2694 +#: ../../library/unittest.mock.rst:2670 msgid "" "There is a more aggressive version of both *spec* and *autospec* that *does* " "prevent you setting non-existent attributes. This is useful if you want to " @@ -2923,7 +2902,7 @@ msgstr "" "屬性。如果你想確保你的程式碼僅能\\ *設定*\\ 有效的屬性,那麼這會很有用,但顯" "然它也順便阻止了這個特殊情況:" -#: ../../library/unittest.mock.rst:2707 +#: ../../library/unittest.mock.rst:2683 msgid "" "Probably the best way of solving the problem is to add class attributes as " "default values for instance members initialised in :meth:`~object.__init__`. " @@ -2935,7 +2914,7 @@ msgstr "" "的實例成員的預設值。請注意,如果你僅在 :meth:`!__init__` 中設定預設屬性,那麼" "透過類別屬性(當然在實例之間共用)提供它們也會更快。例如:" -#: ../../library/unittest.mock.rst:2718 +#: ../../library/unittest.mock.rst:2694 msgid "" "This brings up another issue. It is relatively common to provide a default " "value of ``None`` for members that will later be an object of a different " @@ -2951,7 +2930,7 @@ msgstr "" "他型別的成員,因此自動規格不會對設定為 ``None`` 的成員使用規格。這些會只是普" "通的 mock(通常是 MagicMocks):" -#: ../../library/unittest.mock.rst:2733 +#: ../../library/unittest.mock.rst:2709 msgid "" "If modifying your production classes to add defaults isn't to your liking " "then there are more options. One of these is simply to use an instance as " @@ -2967,7 +2946,7 @@ msgstr "" "你使用替代物件作為規格。值得慶幸的是 :func:`patch` 支援這一點 - 你可以簡單地" "將替代物件作為 *autospec* 引數傳遞: ::" -#: ../../library/unittest.mock.rst:2754 +#: ../../library/unittest.mock.rst:2730 msgid "" "This only applies to classes or already instantiated objects. Calling a " "mocked class to create a mock instance *does not* create a real instance. It " @@ -2976,11 +2955,11 @@ msgstr "" "這只適用於類別或已經實例化的物件。呼叫一個被 mock 的類別來建立一個 mock 實例" "\\ *不會*\\ 建立真的實例。它僅查找屬性及對 :func:`dir` 的呼叫。" -#: ../../library/unittest.mock.rst:2759 +#: ../../library/unittest.mock.rst:2735 msgid "Sealing mocks" msgstr "密封 mock" -#: ../../library/unittest.mock.rst:2768 +#: ../../library/unittest.mock.rst:2744 msgid "" "Seal will disable the automatic creation of mocks when accessing an " "attribute of the mock being sealed or any of its attributes that are already " @@ -2989,7 +2968,7 @@ msgstr "" "當存取被密封的 mock 的屬性或其任何已經遞迴 mock 的屬性時,seal 將停用 mock 的" "自動建立。" -#: ../../library/unittest.mock.rst:2771 +#: ../../library/unittest.mock.rst:2747 msgid "" "If a mock instance with a name or a spec is assigned to an attribute it " "won't be considered in the sealing chain. This allows one to prevent seal " @@ -2998,28 +2977,28 @@ msgstr "" "如果將具有名稱或規格的 mock 實例指派給屬性,則不會出現在密封鏈中。這表示可藉" "由固定 mock 物件的一部分來防止密封。: ::" -#: ../../library/unittest.mock.rst:2787 +#: ../../library/unittest.mock.rst:2763 msgid "" "Order of precedence of :attr:`side_effect`, :attr:`return_value` and *wraps*" msgstr "" -#: ../../library/unittest.mock.rst:2789 +#: ../../library/unittest.mock.rst:2765 msgid "The order of their precedence is:" msgstr "" -#: ../../library/unittest.mock.rst:2791 +#: ../../library/unittest.mock.rst:2767 msgid ":attr:`~Mock.side_effect`" msgstr ":attr:`~Mock.side_effect`" -#: ../../library/unittest.mock.rst:2792 +#: ../../library/unittest.mock.rst:2768 msgid ":attr:`~Mock.return_value`" msgstr ":attr:`~Mock.return_value`" -#: ../../library/unittest.mock.rst:2793 +#: ../../library/unittest.mock.rst:2769 msgid "*wraps*" msgstr "" -#: ../../library/unittest.mock.rst:2795 +#: ../../library/unittest.mock.rst:2771 msgid "" "If all three are set, mock will return the value from :attr:`~Mock." "side_effect`, ignoring :attr:`~Mock.return_value` and the wrapped object " @@ -3028,7 +3007,7 @@ msgid "" "of precedence remains unchanged." msgstr "" -#: ../../library/unittest.mock.rst:2813 +#: ../../library/unittest.mock.rst:2789 msgid "" "As ``None`` is the default value of :attr:`~Mock.side_effect`, if you " "reassign its value back to ``None``, the order of precedence will be checked " @@ -3036,48 +3015,77 @@ msgid "" "`~Mock.side_effect`." msgstr "" -#: ../../library/unittest.mock.rst:2822 +#: ../../library/unittest.mock.rst:2798 msgid "" "If the value being returned by :attr:`~Mock.side_effect` is :data:`DEFAULT`, " "it is ignored and the order of precedence moves to the successor to obtain " "the value to return." msgstr "" -#: ../../library/unittest.mock.rst:2831 +#: ../../library/unittest.mock.rst:2807 msgid "" "When :class:`Mock` wraps an object, the default value of :attr:`~Mock." "return_value` will be :data:`DEFAULT`." msgstr "" -#: ../../library/unittest.mock.rst:2840 +#: ../../library/unittest.mock.rst:2816 msgid "" "The order of precedence will ignore this value and it will move to the last " "successor which is the wrapped object." msgstr "" -#: ../../library/unittest.mock.rst:2843 +#: ../../library/unittest.mock.rst:2819 msgid "" "As the real call is being made to the wrapped object, creating an instance " "of this mock will return the real instance of the class. The positional " "arguments, if any, required by the wrapped object must be passed." msgstr "" -#: ../../library/unittest.mock.rst:2861 +#: ../../library/unittest.mock.rst:2837 msgid "" "But if you assign ``None`` to it, this will not be ignored as it is an " "explicit assignment. So, the order of precedence will not move to the " "wrapped object." msgstr "" -#: ../../library/unittest.mock.rst:2869 +#: ../../library/unittest.mock.rst:2845 msgid "" "Even if you set all three at once when initializing the mock, the order of " "precedence remains the same:" msgstr "" -#: ../../library/unittest.mock.rst:2886 +#: ../../library/unittest.mock.rst:2862 msgid "" "If :attr:`~Mock.side_effect` is exhausted, the order of precedence will not " "cause a value to be obtained from the successors. Instead, ``StopIteration`` " "exception is raised." msgstr "" + +#~ msgid "" +#~ ":class:`Mock` is a very powerful and flexible object, but it suffers from " +#~ "two flaws when used to mock out objects from a system under test. One of " +#~ "these flaws is specific to the :class:`Mock` api and the other is a more " +#~ "general problem with using mock objects." +#~ msgstr "" +#~ ":class:`Mock` 是一個非常強大且靈活的物件,但是當用於從被測試的系統中 mock " +#~ "out 物件時,它有兩個缺陷。其中一個缺陷是 :class:`Mock` api 特有的,另一個" +#~ "缺陷是使用 mock 物件時出現的更普遍的問題。" + +#~ msgid "" +#~ "First the problem specific to :class:`Mock`. :class:`Mock` has two assert " +#~ "methods that are extremely handy: :meth:`~Mock.assert_called_with` and :" +#~ "meth:`~Mock.assert_called_once_with`." +#~ msgstr "" +#~ "首先是 :class:`Mock` 特有的問題。:class:`Mock` 有兩個非常方便的斷言方法::" +#~ "meth:`~Mock.assert_used_with` 和 :meth:`~Mock.assert_used_once_with`。" + +#~ msgid "" +#~ "Because mocks auto-create attributes on demand, and allow you to call " +#~ "them with arbitrary arguments, if you misspell one of these assert " +#~ "methods then your assertion is gone:" +#~ msgstr "" +#~ "因為 mock 會根據需要自動建立屬性,並允許你使用任意引數呼叫它們,所以如果你" +#~ "拼錯了其中一個斷言方法,那麼你的斷言就不見了:" + +#~ msgid "Your tests can pass silently and incorrectly because of the typo." +#~ msgstr "由於拼字錯誤,你的測試可能會安靜且錯誤地通過。" From 869d9cc996b9d214ec3a8a86407f1f34e22f95a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 May 2024 00:04:52 +0000 Subject: [PATCH 10/13] sync with cpython 47b09d2e --- library/socket.po | 182 ++++++++++++++++++++-------------------- tutorial/inputoutput.po | 153 +++++++++++++++++---------------- 2 files changed, 173 insertions(+), 162 deletions(-) diff --git a/library/socket.po b/library/socket.po index 0fac180ee23..65caea62835 100644 --- a/library/socket.po +++ b/library/socket.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-22 00:03+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-" @@ -113,7 +113,7 @@ msgid "" msgstr "" #: ../../library/socket.rst:66 ../../library/socket.rst:1148 -#: ../../library/socket.rst:1190 ../../library/socket.rst:1950 +#: ../../library/socket.rst:1190 ../../library/socket.rst:1951 msgid "Writable :term:`bytes-like object` is now accepted." msgstr "" @@ -288,7 +288,7 @@ msgid "*feat* and *mask* are unsigned 32bit integers." msgstr "" #: ../../library/socket.rst:171 ../../library/socket.rst:589 -#: ../../library/socket.rst:1872 +#: ../../library/socket.rst:1873 msgid ":ref:`Availability `: Linux >= 2.6.38." msgstr ":ref:`適用 `:Linux >= 2.6.38。" @@ -835,7 +835,7 @@ msgid "Constants for Windows Hyper-V sockets for host/guest communications." msgstr "" #: ../../library/socket.rst:679 ../../library/socket.rst:886 -#: ../../library/socket.rst:1978 +#: ../../library/socket.rst:1979 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" @@ -1186,7 +1186,7 @@ msgstr "" #: ../../library/socket.rst:1400 ../../library/socket.rst:1447 #: ../../library/socket.rst:1461 ../../library/socket.rst:1481 #: ../../library/socket.rst:1528 ../../library/socket.rst:1573 -#: ../../library/socket.rst:1956 ../../library/socket.rst:1966 +#: ../../library/socket.rst:1957 ../../library/socket.rst:1967 msgid ":ref:`Availability `: not WASI." msgstr ":ref:`適用 `:非 WASI。" @@ -1442,8 +1442,8 @@ msgstr "" msgid ":ref:`Availability `: Unix, not Emscripten, not WASI." msgstr ":ref:`適用 `:Unix、非 Emscripten、非 WASI。" -#: ../../library/socket.rst:1213 ../../library/socket.rst:1704 -#: ../../library/socket.rst:1748 ../../library/socket.rst:1856 +#: ../../library/socket.rst:1213 ../../library/socket.rst:1705 +#: ../../library/socket.rst:1749 ../../library/socket.rst:1857 msgid "Most Unix platforms." msgstr "" @@ -1497,8 +1497,8 @@ msgstr "" "引發一個附帶引數 ``name`` 的\\ :ref:`稽核事件 ` ``socket." "sethostname``。" -#: ../../library/socket.rst:1263 ../../library/socket.rst:1702 -#: ../../library/socket.rst:1746 +#: ../../library/socket.rst:1263 ../../library/socket.rst:1703 +#: ../../library/socket.rst:1747 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" @@ -1617,10 +1617,10 @@ msgstr "" msgid "The socket is now non-inheritable." msgstr "" -#: ../../library/socket.rst:1387 ../../library/socket.rst:1617 -#: ../../library/socket.rst:1631 ../../library/socket.rst:1708 -#: ../../library/socket.rst:1781 ../../library/socket.rst:1800 -#: ../../library/socket.rst:1817 ../../library/socket.rst:1862 +#: ../../library/socket.rst:1387 ../../library/socket.rst:1618 +#: ../../library/socket.rst:1632 ../../library/socket.rst:1709 +#: ../../library/socket.rst:1782 ../../library/socket.rst:1801 +#: ../../library/socket.rst:1818 ../../library/socket.rst:1863 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the method now retries the system call instead of raising an :exc:" @@ -1832,32 +1832,32 @@ msgid "" "Return a :term:`file object` associated with the socket. The exact returned " "type depends on the arguments given to :meth:`makefile`. These arguments " "are interpreted the same way as by the built-in :func:`open` function, " -"except the only supported *mode* values are ``'r'`` (default), ``'w'`` and " -"``'b'``." +"except the only supported *mode* values are ``'r'`` (default), ``'w'``, " +"``'b'``, or a combination of those." msgstr "" -#: ../../library/socket.rst:1589 +#: ../../library/socket.rst:1590 msgid "" "The socket must be in blocking mode; it can have a timeout, but the file " "object's internal buffer may end up in an inconsistent state if a timeout " "occurs." msgstr "" -#: ../../library/socket.rst:1593 +#: ../../library/socket.rst:1594 msgid "" "Closing the file object returned by :meth:`makefile` won't close the " "original socket unless all other file objects have been closed and :meth:" "`socket.close` has been called on the socket object." msgstr "" -#: ../../library/socket.rst:1599 +#: ../../library/socket.rst:1600 msgid "" "On Windows, the file-like object created by :meth:`makefile` cannot be used " "where a file object with a file descriptor is expected, such as the stream " "arguments of :meth:`subprocess.Popen`." msgstr "" -#: ../../library/socket.rst:1606 +#: ../../library/socket.rst:1607 msgid "" "Receive data from the socket. The return value is a bytes object " "representing the data received. The maximum amount of data to be received " @@ -1867,13 +1867,13 @@ msgid "" "zero." msgstr "" -#: ../../library/socket.rst:1614 +#: ../../library/socket.rst:1615 msgid "" "For best match with hardware and network realities, the value of *bufsize* " "should be a relatively small power of 2, for example, 4096." msgstr "" -#: ../../library/socket.rst:1625 +#: ../../library/socket.rst:1626 msgid "" "Receive data from the socket. The return value is a pair ``(bytes, " "address)`` where *bytes* is a bytes object representing the data received " @@ -1883,14 +1883,14 @@ msgid "" "address family --- see above.)" msgstr "" -#: ../../library/socket.rst:1636 +#: ../../library/socket.rst:1637 msgid "" "For multicast IPv6 address, first item of *address* does not contain " "``%scope_id`` part anymore. In order to get full IPv6 address use :func:" "`getnameinfo`." msgstr "" -#: ../../library/socket.rst:1643 +#: ../../library/socket.rst:1644 msgid "" "Receive normal data (up to *bufsize* bytes) and ancillary data from the " "socket. The *ancbufsize* argument sets the size in bytes of the internal " @@ -1901,7 +1901,7 @@ msgid "" "*flags* argument defaults to 0 and has the same meaning as for :meth:`recv`." msgstr "" -#: ../../library/socket.rst:1653 +#: ../../library/socket.rst:1654 msgid "" "The return value is a 4-tuple: ``(data, ancdata, msg_flags, address)``. The " "*data* item is a :class:`bytes` object holding the non-ancillary data " @@ -1916,7 +1916,7 @@ msgid "" "socket, if available; otherwise, its value is unspecified." msgstr "" -#: ../../library/socket.rst:1667 +#: ../../library/socket.rst:1668 msgid "" "On some systems, :meth:`sendmsg` and :meth:`recvmsg` can be used to pass " "file descriptors between processes over an :const:`AF_UNIX` socket. When " @@ -1929,7 +1929,7 @@ msgid "" "descriptors received via this mechanism." msgstr "" -#: ../../library/socket.rst:1678 +#: ../../library/socket.rst:1679 msgid "" "Some systems do not indicate the truncated length of ancillary data items " "which have been only partially received. If an item appears to extend " @@ -1938,7 +1938,7 @@ msgid "" "provided it has not been truncated before the start of its associated data." msgstr "" -#: ../../library/socket.rst:1685 +#: ../../library/socket.rst:1686 msgid "" "On systems which support the :const:`SCM_RIGHTS` mechanism, the following " "function will receive up to *maxfds* file descriptors, returning the message " @@ -1947,7 +1947,7 @@ msgid "" "meth:`sendmsg`. ::" msgstr "" -#: ../../library/socket.rst:1716 +#: ../../library/socket.rst:1717 msgid "" "Receive normal data and ancillary data from the socket, behaving as :meth:" "`recvmsg` would, but scatter the non-ancillary data into a series of buffers " @@ -1960,7 +1960,7 @@ msgid "" "arguments have the same meaning as for :meth:`recvmsg`." msgstr "" -#: ../../library/socket.rst:1727 +#: ../../library/socket.rst:1728 msgid "" "The return value is a 4-tuple: ``(nbytes, ancdata, msg_flags, address)``, " "where *nbytes* is the total number of bytes of non-ancillary data written " @@ -1968,14 +1968,14 @@ msgid "" "for :meth:`recvmsg`." msgstr "" -#: ../../library/socket.rst:1732 +#: ../../library/socket.rst:1733 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/socket.rst:1755 +#: ../../library/socket.rst:1756 msgid "" "Receive data from the socket, writing it into *buffer* instead of creating a " "new bytestring. The return value is a pair ``(nbytes, address)`` where " @@ -1985,7 +1985,7 @@ msgid "" "format of *address* depends on the address family --- see above.)" msgstr "" -#: ../../library/socket.rst:1765 +#: ../../library/socket.rst:1766 msgid "" "Receive up to *nbytes* bytes from the socket, storing the data into a buffer " "rather than creating a new bytestring. If *nbytes* is not specified (or 0), " @@ -1994,7 +1994,7 @@ msgid "" "of the optional argument *flags*; it defaults to zero." msgstr "" -#: ../../library/socket.rst:1774 +#: ../../library/socket.rst:1775 msgid "" "Send data to the socket. The socket must be connected to a remote socket. " "The optional *flags* argument has the same meaning as for :meth:`recv` " @@ -2004,7 +2004,7 @@ msgid "" "data. For further information on this topic, consult the :ref:`socket-howto`." msgstr "" -#: ../../library/socket.rst:1789 +#: ../../library/socket.rst:1790 msgid "" "Send data to the socket. The socket must be connected to a remote socket. " "The optional *flags* argument has the same meaning as for :meth:`recv` " @@ -2014,13 +2014,13 @@ msgid "" "to determine how much data, if any, was successfully sent." msgstr "" -#: ../../library/socket.rst:1796 +#: ../../library/socket.rst:1797 msgid "" "The socket timeout is no longer reset each time data is sent successfully. " "The socket timeout is now the maximum total duration to send all data." msgstr "" -#: ../../library/socket.rst:1809 +#: ../../library/socket.rst:1810 msgid "" "Send data to the socket. The socket should not be connected to a remote " "socket, since the destination socket is specified by *address*. The " @@ -2029,7 +2029,7 @@ msgid "" "address family --- see above.)" msgstr "" -#: ../../library/socket.rst:1826 +#: ../../library/socket.rst:1827 msgid "" "Raises an :ref:`auditing event ` ``socket.sendto`` with arguments " "``self``, ``address``." @@ -2037,7 +2037,7 @@ msgstr "" "引發一個附帶引數 ``self``、``address`` 的\\ :ref:`稽核事件 ` " "``socket.sendto``。" -#: ../../library/socket.rst:1825 +#: ../../library/socket.rst:1826 msgid "" "Send normal and ancillary data to the socket, gathering the non-ancillary " "data from a series of buffers and concatenating it into a single message. " @@ -2057,18 +2057,18 @@ msgid "" "bytes of non-ancillary data sent." msgstr "" -#: ../../library/socket.rst:1845 +#: ../../library/socket.rst:1846 msgid "" "The following function sends the list of file descriptors *fds* over an :" "const:`AF_UNIX` socket, on systems which support the :const:`SCM_RIGHTS` " "mechanism. See also :meth:`recvmsg`. ::" msgstr "" -#: ../../library/socket.rst:1854 +#: ../../library/socket.rst:1855 msgid ":ref:`Availability `: Unix, not WASI." msgstr ":ref:`適用 `:Unix、非 WASI。" -#: ../../library/socket.rst:1869 +#: ../../library/socket.rst:1870 msgid "" "Raises an :ref:`auditing event ` ``socket.sendmsg`` with arguments " "``self``, ``address``." @@ -2076,14 +2076,14 @@ msgstr "" "引發一個附帶引數 ``self``、``address`` 的\\ :ref:`稽核事件 ` " "``socket.sendmsg``。" -#: ../../library/socket.rst:1869 +#: ../../library/socket.rst:1870 msgid "" "Specialized version of :meth:`~socket.sendmsg` for :const:`AF_ALG` socket. " "Set mode, IV, AEAD associated data length and flags for :const:`AF_ALG` " "socket." msgstr "" -#: ../../library/socket.rst:1878 +#: ../../library/socket.rst:1879 msgid "" "Send a file until EOF is reached by using high-performance :mod:`os." "sendfile` and return the total number of bytes which were sent. *file* must " @@ -2097,38 +2097,38 @@ msgid "" "be of :const:`SOCK_STREAM` type. Non-blocking sockets are not supported." msgstr "" -#: ../../library/socket.rst:1894 +#: ../../library/socket.rst:1895 msgid "" "Set the :ref:`inheritable flag ` of the socket's file " "descriptor or socket's handle." msgstr "" -#: ../../library/socket.rst:1902 +#: ../../library/socket.rst:1903 msgid "" "Set blocking or non-blocking mode of the socket: if *flag* is false, the " "socket is set to non-blocking, else to blocking mode." msgstr "" -#: ../../library/socket.rst:1905 +#: ../../library/socket.rst:1906 msgid "" "This method is a shorthand for certain :meth:`~socket.settimeout` calls:" msgstr "" -#: ../../library/socket.rst:1907 +#: ../../library/socket.rst:1908 msgid "``sock.setblocking(True)`` is equivalent to ``sock.settimeout(None)``" msgstr "``sock.setblocking(True)`` 等價於 ``sock.settimeout(None)``" -#: ../../library/socket.rst:1909 +#: ../../library/socket.rst:1910 msgid "``sock.setblocking(False)`` is equivalent to ``sock.settimeout(0.0)``" msgstr "``sock.setblocking(False)`` 等價於 ``sock.settimeout(0.0)``" -#: ../../library/socket.rst:1911 +#: ../../library/socket.rst:1912 msgid "" "The method no longer applies :const:`SOCK_NONBLOCK` flag on :attr:`socket." "type`." msgstr "" -#: ../../library/socket.rst:1918 +#: ../../library/socket.rst:1919 msgid "" "Set a timeout on blocking socket operations. The *value* argument can be a " "nonnegative floating point number expressing seconds, or ``None``. If a non-" @@ -2138,19 +2138,19 @@ msgid "" "blocking mode. If ``None`` is given, the socket is put in blocking mode." msgstr "" -#: ../../library/socket.rst:1925 +#: ../../library/socket.rst:1926 msgid "" "For further information, please consult the :ref:`notes on socket timeouts " "`." msgstr "" -#: ../../library/socket.rst:1927 +#: ../../library/socket.rst:1928 msgid "" "The method no longer toggles :const:`SOCK_NONBLOCK` flag on :attr:`socket." "type`." msgstr "" -#: ../../library/socket.rst:1940 +#: ../../library/socket.rst:1941 msgid "" "Set the value of the given socket option (see the Unix manual page :manpage:" "`setsockopt(2)`). The needed symbolic constants are defined in this module " @@ -2163,11 +2163,11 @@ msgid "" "C function with ``optval=NULL`` and ``optlen=optlen``." msgstr "" -#: ../../library/socket.rst:1953 +#: ../../library/socket.rst:1954 msgid "setsockopt(level, optname, None, optlen: int) form added." msgstr "" -#: ../../library/socket.rst:1961 +#: ../../library/socket.rst:1962 msgid "" "Shut down one or both halves of the connection. If *how* is :const:" "`SHUT_RD`, further receives are disallowed. If *how* is :const:`SHUT_WR`, " @@ -2175,7 +2175,7 @@ msgid "" "and receives are disallowed." msgstr "" -#: ../../library/socket.rst:1971 +#: ../../library/socket.rst:1972 msgid "" "Duplicate a socket and prepare it for sharing with a target process. The " "target process must be provided with *process_id*. The resulting bytes " @@ -2186,48 +2186,48 @@ msgid "" "process." msgstr "" -#: ../../library/socket.rst:1983 +#: ../../library/socket.rst:1984 msgid "" "Note that there are no methods :meth:`read` or :meth:`write`; use :meth:" "`~socket.recv` and :meth:`~socket.send` without *flags* argument instead." msgstr "" -#: ../../library/socket.rst:1986 +#: ../../library/socket.rst:1987 msgid "" "Socket objects also have these (read-only) attributes that correspond to the " "values given to the :class:`~socket.socket` constructor." msgstr "" -#: ../../library/socket.rst:1992 +#: ../../library/socket.rst:1993 msgid "The socket family." msgstr "" -#: ../../library/socket.rst:1997 +#: ../../library/socket.rst:1998 msgid "The socket type." msgstr "" -#: ../../library/socket.rst:2002 +#: ../../library/socket.rst:2003 msgid "The socket protocol." msgstr "" -#: ../../library/socket.rst:2009 +#: ../../library/socket.rst:2010 msgid "Notes on socket timeouts" msgstr "" -#: ../../library/socket.rst:2011 +#: ../../library/socket.rst:2012 msgid "" "A socket object can be in one of three modes: blocking, non-blocking, or " "timeout. Sockets are by default always created in blocking mode, but this " "can be changed by calling :func:`setdefaulttimeout`." msgstr "" -#: ../../library/socket.rst:2015 +#: ../../library/socket.rst:2016 msgid "" "In *blocking mode*, operations block until complete or the system returns an " "error (such as connection timed out)." msgstr "" -#: ../../library/socket.rst:2018 +#: ../../library/socket.rst:2019 msgid "" "In *non-blocking mode*, operations fail (with an error that is unfortunately " "system-dependent) if they cannot be completed immediately: functions from " @@ -2235,14 +2235,14 @@ msgid "" "available for reading or writing." msgstr "" -#: ../../library/socket.rst:2023 +#: ../../library/socket.rst:2024 msgid "" "In *timeout mode*, operations fail if they cannot be completed within the " "timeout specified for the socket (they raise a :exc:`timeout` exception) or " "if the system returns an error." msgstr "" -#: ../../library/socket.rst:2028 +#: ../../library/socket.rst:2029 msgid "" "At the operating system level, sockets in *timeout mode* are internally set " "in non-blocking mode. Also, the blocking and timeout modes are shared " @@ -2251,11 +2251,11 @@ msgid "" "you decide to use the :meth:`~socket.fileno()` of a socket." msgstr "" -#: ../../library/socket.rst:2035 +#: ../../library/socket.rst:2036 msgid "Timeouts and the ``connect`` method" msgstr "" -#: ../../library/socket.rst:2037 +#: ../../library/socket.rst:2038 msgid "" "The :meth:`~socket.connect` operation is also subject to the timeout " "setting, and in general it is recommended to call :meth:`~socket.settimeout` " @@ -2265,24 +2265,24 @@ msgid "" "setting." msgstr "" -#: ../../library/socket.rst:2045 +#: ../../library/socket.rst:2046 msgid "Timeouts and the ``accept`` method" msgstr "" -#: ../../library/socket.rst:2047 +#: ../../library/socket.rst:2048 msgid "" "If :func:`getdefaulttimeout` is not :const:`None`, sockets returned by the :" "meth:`~socket.accept` method inherit that timeout. Otherwise, the behaviour " "depends on settings of the listening socket:" msgstr "" -#: ../../library/socket.rst:2051 +#: ../../library/socket.rst:2052 msgid "" "if the listening socket is in *blocking mode* or in *timeout mode*, the " "socket returned by :meth:`~socket.accept` is in *blocking mode*;" msgstr "" -#: ../../library/socket.rst:2054 +#: ../../library/socket.rst:2055 msgid "" "if the listening socket is in *non-blocking mode*, whether the socket " "returned by :meth:`~socket.accept` is in blocking or non-blocking mode is " @@ -2290,11 +2290,11 @@ msgid "" "it is recommended you manually override this setting." msgstr "" -#: ../../library/socket.rst:2063 +#: ../../library/socket.rst:2064 msgid "Example" msgstr "範例" -#: ../../library/socket.rst:2065 +#: ../../library/socket.rst:2066 msgid "" "Here are four minimal example programs using the TCP/IP protocol: a server " "that echoes all data that it receives back (servicing only one client), and " @@ -2307,14 +2307,14 @@ msgid "" "on the new socket returned by :meth:`~socket.accept`." msgstr "" -#: ../../library/socket.rst:2075 +#: ../../library/socket.rst:2076 msgid "The first two examples support IPv4 only. ::" msgstr "" "前兩個範例只支援 IPv4:\n" "\n" "::" -#: ../../library/socket.rst:2106 +#: ../../library/socket.rst:2107 msgid "" "The next two examples are identical to the above two, but support both IPv4 " "and IPv6. The server side will listen to the first address family available " @@ -2324,73 +2324,73 @@ msgid "" "resolution, and sends traffic to the first one connected successfully. ::" msgstr "" -#: ../../library/socket.rst:2178 +#: ../../library/socket.rst:2179 msgid "" "The next example shows how to write a very simple network sniffer with raw " "sockets on Windows. The example requires administrator privileges to modify " "the interface::" msgstr "" -#: ../../library/socket.rst:2203 +#: ../../library/socket.rst:2204 msgid "" "The next example shows how to use the socket interface to communicate to a " "CAN network using the raw socket protocol. To use CAN with the broadcast " "manager protocol instead, open a socket with::" msgstr "" -#: ../../library/socket.rst:2209 +#: ../../library/socket.rst:2210 msgid "" "After binding (:const:`CAN_RAW`) or connecting (:const:`CAN_BCM`) the " "socket, you can use the :meth:`socket.send` and :meth:`socket.recv` " "operations (and their counterparts) on the socket object as usual." msgstr "" -#: ../../library/socket.rst:2213 +#: ../../library/socket.rst:2214 msgid "This last example might require special privileges::" msgstr "" -#: ../../library/socket.rst:2253 +#: ../../library/socket.rst:2254 msgid "" "Running an example several times with too small delay between executions, " "could lead to this error::" msgstr "" -#: ../../library/socket.rst:2258 +#: ../../library/socket.rst:2259 msgid "" "This is because the previous execution has left the socket in a " "``TIME_WAIT`` state, and can't be immediately reused." msgstr "" -#: ../../library/socket.rst:2261 +#: ../../library/socket.rst:2262 msgid "" "There is a :mod:`socket` flag to set, in order to prevent this, :const:" "`socket.SO_REUSEADDR`::" msgstr "" -#: ../../library/socket.rst:2268 +#: ../../library/socket.rst:2269 msgid "" "the :data:`SO_REUSEADDR` flag tells the kernel to reuse a local socket in " "``TIME_WAIT`` state, without waiting for its natural timeout to expire." msgstr "" -#: ../../library/socket.rst:2274 +#: ../../library/socket.rst:2275 msgid "" "For an introduction to socket programming (in C), see the following papers:" msgstr "" -#: ../../library/socket.rst:2276 +#: ../../library/socket.rst:2277 msgid "" "*An Introductory 4.3BSD Interprocess Communication Tutorial*, by Stuart " "Sechrest" msgstr "" -#: ../../library/socket.rst:2278 +#: ../../library/socket.rst:2279 msgid "" "*An Advanced 4.3BSD Interprocess Communication Tutorial*, by Samuel J. " "Leffler et al," msgstr "" -#: ../../library/socket.rst:2281 +#: ../../library/socket.rst:2282 msgid "" "both in the UNIX Programmer's Manual, Supplementary Documents 1 (sections " "PS1:7 and PS1:8). The platform-specific reference material for the various " @@ -2417,10 +2417,10 @@ msgstr "I/O control(I/O 控制)" msgid "buffering" msgstr "buffering(緩衝)" -#: ../../library/socket.rst:1938 +#: ../../library/socket.rst:1939 msgid "module" msgstr "module(模組)" -#: ../../library/socket.rst:1938 +#: ../../library/socket.rst:1939 msgid "struct" msgstr "struct" diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index 0189e81ec13..a1a1e2eab4d 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-22 00:03+0000\n" +"POT-Creation-Date: 2024-05-22 00:03+0000\n" "PO-Revision-Date: 2022-10-05 10:26+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -73,17 +73,27 @@ msgstr "" "(literal values)。" #: ../../tutorial/inputoutput.rst:37 +#, fuzzy msgid "" "The :meth:`str.format` method of strings requires more manual effort. " "You'll still use ``{`` and ``}`` to mark where a variable will be " "substituted and can provide detailed formatting directives, but you'll also " -"need to provide the information to be formatted." +"need to provide the information to be formatted. In the following code block " +"there are two examples of how to format variables:" msgstr "" "字串的 :meth:`str.format` method 需要更多手動操作。你還是可以用 ``{`` 和 ``}" "`` 標示欲替代變數的位置,且可給予詳細的格式指令,但你也需提供要被格式化的資" "訊。" -#: ../../tutorial/inputoutput.rst:50 +#: ../../tutorial/inputoutput.rst:52 +msgid "" +"Notice how the ``yes_votes`` are padded with spaces and a negative sign only " +"for negative numbers. The example also prints ``percentage`` multiplied by " +"100, with 2 decimal places and followed by a percent sign (see :ref:" +"`formatspec` for details)." +msgstr "" + +#: ../../tutorial/inputoutput.rst:57 msgid "" "Finally, you can do all the string handling yourself by using string slicing " "and concatenation operations to create any layout you can imagine. The " @@ -94,7 +104,7 @@ msgstr "" "的字串處理,建立任何你能想像的排版格式。字串型別有一些 method,能以給定的欄寬" "填補字串,這些運算也很有用。" -#: ../../tutorial/inputoutput.rst:55 +#: ../../tutorial/inputoutput.rst:62 msgid "" "When you don't need fancy output but just want a quick display of some " "variables for debugging purposes, you can convert any value to a string with " @@ -103,7 +113,7 @@ msgstr "" "如果你不需要華麗的輸出,只想快速顯示變數以進行除錯,可以用 :func:`repr` 或 :" "func:`str` 函式把任何的值轉換為字串。" -#: ../../tutorial/inputoutput.rst:59 +#: ../../tutorial/inputoutput.rst:66 msgid "" "The :func:`str` function is meant to return representations of values which " "are fairly human-readable, while :func:`repr` is meant to generate " @@ -120,14 +130,14 @@ msgstr "" "值。有許多的值,像是數字,或 list 及 dictionary 等結構,使用這兩個函式會有相" "同的表示法。而字串,則較為特別,有兩種不同的表示法。" -#: ../../tutorial/inputoutput.rst:68 +#: ../../tutorial/inputoutput.rst:75 msgid "Some examples::" msgstr "" "一些範例:\n" "\n" "::" -#: ../../tutorial/inputoutput.rst:91 +#: ../../tutorial/inputoutput.rst:98 msgid "" "The :mod:`string` module contains a :class:`~string.Template` class that " "offers yet another way to substitute values into strings, using placeholders " @@ -138,11 +148,11 @@ msgstr "" "值替代為字串的另一種方法。該方法使用 ``$x`` 佔位符號,並以 dictionary 的值進" "行取代,但對格式的控制明顯較少。" -#: ../../tutorial/inputoutput.rst:100 +#: ../../tutorial/inputoutput.rst:107 msgid "Formatted String Literals" msgstr "格式化的字串文本 (Formatted String Literals)" -#: ../../tutorial/inputoutput.rst:102 +#: ../../tutorial/inputoutput.rst:109 msgid "" ":ref:`Formatted string literals ` (also called f-strings for " "short) let you include the value of Python expressions inside a string by " @@ -153,7 +163,7 @@ msgstr "" "``f`` 或 ``F``,並將運算式編寫為 ``{expression}``\\ ,讓你可以在字串內加入 " "Python 運算式的值。" -#: ../../tutorial/inputoutput.rst:107 +#: ../../tutorial/inputoutput.rst:114 msgid "" "An optional format specifier can follow the expression. This allows greater " "control over how the value is formatted. The following example rounds pi to " @@ -164,7 +174,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:115 +#: ../../tutorial/inputoutput.rst:122 msgid "" "Passing an integer after the ``':'`` will cause that field to be a minimum " "number of characters wide. This is useful for making columns line up. ::" @@ -174,7 +184,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:126 +#: ../../tutorial/inputoutput.rst:133 msgid "" "Other modifiers can be used to convert the value before it is formatted. ``'!" "a'`` applies :func:`ascii`, ``'!s'`` applies :func:`str`, and ``'!r'`` " @@ -186,7 +196,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:136 +#: ../../tutorial/inputoutput.rst:143 msgid "" "The ``=`` specifier can be used to expand an expression to the text of the " "expression, an equal sign, then the representation of the evaluated " @@ -195,7 +205,7 @@ msgstr "" "``=`` 說明符可用於將一個運算式擴充為該運算式的文字、一個等號、以及對該運算式" "求值 (evaluate) 後的表示法:" -#: ../../tutorial/inputoutput.rst:145 +#: ../../tutorial/inputoutput.rst:152 msgid "" "See :ref:`self-documenting expressions ` for more " "information on the ``=`` specifier. For a reference on these format " @@ -205,18 +215,18 @@ msgstr "" "expressions) `。若要參考這些格式化字串的規格,詳見 :ref:" "`formatspec` 參考指南。" -#: ../../tutorial/inputoutput.rst:152 +#: ../../tutorial/inputoutput.rst:159 msgid "The String format() Method" msgstr "字串的 format() method" -#: ../../tutorial/inputoutput.rst:154 +#: ../../tutorial/inputoutput.rst:161 msgid "Basic usage of the :meth:`str.format` method looks like this::" msgstr "" ":meth:`str.format` method 的基本用法如下:\n" "\n" "::" -#: ../../tutorial/inputoutput.rst:159 +#: ../../tutorial/inputoutput.rst:166 msgid "" "The brackets and characters within them (called format fields) are replaced " "with the objects passed into the :meth:`str.format` method. A number in the " @@ -229,7 +239,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:169 +#: ../../tutorial/inputoutput.rst:176 msgid "" "If keyword arguments are used in the :meth:`str.format` method, their values " "are referred to by using the name of the argument. ::" @@ -239,14 +249,14 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:176 +#: ../../tutorial/inputoutput.rst:183 msgid "Positional and keyword arguments can be arbitrarily combined::" msgstr "" "位置引數和關鍵字引數可以任意組合:\n" "\n" "::" -#: ../../tutorial/inputoutput.rst:182 +#: ../../tutorial/inputoutput.rst:189 msgid "" "If you have a really long format string that you don't want to split up, it " "would be nice if you could reference the variables to be formatted by name " @@ -259,7 +269,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:192 +#: ../../tutorial/inputoutput.rst:199 msgid "" "This could also be done by passing the ``table`` dictionary as keyword " "arguments with the ``**`` notation. ::" @@ -268,15 +278,16 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:199 +#: ../../tutorial/inputoutput.rst:206 +#, fuzzy msgid "" "This is particularly useful in combination with the built-in function :func:" -"`vars`, which returns a dictionary containing all local variables." +"`vars`, which returns a dictionary containing all local variables::" msgstr "" "與內建函式 :func:`vars` 組合使用時,這種方式特別實用。該函式可以回傳一個包含" "所有區域變數的 dictionary。" -#: ../../tutorial/inputoutput.rst:202 +#: ../../tutorial/inputoutput.rst:214 msgid "" "As an example, the following lines produce a tidily aligned set of columns " "giving integers and their squares and cubes::" @@ -285,7 +296,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:219 +#: ../../tutorial/inputoutput.rst:231 msgid "" "For a complete overview of string formatting with :meth:`str.format`, see :" "ref:`formatstrings`." @@ -293,18 +304,18 @@ msgstr "" "關於使用 :meth:`str.format` 進行字串格式化的完整概述,請見\\ :ref:" "`formatstrings`\\ 。" -#: ../../tutorial/inputoutput.rst:224 +#: ../../tutorial/inputoutput.rst:236 msgid "Manual String Formatting" msgstr "手動格式化字串" -#: ../../tutorial/inputoutput.rst:226 +#: ../../tutorial/inputoutput.rst:238 msgid "Here's the same table of squares and cubes, formatted manually::" msgstr "" "下面是以手動格式化完成的同一個平方及立方的表:\n" "\n" "::" -#: ../../tutorial/inputoutput.rst:244 +#: ../../tutorial/inputoutput.rst:256 msgid "" "(Note that the one space between each column was added by the way :func:" "`print` works: it always adds spaces between its arguments.)" @@ -312,7 +323,7 @@ msgstr "" "(請注意,使用 :func:`print` 讓每欄之間加入一個空格的方法:這種方法總是在其引" "數間加入空格。)" -#: ../../tutorial/inputoutput.rst:247 +#: ../../tutorial/inputoutput.rst:259 msgid "" "The :meth:`str.rjust` method of string objects right-justifies a string in a " "field of a given width by padding it with spaces on the left. There are " @@ -330,7 +341,7 @@ msgstr "" "況好,那種情況會讓值變得不正確。(如果你真的想截斷字串,可以加入像 ``x." "ljust(n)[:n]`` 這樣的切片運算。)" -#: ../../tutorial/inputoutput.rst:256 +#: ../../tutorial/inputoutput.rst:268 msgid "" "There is another method, :meth:`str.zfill`, which pads a numeric string on " "the left with zeros. It understands about plus and minus signs::" @@ -340,11 +351,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:268 +#: ../../tutorial/inputoutput.rst:280 msgid "Old string formatting" msgstr "格式化字串的舊方法" -#: ../../tutorial/inputoutput.rst:270 +#: ../../tutorial/inputoutput.rst:282 msgid "" "The % operator (modulo) can also be used for string formatting. Given " "``'string' % values``, instances of ``%`` in ``string`` are replaced with " @@ -357,16 +368,16 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:279 +#: ../../tutorial/inputoutput.rst:291 msgid "" "More information can be found in the :ref:`old-string-formatting` section." msgstr "更多資訊請見 :ref:`old-string-formatting`\\ 小節。" -#: ../../tutorial/inputoutput.rst:285 +#: ../../tutorial/inputoutput.rst:297 msgid "Reading and Writing Files" msgstr "讀寫檔案" -#: ../../tutorial/inputoutput.rst:291 +#: ../../tutorial/inputoutput.rst:303 msgid "" ":func:`open` returns a :term:`file object`, and is most commonly used with " "two positional arguments and one keyword argument: ``open(filename, mode, " @@ -375,7 +386,7 @@ msgstr "" ":func:`open` 回傳一個 :term:`file object`\\ ,而它最常使用的兩個位置引數和一" "個關鍵字引數是:\\ ``open(filename, mode, encoding=None)``" -#: ../../tutorial/inputoutput.rst:304 +#: ../../tutorial/inputoutput.rst:316 msgid "" "The first argument is a string containing the filename. The second argument " "is another string containing a few characters describing the way in which " @@ -393,7 +404,7 @@ msgstr "" "``'r+'`` 可以開啟檔案並進行讀取和寫入。\\ *mode* 引數是選擇性的,若省略時會預" "設為 ``'r'``。" -#: ../../tutorial/inputoutput.rst:313 +#: ../../tutorial/inputoutput.rst:325 msgid "" "Normally, files are opened in :dfn:`text mode`, that means, you read and " "write strings from and to the file, which are encoded in a specific " @@ -411,7 +422,7 @@ msgstr "" "`binary mode`\\ (二進制模式)開啟檔案,二進制模式資料以 :class:`bytes` 物件" "的形式被讀寫。以二進制模式開啟檔案時不可以指定 *encoding*\\ 。" -#: ../../tutorial/inputoutput.rst:323 +#: ../../tutorial/inputoutput.rst:335 msgid "" "In text mode, the default when reading is to convert platform-specific line " "endings (``\\n`` on Unix, ``\\r\\n`` on Windows) to just ``\\n``. When " @@ -427,7 +438,7 @@ msgstr "" "文字檔案來說沒有問題,但會毀壞像是 :file:`JPEG` 或 :file:`EXE` 檔案中的二進制" "資料。在讀寫此類檔案時,注意一定要使用二進制模式。" -#: ../../tutorial/inputoutput.rst:331 +#: ../../tutorial/inputoutput.rst:343 msgid "" "It is good practice to use the :keyword:`with` keyword when dealing with " "file objects. The advantage is that the file is properly closed after its " @@ -441,7 +452,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:344 +#: ../../tutorial/inputoutput.rst:356 msgid "" "If you're not using the :keyword:`with` keyword, then you should call ``f." "close()`` to close the file and immediately free up any system resources " @@ -450,7 +461,7 @@ msgstr "" "如果你沒有使用 :keyword:`with` 關鍵字,則應呼叫 ``f.close()`` 關閉檔案,可以" "立即釋放被它所使用的系統資源。" -#: ../../tutorial/inputoutput.rst:349 +#: ../../tutorial/inputoutput.rst:361 msgid "" "Calling ``f.write()`` without using the :keyword:`!with` keyword or calling " "``f.close()`` **might** result in the arguments of ``f.write()`` not being " @@ -460,7 +471,7 @@ msgstr "" "即使程式成功退出,也\\ **可能**\\ 導致 ``f.write()`` 的引數沒有被完全寫入硬" "碟。" -#: ../../tutorial/inputoutput.rst:357 +#: ../../tutorial/inputoutput.rst:369 msgid "" "After a file object is closed, either by a :keyword:`with` statement or by " "calling ``f.close()``, attempts to use the file object will automatically " @@ -471,17 +482,17 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:371 +#: ../../tutorial/inputoutput.rst:383 msgid "Methods of File Objects" msgstr "檔案物件的 method" -#: ../../tutorial/inputoutput.rst:373 +#: ../../tutorial/inputoutput.rst:385 msgid "" "The rest of the examples in this section will assume that a file object " "called ``f`` has already been created." msgstr "本節其餘的範例皆假設一個名為 ``f`` 的檔案物件已被建立。" -#: ../../tutorial/inputoutput.rst:376 +#: ../../tutorial/inputoutput.rst:388 msgid "" "To read a file's contents, call ``f.read(size)``, which reads some quantity " "of data and returns it as a string (in text mode) or bytes object (in binary " @@ -501,7 +512,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:390 +#: ../../tutorial/inputoutput.rst:402 msgid "" "``f.readline()`` reads a single line from the file; a newline character " "(``\\n``) is left at the end of the string, and is only omitted on the last " @@ -517,7 +528,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:404 +#: ../../tutorial/inputoutput.rst:416 msgid "" "For reading lines from a file, you can loop over the file object. This is " "memory efficient, fast, and leads to simple code::" @@ -527,7 +538,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:413 +#: ../../tutorial/inputoutput.rst:425 msgid "" "If you want to read all the lines of a file in a list you can also use " "``list(f)`` or ``f.readlines()``." @@ -535,7 +546,7 @@ msgstr "" "如果你想把一個檔案的所有行讀進一個 list 裡,可以用 ``list(f)`` 或 ``f." "readlines()``。" -#: ../../tutorial/inputoutput.rst:416 +#: ../../tutorial/inputoutput.rst:428 msgid "" "``f.write(string)`` writes the contents of *string* to the file, returning " "the number of characters written. ::" @@ -544,7 +555,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:422 +#: ../../tutorial/inputoutput.rst:434 msgid "" "Other types of objects need to be converted -- either to a string (in text " "mode) or a bytes object (in binary mode) -- before writing them::" @@ -554,7 +565,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:430 +#: ../../tutorial/inputoutput.rst:442 msgid "" "``f.tell()`` returns an integer giving the file object's current position in " "the file represented as number of bytes from the beginning of the file when " @@ -563,7 +574,7 @@ msgstr "" "``f.tell()`` 回傳一個整數,它給出檔案物件在檔案中的當前位置,在二進制模式下表" "示為檔案開始至今的位元組數,在文字模式下表示為一個意義不明的數字。" -#: ../../tutorial/inputoutput.rst:434 +#: ../../tutorial/inputoutput.rst:446 msgid "" "To change the file object's position, use ``f.seek(offset, whence)``. The " "position is computed from adding *offset* to a reference point; the " @@ -580,7 +591,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:453 +#: ../../tutorial/inputoutput.rst:465 msgid "" "In text files (those opened without a ``b`` in the mode string), only seeks " "relative to the beginning of the file are allowed (the exception being " @@ -593,7 +604,7 @@ msgstr "" "的值,或是 0,才是有效的 *offset* 值。其他任何 *offset* 值都會產生未定義的行" "為。" -#: ../../tutorial/inputoutput.rst:459 +#: ../../tutorial/inputoutput.rst:471 msgid "" "File objects have some additional methods, such as :meth:`~io.IOBase.isatty` " "and :meth:`~io.IOBase.truncate` which are less frequently used; consult the " @@ -602,11 +613,11 @@ msgstr "" "檔案物件還有一些附加的 method,像是較不常使用的 :meth:`~io.IOBase.isatty` " "和 :meth:`~io.IOBase.truncate`\\ ;檔案物件的完整指南詳見程式庫參考手冊。" -#: ../../tutorial/inputoutput.rst:467 +#: ../../tutorial/inputoutput.rst:479 msgid "Saving structured data with :mod:`json`" msgstr "使用 :mod:`json` 儲存結構化資料" -#: ../../tutorial/inputoutput.rst:471 +#: ../../tutorial/inputoutput.rst:483 msgid "" "Strings can easily be written to and read from a file. Numbers take a bit " "more effort, since the :meth:`~io.TextIOBase.read` method only returns " @@ -621,7 +632,7 @@ msgstr "" "dictionary(字典)等複雜的資料類型時,手動剖析 (parsing) 和序列化 " "(serializing) 就變得複雜。" -#: ../../tutorial/inputoutput.rst:478 +#: ../../tutorial/inputoutput.rst:490 msgid "" "Rather than having users constantly writing and debugging code to save " "complicated data types to files, Python allows you to use the popular data " @@ -640,7 +651,7 @@ msgstr "" "料則稱為 :dfn:`deserializing`\\ (反序列化)。在序列化和反序列化之間,表示物" "件的字串可以被儲存在檔案或資料中,或通過網路連接發送到遠端的機器。" -#: ../../tutorial/inputoutput.rst:489 +#: ../../tutorial/inputoutput.rst:501 msgid "" "The JSON format is commonly used by modern applications to allow for data " "exchange. Many programmers are already familiar with it, which makes it a " @@ -649,7 +660,7 @@ msgstr "" "JSON 格式經常地使用於現代應用程式的資料交換。許多程序設計師早已對它耳熟能詳," "使它成為提升互操作性 (interoperability) 的好選擇。" -#: ../../tutorial/inputoutput.rst:493 +#: ../../tutorial/inputoutput.rst:505 msgid "" "If you have an object ``x``, you can view its JSON string representation " "with a simple line of code::" @@ -658,7 +669,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:501 +#: ../../tutorial/inputoutput.rst:513 msgid "" "Another variant of the :func:`~json.dumps` function, called :func:`~json." "dump`, simply serializes the object to a :term:`text file`. So if ``f`` is " @@ -670,7 +681,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:507 +#: ../../tutorial/inputoutput.rst:519 msgid "" "To decode the object again, if ``f`` is a :term:`binary file` or :term:`text " "file` object which has been opened for reading::" @@ -680,7 +691,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/inputoutput.rst:513 +#: ../../tutorial/inputoutput.rst:525 msgid "" "JSON files must be encoded in UTF-8. Use ``encoding=\"utf-8\"`` when opening " "JSON file as a :term:`text file` for both of reading and writing." @@ -688,7 +699,7 @@ msgstr "" "JSON 檔案必須以 UTF-8 格式編碼。在開啟 JSON 檔案以作為一個可讀取與寫入的 :" "term:`text file` 時,要用 ``encoding=\"utf-8\"``。" -#: ../../tutorial/inputoutput.rst:516 +#: ../../tutorial/inputoutput.rst:528 msgid "" "This simple serialization technique can handle lists and dictionaries, but " "serializing arbitrary class instances in JSON requires a bit of extra " @@ -699,11 +710,11 @@ msgstr "" "class(類別)實例,則需要一些額外的工作。\\ :mod:`json` 模組的參考資料包含對" "此的說明。" -#: ../../tutorial/inputoutput.rst:522 +#: ../../tutorial/inputoutput.rst:534 msgid ":mod:`pickle` - the pickle module" msgstr ":mod:`pickle` - pickle 模組" -#: ../../tutorial/inputoutput.rst:524 +#: ../../tutorial/inputoutput.rst:536 msgid "" "Contrary to :ref:`JSON `, *pickle* is a protocol which allows the " "serialization of arbitrarily complex Python objects. As such, it is " @@ -717,26 +728,26 @@ msgstr "" "式溝通。在預設情況,它也是不安全的:如果資料是由手段高明的攻擊者精心設計,將" "這段來自於不受信任來源的 pickle 資料反序列化,可以執行任意的程式碼。" -#: ../../tutorial/inputoutput.rst:287 +#: ../../tutorial/inputoutput.rst:299 msgid "built-in function" msgstr "built-in function(內建函式)" -#: ../../tutorial/inputoutput.rst:287 +#: ../../tutorial/inputoutput.rst:299 msgid "open" msgstr "open" -#: ../../tutorial/inputoutput.rst:287 +#: ../../tutorial/inputoutput.rst:299 msgid "object" msgstr "object(物件)" -#: ../../tutorial/inputoutput.rst:287 +#: ../../tutorial/inputoutput.rst:299 msgid "file" msgstr "file(檔案)" -#: ../../tutorial/inputoutput.rst:469 +#: ../../tutorial/inputoutput.rst:481 msgid "module" msgstr "module(模組)" -#: ../../tutorial/inputoutput.rst:469 +#: ../../tutorial/inputoutput.rst:481 msgid "json" msgstr "json" From 04234e2e40976c9646e1a46127ef18f26f5e2c01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 May 2024 00:04:48 +0000 Subject: [PATCH 11/13] sync with cpython 0d5fe2c7 --- library/hashlib.po | 9 +- library/threading.po | 303 ++++++++++++++++++++++++------------------- whatsnew/3.12.po | 4 +- 3 files changed, 180 insertions(+), 136 deletions(-) diff --git a/library/hashlib.po b/library/hashlib.po index ba12d242daa..d352fca7e2a 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-23 00:03+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-" @@ -351,8 +351,9 @@ msgstr "" #: ../../library/hashlib.rst:331 msgid "" -"*dklen* is the length of the derived key. If *dklen* is ``None`` then the " -"digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512." +"*dklen* is the length of the derived key in bytes. If *dklen* is ``None`` " +"then the digest size of the hash algorithm *hash_name* is used, e.g. 64 for " +"SHA-512." msgstr "" #: ../../library/hashlib.rst:340 @@ -383,7 +384,7 @@ msgstr "" msgid "" "*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization " "factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). " -"*dklen* is the length of the derived key." +"*dklen* is the length of the derived key in bytes." msgstr "" #: ../../library/hashlib.rst:366 diff --git a/library/threading.po b/library/threading.po index f49b237ada9..24f8fb20841 100644 --- a/library/threading.po +++ b/library/threading.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-23 00:03+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-" @@ -696,7 +696,7 @@ msgid "" "by the platform." msgstr "" -#: ../../library/threading.rst:541 ../../library/threading.rst:621 +#: ../../library/threading.rst:541 ../../library/threading.rst:632 msgid "Acquire a lock, blocking or non-blocking." msgstr "" @@ -728,8 +728,8 @@ msgid "" "if not (for example if the *timeout* expired)." msgstr "" -#: ../../library/threading.rst:559 ../../library/threading.rst:643 -#: ../../library/threading.rst:890 +#: ../../library/threading.rst:559 ../../library/threading.rst:670 +#: ../../library/threading.rst:917 msgid "The *timeout* parameter is new." msgstr "" @@ -756,7 +756,7 @@ msgstr "" msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised." msgstr "" -#: ../../library/threading.rst:578 ../../library/threading.rst:659 +#: ../../library/threading.rst:578 ../../library/threading.rst:686 msgid "There is no return value." msgstr "" @@ -779,22 +779,36 @@ msgstr "" #: ../../library/threading.rst:597 msgid "" -"To lock the lock, a thread calls its :meth:`~RLock.acquire` method; this " -"returns once the thread owns the lock. To unlock the lock, a thread calls " -"its :meth:`~Lock.release` method. :meth:`~Lock.acquire`/:meth:`~Lock." -"release` call pairs may be nested; only the final :meth:`~Lock.release` " -"(the :meth:`~Lock.release` of the outermost pair) resets the lock to " -"unlocked and allows another thread blocked in :meth:`~Lock.acquire` to " -"proceed." +"Threads call a lock's :meth:`~RLock.acquire` method to lock it, and its :" +"meth:`~Lock.release` method to unlock it." msgstr "" -#: ../../library/threading.rst:604 +#: ../../library/threading.rst:602 msgid "" -"Reentrant locks also support the :ref:`context management protocol `." +"Reentrant locks support the :ref:`context management protocol `, " +"so it is recommended to use :keyword:`with` instead of manually calling :" +"meth:`~RLock.acquire` and :meth:`~RLock.release` to handle acquiring and " +"releasing the lock for a block of code." msgstr "" -#: ../../library/threading.rst:609 +#: ../../library/threading.rst:607 +msgid "" +"RLock's :meth:`~RLock.acquire`/:meth:`~RLock.release` call pairs may be " +"nested, unlike Lock's :meth:`~Lock.acquire`/:meth:`~Lock.release`. Only the " +"final :meth:`~RLock.release` (the :meth:`~Lock.release` of the outermost " +"pair) resets the lock to an unlocked state and allows another thread blocked " +"in :meth:`~RLock.acquire` to proceed." +msgstr "" + +#: ../../library/threading.rst:613 +msgid "" +":meth:`~RLock.acquire`/:meth:`~RLock.release` must be used in pairs: each " +"acquire must have a release in the thread that has acquired the lock. " +"Failing to call release as many times the lock has been acquired can lead to " +"deadlock." +msgstr "" + +#: ../../library/threading.rst:620 msgid "" "This class implements reentrant lock objects. A reentrant lock must be " "released by the thread that acquired it. Once a thread has acquired a " @@ -802,47 +816,75 @@ msgid "" "thread must release it once for each time it has acquired it." msgstr "" -#: ../../library/threading.rst:614 +#: ../../library/threading.rst:625 msgid "" "Note that ``RLock`` is actually a factory function which returns an instance " "of the most efficient version of the concrete RLock class that is supported " "by the platform." msgstr "" -#: ../../library/threading.rst:623 +#: ../../library/threading.rst:636 +msgid ":ref:`Using RLock as a context manager `" +msgstr "" + +#: ../../library/threading.rst:637 msgid "" -"When invoked without arguments: if this thread already owns the lock, " -"increment the recursion level by one, and return immediately. Otherwise, if " -"another thread owns the lock, block until the lock is unlocked. Once the " -"lock is unlocked (not owned by any thread), then grab ownership, set the " -"recursion level to one, and return. If more than one thread is blocked " -"waiting until the lock is unlocked, only one at a time will be able to grab " -"ownership of the lock. There is no return value in this case." +"Recommended over manual :meth:`!acquire` and :meth:`release` calls whenever " +"practical." msgstr "" -#: ../../library/threading.rst:631 +#: ../../library/threading.rst:641 msgid "" -"When invoked with the *blocking* argument set to ``True``, do the same thing " -"as when called without arguments, and return ``True``." +"When invoked with the *blocking* argument set to ``True`` (the default):" +msgstr "" + +#: ../../library/threading.rst:643 ../../library/threading.rst:655 +msgid "If no thread owns the lock, acquire the lock and return immediately." msgstr "" -#: ../../library/threading.rst:634 +#: ../../library/threading.rst:645 msgid "" -"When invoked with the *blocking* argument set to ``False``, do not block. " -"If a call without an argument would block, return ``False`` immediately; " -"otherwise, do the same thing as when called without arguments, and return " -"``True``." +"If another thread owns the lock, block until we are able to acquire lock, or " +"*timeout*, if set to a positive float value." msgstr "" -#: ../../library/threading.rst:638 +#: ../../library/threading.rst:648 msgid "" -"When invoked with the floating-point *timeout* argument set to a positive " -"value, block for at most the number of seconds specified by *timeout* and as " -"long as the lock cannot be acquired. Return ``True`` if the lock has been " -"acquired, ``False`` if the timeout has elapsed." +"If the same thread owns the lock, acquire the lock again, and return " +"immediately. This is the difference between :class:`Lock` and :class:`!" +"RLock`; :class:`Lock` handles this case the same as the previous, blocking " +"until the lock can be acquired." msgstr "" -#: ../../library/threading.rst:649 +#: ../../library/threading.rst:653 +msgid "When invoked with the *blocking* argument set to ``False``:" +msgstr "" + +#: ../../library/threading.rst:657 +msgid "If another thread owns the lock, return immediately." +msgstr "" + +#: ../../library/threading.rst:659 +msgid "" +"If the same thread owns the lock, acquire the lock again and return " +"immediately." +msgstr "" + +#: ../../library/threading.rst:662 +msgid "" +"In all cases, if the thread was able to acquire the lock, return ``True``. " +"If the thread was unable to acquire the lock (i.e. if not blocking or the " +"timeout was reached) return ``False``." +msgstr "" + +#: ../../library/threading.rst:666 +msgid "" +"If called multiple times, failing to call :meth:`~RLock.release` as many " +"times may lead to deadlock. Consider using :class:`!RLock` as a context " +"manager rather than calling acquire/release directly." +msgstr "" + +#: ../../library/threading.rst:676 msgid "" "Release a lock, decrementing the recursion level. If after the decrement it " "is zero, reset the lock to unlocked (not owned by any thread), and if any " @@ -851,17 +893,18 @@ msgid "" "is still nonzero, the lock remains locked and owned by the calling thread." msgstr "" -#: ../../library/threading.rst:655 +#: ../../library/threading.rst:682 msgid "" "Only call this method when the calling thread owns the lock. A :exc:" -"`RuntimeError` is raised if this method is called when the lock is unlocked." +"`RuntimeError` is raised if this method is called when the lock is not " +"acquired." msgstr "" -#: ../../library/threading.rst:665 +#: ../../library/threading.rst:692 msgid "Condition Objects" msgstr "" -#: ../../library/threading.rst:667 +#: ../../library/threading.rst:694 msgid "" "A condition variable is always associated with some kind of lock; this can " "be passed in or one will be created by default. Passing one in is useful " @@ -869,7 +912,7 @@ msgid "" "of the condition object: you don't have to track it separately." msgstr "" -#: ../../library/threading.rst:672 +#: ../../library/threading.rst:699 msgid "" "A condition variable obeys the :ref:`context management protocol `: using the ``with`` statement acquires the associated lock for the " @@ -878,7 +921,7 @@ msgid "" "associated lock." msgstr "" -#: ../../library/threading.rst:678 +#: ../../library/threading.rst:705 msgid "" "Other methods must be called with the associated lock held. The :meth:" "`~Condition.wait` method releases the lock, and then blocks until another " @@ -887,14 +930,14 @@ msgid "" "and returns. It is also possible to specify a timeout." msgstr "" -#: ../../library/threading.rst:684 +#: ../../library/threading.rst:711 msgid "" "The :meth:`~Condition.notify` method wakes up one of the threads waiting for " "the condition variable, if any are waiting. The :meth:`~Condition." "notify_all` method wakes up all threads waiting for the condition variable." msgstr "" -#: ../../library/threading.rst:688 +#: ../../library/threading.rst:715 msgid "" "Note: the :meth:`~Condition.notify` and :meth:`~Condition.notify_all` " "methods don't release the lock; this means that the thread or threads " @@ -903,7 +946,7 @@ msgid "" "or :meth:`~Condition.notify_all` finally relinquishes ownership of the lock." msgstr "" -#: ../../library/threading.rst:694 +#: ../../library/threading.rst:721 msgid "" "The typical programming style using condition variables uses the lock to " "synchronize access to some shared state; threads that are interested in a " @@ -915,7 +958,7 @@ msgid "" "situation with unlimited buffer capacity::" msgstr "" -#: ../../library/threading.rst:714 +#: ../../library/threading.rst:741 msgid "" "The ``while`` loop checking for the application's condition is necessary " "because :meth:`~Condition.wait` can return after an arbitrary long time, and " @@ -925,7 +968,7 @@ msgid "" "checking, and eases the computation of timeouts::" msgstr "" -#: ../../library/threading.rst:726 +#: ../../library/threading.rst:753 msgid "" "To choose between :meth:`~Condition.notify` and :meth:`~Condition." "notify_all`, consider whether one state change can be interesting for only " @@ -934,45 +977,45 @@ msgid "" "thread." msgstr "" -#: ../../library/threading.rst:734 +#: ../../library/threading.rst:761 msgid "" "This class implements condition variable objects. A condition variable " "allows one or more threads to wait until they are notified by another thread." msgstr "" -#: ../../library/threading.rst:737 +#: ../../library/threading.rst:764 msgid "" "If the *lock* argument is given and not ``None``, it must be a :class:`Lock` " "or :class:`RLock` object, and it is used as the underlying lock. Otherwise, " "a new :class:`RLock` object is created and used as the underlying lock." msgstr "" -#: ../../library/threading.rst:741 ../../library/threading.rst:865 -#: ../../library/threading.rst:911 ../../library/threading.rst:963 -#: ../../library/threading.rst:1031 +#: ../../library/threading.rst:768 ../../library/threading.rst:892 +#: ../../library/threading.rst:938 ../../library/threading.rst:990 +#: ../../library/threading.rst:1058 msgid "changed from a factory function to a class." msgstr "" -#: ../../library/threading.rst:746 +#: ../../library/threading.rst:773 msgid "" "Acquire the underlying lock. This method calls the corresponding method on " "the underlying lock; the return value is whatever that method returns." msgstr "" -#: ../../library/threading.rst:751 +#: ../../library/threading.rst:778 msgid "" "Release the underlying lock. This method calls the corresponding method on " "the underlying lock; there is no return value." msgstr "" -#: ../../library/threading.rst:756 +#: ../../library/threading.rst:783 msgid "" "Wait until notified or until a timeout occurs. If the calling thread has not " "acquired the lock when this method is called, a :exc:`RuntimeError` is " "raised." msgstr "" -#: ../../library/threading.rst:760 +#: ../../library/threading.rst:787 msgid "" "This method releases the underlying lock, and then blocks until it is " "awakened by a :meth:`notify` or :meth:`notify_all` call for the same " @@ -980,14 +1023,14 @@ msgid "" "Once awakened or timed out, it re-acquires the lock and returns." msgstr "" -#: ../../library/threading.rst:765 +#: ../../library/threading.rst:792 msgid "" "When the *timeout* argument is present and not ``None``, it should be a " "floating point number specifying a timeout for the operation in seconds (or " "fractions thereof)." msgstr "" -#: ../../library/threading.rst:769 +#: ../../library/threading.rst:796 msgid "" "When the underlying lock is an :class:`RLock`, it is not released using its :" "meth:`release` method, since this may not actually unlock the lock when it " @@ -997,24 +1040,24 @@ msgid "" "used to restore the recursion level when the lock is reacquired." msgstr "" -#: ../../library/threading.rst:777 +#: ../../library/threading.rst:804 msgid "" "The return value is ``True`` unless a given *timeout* expired, in which case " "it is ``False``." msgstr "" -#: ../../library/threading.rst:780 ../../library/threading.rst:996 +#: ../../library/threading.rst:807 ../../library/threading.rst:1023 msgid "Previously, the method always returned ``None``." msgstr "" -#: ../../library/threading.rst:785 +#: ../../library/threading.rst:812 msgid "" "Wait until a condition evaluates to true. *predicate* should be a callable " "which result will be interpreted as a boolean value. A *timeout* may be " "provided giving the maximum time to wait." msgstr "" -#: ../../library/threading.rst:789 +#: ../../library/threading.rst:816 msgid "" "This utility method may call :meth:`wait` repeatedly until the predicate is " "satisfied, or until a timeout occurs. The return value is the last return " @@ -1022,33 +1065,33 @@ msgid "" "out." msgstr "" -#: ../../library/threading.rst:794 +#: ../../library/threading.rst:821 msgid "" "Ignoring the timeout feature, calling this method is roughly equivalent to " "writing::" msgstr "" -#: ../../library/threading.rst:800 +#: ../../library/threading.rst:827 msgid "" "Therefore, the same rules apply as with :meth:`wait`: The lock must be held " "when called and is re-acquired on return. The predicate is evaluated with " "the lock held." msgstr "" -#: ../../library/threading.rst:808 +#: ../../library/threading.rst:835 msgid "" "By default, wake up one thread waiting on this condition, if any. If the " "calling thread has not acquired the lock when this method is called, a :exc:" "`RuntimeError` is raised." msgstr "" -#: ../../library/threading.rst:812 +#: ../../library/threading.rst:839 msgid "" "This method wakes up at most *n* of the threads waiting for the condition " "variable; it is a no-op if no threads are waiting." msgstr "" -#: ../../library/threading.rst:815 +#: ../../library/threading.rst:842 msgid "" "The current implementation wakes up exactly *n* threads, if at least *n* " "threads are waiting. However, it's not safe to rely on this behavior. A " @@ -1056,14 +1099,14 @@ msgid "" "threads." msgstr "" -#: ../../library/threading.rst:820 +#: ../../library/threading.rst:847 msgid "" "Note: an awakened thread does not actually return from its :meth:`wait` call " "until it can reacquire the lock. Since :meth:`notify` does not release the " "lock, its caller should." msgstr "" -#: ../../library/threading.rst:826 +#: ../../library/threading.rst:853 msgid "" "Wake up all threads waiting on this condition. This method acts like :meth:" "`notify`, but wakes up all waiting threads instead of one. If the calling " @@ -1071,15 +1114,15 @@ msgid "" "`RuntimeError` is raised." msgstr "" -#: ../../library/threading.rst:831 +#: ../../library/threading.rst:858 msgid "The method ``notifyAll`` is a deprecated alias for this method." msgstr "" -#: ../../library/threading.rst:837 +#: ../../library/threading.rst:864 msgid "Semaphore Objects" msgstr "" -#: ../../library/threading.rst:839 +#: ../../library/threading.rst:866 msgid "" "This is one of the oldest synchronization primitives in the history of " "computer science, invented by the early Dutch computer scientist Edsger W. " @@ -1087,7 +1130,7 @@ msgid "" "acquire` and :meth:`~Semaphore.release`)." msgstr "" -#: ../../library/threading.rst:844 +#: ../../library/threading.rst:871 msgid "" "A semaphore manages an internal counter which is decremented by each :meth:" "`~Semaphore.acquire` call and incremented by each :meth:`~Semaphore.release` " @@ -1096,12 +1139,12 @@ msgid "" "meth:`~Semaphore.release`." msgstr "" -#: ../../library/threading.rst:850 +#: ../../library/threading.rst:877 msgid "" "Semaphores also support the :ref:`context management protocol `." msgstr "" -#: ../../library/threading.rst:855 +#: ../../library/threading.rst:882 msgid "" "This class implements semaphore objects. A semaphore manages an atomic " "counter representing the number of :meth:`release` calls minus the number " @@ -1110,28 +1153,28 @@ msgid "" "If not given, *value* defaults to 1." msgstr "" -#: ../../library/threading.rst:861 +#: ../../library/threading.rst:888 msgid "" "The optional argument gives the initial *value* for the internal counter; it " "defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is " "raised." msgstr "" -#: ../../library/threading.rst:870 +#: ../../library/threading.rst:897 msgid "Acquire a semaphore." msgstr "" -#: ../../library/threading.rst:872 +#: ../../library/threading.rst:899 msgid "When invoked without arguments:" msgstr "" -#: ../../library/threading.rst:874 +#: ../../library/threading.rst:901 msgid "" "If the internal counter is larger than zero on entry, decrement it by one " "and return ``True`` immediately." msgstr "" -#: ../../library/threading.rst:876 +#: ../../library/threading.rst:903 msgid "" "If the internal counter is zero on entry, block until awoken by a call to :" "meth:`~Semaphore.release`. Once awoken (and the counter is greater than 0), " @@ -1140,32 +1183,32 @@ msgid "" "threads are awoken should not be relied on." msgstr "" -#: ../../library/threading.rst:882 +#: ../../library/threading.rst:909 msgid "" "When invoked with *blocking* set to ``False``, do not block. If a call " "without an argument would block, return ``False`` immediately; otherwise, do " "the same thing as when called without arguments, and return ``True``." msgstr "" -#: ../../library/threading.rst:886 +#: ../../library/threading.rst:913 msgid "" "When invoked with a *timeout* other than ``None``, it will block for at most " "*timeout* seconds. If acquire does not complete successfully in that " "interval, return ``False``. Return ``True`` otherwise." msgstr "" -#: ../../library/threading.rst:895 +#: ../../library/threading.rst:922 msgid "" "Release a semaphore, incrementing the internal counter by *n*. When it was " "zero on entry and other threads are waiting for it to become larger than " "zero again, wake up *n* of those threads." msgstr "" -#: ../../library/threading.rst:899 +#: ../../library/threading.rst:926 msgid "Added the *n* parameter to release multiple waiting threads at once." msgstr "" -#: ../../library/threading.rst:905 +#: ../../library/threading.rst:932 msgid "" "Class implementing bounded semaphore objects. A bounded semaphore checks to " "make sure its current value doesn't exceed its initial value. If it does, :" @@ -1174,11 +1217,11 @@ msgid "" "times it's a sign of a bug. If not given, *value* defaults to 1." msgstr "" -#: ../../library/threading.rst:918 +#: ../../library/threading.rst:945 msgid ":class:`Semaphore` Example" msgstr ":class:`Semaphore` 範例" -#: ../../library/threading.rst:920 +#: ../../library/threading.rst:947 msgid "" "Semaphores are often used to guard resources with limited capacity, for " "example, a database server. In any situation where the size of the resource " @@ -1186,37 +1229,37 @@ msgid "" "threads, your main thread would initialize the semaphore::" msgstr "" -#: ../../library/threading.rst:929 +#: ../../library/threading.rst:956 msgid "" "Once spawned, worker threads call the semaphore's acquire and release " "methods when they need to connect to the server::" msgstr "" -#: ../../library/threading.rst:939 +#: ../../library/threading.rst:966 msgid "" "The use of a bounded semaphore reduces the chance that a programming error " "which causes the semaphore to be released more than it's acquired will go " "undetected." msgstr "" -#: ../../library/threading.rst:946 +#: ../../library/threading.rst:973 msgid "Event Objects" msgstr "" -#: ../../library/threading.rst:948 +#: ../../library/threading.rst:975 msgid "" "This is one of the simplest mechanisms for communication between threads: " "one thread signals an event and other threads wait for it." msgstr "" -#: ../../library/threading.rst:951 +#: ../../library/threading.rst:978 msgid "" "An event object manages an internal flag that can be set to true with the :" "meth:`~Event.set` method and reset to false with the :meth:`~Event.clear` " "method. The :meth:`~Event.wait` method blocks until the flag is true." msgstr "" -#: ../../library/threading.rst:958 +#: ../../library/threading.rst:985 msgid "" "Class implementing event objects. An event manages a flag that can be set " "to true with the :meth:`~Event.set` method and reset to false with the :meth:" @@ -1224,29 +1267,29 @@ msgid "" "flag is initially false." msgstr "" -#: ../../library/threading.rst:968 +#: ../../library/threading.rst:995 msgid "Return ``True`` if and only if the internal flag is true." msgstr "" -#: ../../library/threading.rst:970 +#: ../../library/threading.rst:997 msgid "The method ``isSet`` is a deprecated alias for this method." msgstr "" -#: ../../library/threading.rst:974 +#: ../../library/threading.rst:1001 msgid "" "Set the internal flag to true. All threads waiting for it to become true are " "awakened. Threads that call :meth:`wait` once the flag is true will not " "block at all." msgstr "" -#: ../../library/threading.rst:980 +#: ../../library/threading.rst:1007 msgid "" "Reset the internal flag to false. Subsequently, threads calling :meth:`wait` " "will block until :meth:`.set` is called to set the internal flag to true " "again." msgstr "" -#: ../../library/threading.rst:986 +#: ../../library/threading.rst:1013 msgid "" "Block as long as the internal flag is false and the timeout, if given, has " "not expired. The return value represents the reason that this blocking " @@ -1255,18 +1298,18 @@ msgid "" "become true within the given wait time." msgstr "" -#: ../../library/threading.rst:992 +#: ../../library/threading.rst:1019 msgid "" "When the timeout argument is present and not ``None``, it should be a " "floating point number specifying a timeout for the operation in seconds, or " "fractions thereof." msgstr "" -#: ../../library/threading.rst:1003 +#: ../../library/threading.rst:1030 msgid "Timer Objects" msgstr "" -#: ../../library/threading.rst:1005 +#: ../../library/threading.rst:1032 msgid "" "This class represents an action that should be run only after a certain " "amount of time has passed --- a timer. :class:`Timer` is a subclass of :" @@ -1274,7 +1317,7 @@ msgid "" "threads." msgstr "" -#: ../../library/threading.rst:1009 +#: ../../library/threading.rst:1036 msgid "" "Timers are started, as with threads, by calling their :meth:`Timer.start " "` method. The timer can be stopped (before its action has " @@ -1283,14 +1326,14 @@ msgid "" "interval specified by the user." msgstr "" -#: ../../library/threading.rst:1015 +#: ../../library/threading.rst:1042 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/threading.rst:1026 +#: ../../library/threading.rst:1053 msgid "" "Create a timer that will run *function* with arguments *args* and keyword " "arguments *kwargs*, after *interval* seconds have passed. If *args* is " @@ -1298,17 +1341,17 @@ msgid "" "``None`` (the default) then an empty dict will be used." msgstr "" -#: ../../library/threading.rst:1036 +#: ../../library/threading.rst:1063 msgid "" "Stop the timer, and cancel the execution of the timer's action. This will " "only work if the timer is still in its waiting stage." msgstr "" -#: ../../library/threading.rst:1041 +#: ../../library/threading.rst:1068 msgid "Barrier Objects" msgstr "" -#: ../../library/threading.rst:1045 +#: ../../library/threading.rst:1072 msgid "" "This class provides a simple synchronization primitive for use by a fixed " "number of threads that need to wait for each other. Each of the threads " @@ -1317,18 +1360,18 @@ msgid "" "calls. At this point, the threads are released simultaneously." msgstr "" -#: ../../library/threading.rst:1051 +#: ../../library/threading.rst:1078 msgid "" "The barrier can be reused any number of times for the same number of threads." msgstr "" -#: ../../library/threading.rst:1053 +#: ../../library/threading.rst:1080 msgid "" "As an example, here is a simple way to synchronize a client and server " "thread::" msgstr "" -#: ../../library/threading.rst:1073 +#: ../../library/threading.rst:1100 msgid "" "Create a barrier object for *parties* number of threads. An *action*, when " "provided, is a callable to be called by one of the threads when they are " @@ -1336,7 +1379,7 @@ msgid "" "the :meth:`wait` method." msgstr "" -#: ../../library/threading.rst:1080 +#: ../../library/threading.rst:1107 msgid "" "Pass the barrier. When all the threads party to the barrier have called " "this function, they are all released simultaneously. If a *timeout* is " @@ -1344,44 +1387,44 @@ msgid "" "constructor." msgstr "" -#: ../../library/threading.rst:1085 +#: ../../library/threading.rst:1112 msgid "" "The return value is an integer in the range 0 to *parties* -- 1, different " "for each thread. This can be used to select a thread to do some special " "housekeeping, e.g.::" msgstr "" -#: ../../library/threading.rst:1094 +#: ../../library/threading.rst:1121 msgid "" "If an *action* was provided to the constructor, one of the threads will have " "called it prior to being released. Should this call raise an error, the " "barrier is put into the broken state." msgstr "" -#: ../../library/threading.rst:1098 +#: ../../library/threading.rst:1125 msgid "If the call times out, the barrier is put into the broken state." msgstr "" -#: ../../library/threading.rst:1100 +#: ../../library/threading.rst:1127 msgid "" "This method may raise a :class:`BrokenBarrierError` exception if the barrier " "is broken or reset while a thread is waiting." msgstr "" -#: ../../library/threading.rst:1105 +#: ../../library/threading.rst:1132 msgid "" "Return the barrier to the default, empty state. Any threads waiting on it " "will receive the :class:`BrokenBarrierError` exception." msgstr "" -#: ../../library/threading.rst:1108 +#: ../../library/threading.rst:1135 msgid "" "Note that using this function may require some external synchronization if " "there are other threads whose state is unknown. If a barrier is broken it " "may be better to just leave it and create a new one." msgstr "" -#: ../../library/threading.rst:1114 +#: ../../library/threading.rst:1141 msgid "" "Put the barrier into a broken state. This causes any active or future calls " "to :meth:`wait` to fail with the :class:`BrokenBarrierError`. Use this for " @@ -1389,36 +1432,36 @@ msgid "" "application." msgstr "" -#: ../../library/threading.rst:1119 +#: ../../library/threading.rst:1146 msgid "" "It may be preferable to simply create the barrier with a sensible *timeout* " "value to automatically guard against one of the threads going awry." msgstr "" -#: ../../library/threading.rst:1125 +#: ../../library/threading.rst:1152 msgid "The number of threads required to pass the barrier." msgstr "" -#: ../../library/threading.rst:1129 +#: ../../library/threading.rst:1156 msgid "The number of threads currently waiting in the barrier." msgstr "" -#: ../../library/threading.rst:1133 +#: ../../library/threading.rst:1160 msgid "A boolean that is ``True`` if the barrier is in the broken state." msgstr "" -#: ../../library/threading.rst:1138 +#: ../../library/threading.rst:1165 msgid "" "This exception, a subclass of :exc:`RuntimeError`, is raised when the :class:" "`Barrier` object is reset or broken." msgstr "" -#: ../../library/threading.rst:1145 +#: ../../library/threading.rst:1172 msgid "" "Using locks, conditions, and semaphores in the :keyword:`!with` statement" msgstr "" -#: ../../library/threading.rst:1147 +#: ../../library/threading.rst:1174 msgid "" "All of the objects provided by this module that have ``acquire`` and " "``release`` methods can be used as context managers for a :keyword:`with` " @@ -1427,11 +1470,11 @@ msgid "" "following snippet::" msgstr "" -#: ../../library/threading.rst:1156 +#: ../../library/threading.rst:1183 msgid "is equivalent to::" msgstr "" -#: ../../library/threading.rst:1164 +#: ../../library/threading.rst:1191 msgid "" "Currently, :class:`Lock`, :class:`RLock`, :class:`Condition`, :class:" "`Semaphore`, and :class:`BoundedSemaphore` objects may be used as :keyword:" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 38adcd35d1c..48a01101323 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-10 00:04+0000\n" +"POT-Creation-Date: 2024-05-23 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2759,7 +2759,7 @@ msgstr "" msgid "" "Undocumented :meth:`TestLoader.loadTestsFromModule ` parameter *use_load_tests* (deprecated and ignored " -"since Python 3.2)." +"since Python 3.5)." msgstr "" #: ../../whatsnew/3.12.rst:1755 From b719e974f806da4d81de0a9cd0b858558c830f72 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Thu, 23 May 2024 15:01:42 +0900 Subject: [PATCH 12/13] fix: resolve fuzzy entries --- .scripts/poetry.lock | 295 ++++++++++++++++++--------------------- library/dataclasses.po | 82 +++++------ library/functions.po | 5 +- library/marshal.po | 3 +- library/secrets.po | 3 +- library/shutil.po | 3 +- library/unittest.mock.po | 76 +++++----- tutorial/inputoutput.po | 213 +++++++++++----------------- tutorial/venv.po | 30 ++-- 9 files changed, 306 insertions(+), 404 deletions(-) diff --git a/.scripts/poetry.lock b/.scripts/poetry.lock index 83326739cc9..b89fa8168a6 100644 --- a/.scripts/poetry.lock +++ b/.scripts/poetry.lock @@ -242,166 +242,149 @@ files = [ [[package]] name = "lxml" -version = "5.2.1" +version = "5.2.2" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." optional = false python-versions = ">=3.6" files = [ - {file = "lxml-5.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1f7785f4f789fdb522729ae465adcaa099e2a3441519df750ebdccc481d961a1"}, - {file = "lxml-5.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6cc6ee342fb7fa2471bd9b6d6fdfc78925a697bf5c2bcd0a302e98b0d35bfad3"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:794f04eec78f1d0e35d9e0c36cbbb22e42d370dda1609fb03bcd7aeb458c6377"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817d420c60a5183953c783b0547d9eb43b7b344a2c46f69513d5952a78cddf3"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2213afee476546a7f37c7a9b4ad4d74b1e112a6fafffc9185d6d21f043128c81"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b070bbe8d3f0f6147689bed981d19bbb33070225373338df755a46893528104a"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e02c5175f63effbd7c5e590399c118d5db6183bbfe8e0d118bdb5c2d1b48d937"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:3dc773b2861b37b41a6136e0b72a1a44689a9c4c101e0cddb6b854016acc0aa8"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:d7520db34088c96cc0e0a3ad51a4fd5b401f279ee112aa2b7f8f976d8582606d"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:bcbf4af004f98793a95355980764b3d80d47117678118a44a80b721c9913436a"}, - {file = "lxml-5.2.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a2b44bec7adf3e9305ce6cbfa47a4395667e744097faed97abb4728748ba7d47"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:1c5bb205e9212d0ebddf946bc07e73fa245c864a5f90f341d11ce7b0b854475d"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2c9d147f754b1b0e723e6afb7ba1566ecb162fe4ea657f53d2139bbf894d050a"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:3545039fa4779be2df51d6395e91a810f57122290864918b172d5dc7ca5bb433"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a91481dbcddf1736c98a80b122afa0f7296eeb80b72344d7f45dc9f781551f56"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2ddfe41ddc81f29a4c44c8ce239eda5ade4e7fc305fb7311759dd6229a080052"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:a7baf9ffc238e4bf401299f50e971a45bfcc10a785522541a6e3179c83eabf0a"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:31e9a882013c2f6bd2f2c974241bf4ba68c85eba943648ce88936d23209a2e01"}, - {file = "lxml-5.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0a15438253b34e6362b2dc41475e7f80de76320f335e70c5528b7148cac253a1"}, - {file = "lxml-5.2.1-cp310-cp310-win32.whl", hash = "sha256:6992030d43b916407c9aa52e9673612ff39a575523c5f4cf72cdef75365709a5"}, - {file = "lxml-5.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:da052e7962ea2d5e5ef5bc0355d55007407087392cf465b7ad84ce5f3e25fe0f"}, - {file = "lxml-5.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:70ac664a48aa64e5e635ae5566f5227f2ab7f66a3990d67566d9907edcbbf867"}, - {file = "lxml-5.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1ae67b4e737cddc96c99461d2f75d218bdf7a0c3d3ad5604d1f5e7464a2f9ffe"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f18a5a84e16886898e51ab4b1d43acb3083c39b14c8caeb3589aabff0ee0b270"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c6f2c8372b98208ce609c9e1d707f6918cc118fea4e2c754c9f0812c04ca116d"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:394ed3924d7a01b5bd9a0d9d946136e1c2f7b3dc337196d99e61740ed4bc6fe1"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d077bc40a1fe984e1a9931e801e42959a1e6598edc8a3223b061d30fbd26bbc"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:764b521b75701f60683500d8621841bec41a65eb739b8466000c6fdbc256c240"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:3a6b45da02336895da82b9d472cd274b22dc27a5cea1d4b793874eead23dd14f"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:5ea7b6766ac2dfe4bcac8b8595107665a18ef01f8c8343f00710b85096d1b53a"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:e196a4ff48310ba62e53a8e0f97ca2bca83cdd2fe2934d8b5cb0df0a841b193a"}, - {file = "lxml-5.2.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:200e63525948e325d6a13a76ba2911f927ad399ef64f57898cf7c74e69b71095"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:dae0ed02f6b075426accbf6b2863c3d0a7eacc1b41fb40f2251d931e50188dad"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:ab31a88a651039a07a3ae327d68ebdd8bc589b16938c09ef3f32a4b809dc96ef"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:df2e6f546c4df14bc81f9498bbc007fbb87669f1bb707c6138878c46b06f6510"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5dd1537e7cc06efd81371f5d1a992bd5ab156b2b4f88834ca852de4a8ea523fa"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9b9ec9c9978b708d488bec36b9e4c94d88fd12ccac3e62134a9d17ddba910ea9"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8e77c69d5892cb5ba71703c4057091e31ccf534bd7f129307a4d084d90d014b8"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a8d5c70e04aac1eda5c829a26d1f75c6e5286c74743133d9f742cda8e53b9c2f"}, - {file = "lxml-5.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c94e75445b00319c1fad60f3c98b09cd63fe1134a8a953dcd48989ef42318534"}, - {file = "lxml-5.2.1-cp311-cp311-win32.whl", hash = "sha256:4951e4f7a5680a2db62f7f4ab2f84617674d36d2d76a729b9a8be4b59b3659be"}, - {file = "lxml-5.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:5c670c0406bdc845b474b680b9a5456c561c65cf366f8db5a60154088c92d102"}, - {file = "lxml-5.2.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:abc25c3cab9ec7fcd299b9bcb3b8d4a1231877e425c650fa1c7576c5107ab851"}, - {file = "lxml-5.2.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6935bbf153f9a965f1e07c2649c0849d29832487c52bb4a5c5066031d8b44fd5"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d793bebb202a6000390a5390078e945bbb49855c29c7e4d56a85901326c3b5d9"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afd5562927cdef7c4f5550374acbc117fd4ecc05b5007bdfa57cc5355864e0a4"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0e7259016bc4345a31af861fdce942b77c99049d6c2107ca07dc2bba2435c1d9"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:530e7c04f72002d2f334d5257c8a51bf409db0316feee7c87e4385043be136af"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59689a75ba8d7ffca577aefd017d08d659d86ad4585ccc73e43edbfc7476781a"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:f9737bf36262046213a28e789cc82d82c6ef19c85a0cf05e75c670a33342ac2c"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:3a74c4f27167cb95c1d4af1c0b59e88b7f3e0182138db2501c353555f7ec57f4"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:68a2610dbe138fa8c5826b3f6d98a7cfc29707b850ddcc3e21910a6fe51f6ca0"}, - {file = "lxml-5.2.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:f0a1bc63a465b6d72569a9bba9f2ef0334c4e03958e043da1920299100bc7c08"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c2d35a1d047efd68027817b32ab1586c1169e60ca02c65d428ae815b593e65d4"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:79bd05260359170f78b181b59ce871673ed01ba048deef4bf49a36ab3e72e80b"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:865bad62df277c04beed9478fe665b9ef63eb28fe026d5dedcb89b537d2e2ea6"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:44f6c7caff88d988db017b9b0e4ab04934f11e3e72d478031efc7edcac6c622f"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:71e97313406ccf55d32cc98a533ee05c61e15d11b99215b237346171c179c0b0"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:057cdc6b86ab732cf361f8b4d8af87cf195a1f6dc5b0ff3de2dced242c2015e0"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:f3bbbc998d42f8e561f347e798b85513ba4da324c2b3f9b7969e9c45b10f6169"}, - {file = "lxml-5.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:491755202eb21a5e350dae00c6d9a17247769c64dcf62d8c788b5c135e179dc4"}, - {file = "lxml-5.2.1-cp312-cp312-win32.whl", hash = "sha256:8de8f9d6caa7f25b204fc861718815d41cbcf27ee8f028c89c882a0cf4ae4134"}, - {file = "lxml-5.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:f2a9efc53d5b714b8df2b4b3e992accf8ce5bbdfe544d74d5c6766c9e1146a3a"}, - {file = "lxml-5.2.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:70a9768e1b9d79edca17890175ba915654ee1725975d69ab64813dd785a2bd5c"}, - {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c38d7b9a690b090de999835f0443d8aa93ce5f2064035dfc48f27f02b4afc3d0"}, - {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5670fb70a828663cc37552a2a85bf2ac38475572b0e9b91283dc09efb52c41d1"}, - {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:958244ad566c3ffc385f47dddde4145088a0ab893504b54b52c041987a8c1863"}, - {file = "lxml-5.2.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:b6241d4eee5f89453307c2f2bfa03b50362052ca0af1efecf9fef9a41a22bb4f"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:2a66bf12fbd4666dd023b6f51223aed3d9f3b40fef06ce404cb75bafd3d89536"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:9123716666e25b7b71c4e1789ec829ed18663152008b58544d95b008ed9e21e9"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:0c3f67e2aeda739d1cc0b1102c9a9129f7dc83901226cc24dd72ba275ced4218"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:5d5792e9b3fb8d16a19f46aa8208987cfeafe082363ee2745ea8b643d9cc5b45"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_2_aarch64.whl", hash = "sha256:88e22fc0a6684337d25c994381ed8a1580a6f5ebebd5ad41f89f663ff4ec2885"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_2_ppc64le.whl", hash = "sha256:21c2e6b09565ba5b45ae161b438e033a86ad1736b8c838c766146eff8ceffff9"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_2_s390x.whl", hash = "sha256:afbbdb120d1e78d2ba8064a68058001b871154cc57787031b645c9142b937a62"}, - {file = "lxml-5.2.1-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:627402ad8dea044dde2eccde4370560a2b750ef894c9578e1d4f8ffd54000461"}, - {file = "lxml-5.2.1-cp36-cp36m-win32.whl", hash = "sha256:e89580a581bf478d8dcb97d9cd011d567768e8bc4095f8557b21c4d4c5fea7d0"}, - {file = "lxml-5.2.1-cp36-cp36m-win_amd64.whl", hash = "sha256:59565f10607c244bc4c05c0c5fa0c190c990996e0c719d05deec7030c2aa8289"}, - {file = "lxml-5.2.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:857500f88b17a6479202ff5fe5f580fc3404922cd02ab3716197adf1ef628029"}, - {file = "lxml-5.2.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:56c22432809085b3f3ae04e6e7bdd36883d7258fcd90e53ba7b2e463efc7a6af"}, - {file = "lxml-5.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a55ee573116ba208932e2d1a037cc4b10d2c1cb264ced2184d00b18ce585b2c0"}, - {file = "lxml-5.2.1-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:6cf58416653c5901e12624e4013708b6e11142956e7f35e7a83f1ab02f3fe456"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:64c2baa7774bc22dd4474248ba16fe1a7f611c13ac6123408694d4cc93d66dbd"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:74b28c6334cca4dd704e8004cba1955af0b778cf449142e581e404bd211fb619"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:7221d49259aa1e5a8f00d3d28b1e0b76031655ca74bb287123ef56c3db92f213"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3dbe858ee582cbb2c6294dc85f55b5f19c918c2597855e950f34b660f1a5ede6"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:04ab5415bf6c86e0518d57240a96c4d1fcfc3cb370bb2ac2a732b67f579e5a04"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:6ab833e4735a7e5533711a6ea2df26459b96f9eec36d23f74cafe03631647c41"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f443cdef978430887ed55112b491f670bba6462cea7a7742ff8f14b7abb98d75"}, - {file = "lxml-5.2.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:9e2addd2d1866fe112bc6f80117bcc6bc25191c5ed1bfbcf9f1386a884252ae8"}, - {file = "lxml-5.2.1-cp37-cp37m-win32.whl", hash = "sha256:f51969bac61441fd31f028d7b3b45962f3ecebf691a510495e5d2cd8c8092dbd"}, - {file = "lxml-5.2.1-cp37-cp37m-win_amd64.whl", hash = "sha256:b0b58fbfa1bf7367dde8a557994e3b1637294be6cf2169810375caf8571a085c"}, - {file = "lxml-5.2.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3e183c6e3298a2ed5af9d7a356ea823bccaab4ec2349dc9ed83999fd289d14d5"}, - {file = "lxml-5.2.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:804f74efe22b6a227306dd890eecc4f8c59ff25ca35f1f14e7482bbce96ef10b"}, - {file = "lxml-5.2.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:08802f0c56ed150cc6885ae0788a321b73505d2263ee56dad84d200cab11c07a"}, - {file = "lxml-5.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f8c09ed18ecb4ebf23e02b8e7a22a05d6411911e6fabef3a36e4f371f4f2585"}, - {file = "lxml-5.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3d30321949861404323c50aebeb1943461a67cd51d4200ab02babc58bd06a86"}, - {file = "lxml-5.2.1-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:b560e3aa4b1d49e0e6c847d72665384db35b2f5d45f8e6a5c0072e0283430533"}, - {file = "lxml-5.2.1-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:058a1308914f20784c9f4674036527e7c04f7be6fb60f5d61353545aa7fcb739"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:adfb84ca6b87e06bc6b146dc7da7623395db1e31621c4785ad0658c5028b37d7"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:417d14450f06d51f363e41cace6488519038f940676ce9664b34ebf5653433a5"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a2dfe7e2473f9b59496247aad6e23b405ddf2e12ef0765677b0081c02d6c2c0b"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bf2e2458345d9bffb0d9ec16557d8858c9c88d2d11fed53998512504cd9df49b"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:58278b29cb89f3e43ff3e0c756abbd1518f3ee6adad9e35b51fb101c1c1daaec"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:64641a6068a16201366476731301441ce93457eb8452056f570133a6ceb15fca"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:78bfa756eab503673991bdcf464917ef7845a964903d3302c5f68417ecdc948c"}, - {file = "lxml-5.2.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:11a04306fcba10cd9637e669fd73aa274c1c09ca64af79c041aa820ea992b637"}, - {file = "lxml-5.2.1-cp38-cp38-win32.whl", hash = "sha256:66bc5eb8a323ed9894f8fa0ee6cb3e3fb2403d99aee635078fd19a8bc7a5a5da"}, - {file = "lxml-5.2.1-cp38-cp38-win_amd64.whl", hash = "sha256:9676bfc686fa6a3fa10cd4ae6b76cae8be26eb5ec6811d2a325636c460da1806"}, - {file = "lxml-5.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:cf22b41fdae514ee2f1691b6c3cdeae666d8b7fa9434de445f12bbeee0cf48dd"}, - {file = "lxml-5.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ec42088248c596dbd61d4ae8a5b004f97a4d91a9fd286f632e42e60b706718d7"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd53553ddad4a9c2f1f022756ae64abe16da1feb497edf4d9f87f99ec7cf86bd"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feaa45c0eae424d3e90d78823f3828e7dc42a42f21ed420db98da2c4ecf0a2cb"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddc678fb4c7e30cf830a2b5a8d869538bc55b28d6c68544d09c7d0d8f17694dc"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:853e074d4931dbcba7480d4dcab23d5c56bd9607f92825ab80ee2bd916edea53"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc4691d60512798304acb9207987e7b2b7c44627ea88b9d77489bbe3e6cc3bd4"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:beb72935a941965c52990f3a32d7f07ce869fe21c6af8b34bf6a277b33a345d3"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_28_ppc64le.whl", hash = "sha256:6588c459c5627fefa30139be4d2e28a2c2a1d0d1c265aad2ba1935a7863a4913"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_28_s390x.whl", hash = "sha256:588008b8497667f1ddca7c99f2f85ce8511f8f7871b4a06ceede68ab62dff64b"}, - {file = "lxml-5.2.1-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b6787b643356111dfd4032b5bffe26d2f8331556ecb79e15dacb9275da02866e"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7c17b64b0a6ef4e5affae6a3724010a7a66bda48a62cfe0674dabd46642e8b54"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:27aa20d45c2e0b8cd05da6d4759649170e8dfc4f4e5ef33a34d06f2d79075d57"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d4f2cc7060dc3646632d7f15fe68e2fa98f58e35dd5666cd525f3b35d3fed7f8"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff46d772d5f6f73564979cd77a4fffe55c916a05f3cb70e7c9c0590059fb29ef"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:96323338e6c14e958d775700ec8a88346014a85e5de73ac7967db0367582049b"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:52421b41ac99e9d91934e4d0d0fe7da9f02bfa7536bb4431b4c05c906c8c6919"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:7a7efd5b6d3e30d81ec68ab8a88252d7c7c6f13aaa875009fe3097eb4e30b84c"}, - {file = "lxml-5.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:0ed777c1e8c99b63037b91f9d73a6aad20fd035d77ac84afcc205225f8f41188"}, - {file = "lxml-5.2.1-cp39-cp39-win32.whl", hash = "sha256:644df54d729ef810dcd0f7732e50e5ad1bd0a135278ed8d6bcb06f33b6b6f708"}, - {file = "lxml-5.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:9ca66b8e90daca431b7ca1408cae085d025326570e57749695d6a01454790e95"}, - {file = "lxml-5.2.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9b0ff53900566bc6325ecde9181d89afadc59c5ffa39bddf084aaedfe3b06a11"}, - {file = "lxml-5.2.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd6037392f2d57793ab98d9e26798f44b8b4da2f2464388588f48ac52c489ea1"}, - {file = "lxml-5.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b9c07e7a45bb64e21df4b6aa623cb8ba214dfb47d2027d90eac197329bb5e94"}, - {file = "lxml-5.2.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:3249cc2989d9090eeac5467e50e9ec2d40704fea9ab72f36b034ea34ee65ca98"}, - {file = "lxml-5.2.1-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f42038016852ae51b4088b2862126535cc4fc85802bfe30dea3500fdfaf1864e"}, - {file = "lxml-5.2.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:533658f8fbf056b70e434dff7e7aa611bcacb33e01f75de7f821810e48d1bb66"}, - {file = "lxml-5.2.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:622020d4521e22fb371e15f580d153134bfb68d6a429d1342a25f051ec72df1c"}, - {file = "lxml-5.2.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efa7b51824aa0ee957ccd5a741c73e6851de55f40d807f08069eb4c5a26b2baa"}, - {file = "lxml-5.2.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c6ad0fbf105f6bcc9300c00010a2ffa44ea6f555df1a2ad95c88f5656104817"}, - {file = "lxml-5.2.1-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:e233db59c8f76630c512ab4a4daf5a5986da5c3d5b44b8e9fc742f2a24dbd460"}, - {file = "lxml-5.2.1-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:6a014510830df1475176466b6087fc0c08b47a36714823e58d8b8d7709132a96"}, - {file = "lxml-5.2.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:d38c8f50ecf57f0463399569aa388b232cf1a2ffb8f0a9a5412d0db57e054860"}, - {file = "lxml-5.2.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5aea8212fb823e006b995c4dda533edcf98a893d941f173f6c9506126188860d"}, - {file = "lxml-5.2.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ff097ae562e637409b429a7ac958a20aab237a0378c42dabaa1e3abf2f896e5f"}, - {file = "lxml-5.2.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f5d65c39f16717a47c36c756af0fb36144069c4718824b7533f803ecdf91138"}, - {file = "lxml-5.2.1-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:3d0c3dd24bb4605439bf91068598d00c6370684f8de4a67c2992683f6c309d6b"}, - {file = "lxml-5.2.1-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e32be23d538753a8adb6c85bd539f5fd3b15cb987404327c569dfc5fd8366e85"}, - {file = "lxml-5.2.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:cc518cea79fd1e2f6c90baafa28906d4309d24f3a63e801d855e7424c5b34144"}, - {file = "lxml-5.2.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a0af35bd8ebf84888373630f73f24e86bf016642fb8576fba49d3d6b560b7cbc"}, - {file = "lxml-5.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8aca2e3a72f37bfc7b14ba96d4056244001ddcc18382bd0daa087fd2e68a354"}, - {file = "lxml-5.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ca1e8188b26a819387b29c3895c47a5e618708fe6f787f3b1a471de2c4a94d9"}, - {file = "lxml-5.2.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c8ba129e6d3b0136a0f50345b2cb3db53f6bda5dd8c7f5d83fbccba97fb5dcb5"}, - {file = "lxml-5.2.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e998e304036198b4f6914e6a1e2b6f925208a20e2042563d9734881150c6c246"}, - {file = "lxml-5.2.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:d3be9b2076112e51b323bdf6d5a7f8a798de55fb8d95fcb64bd179460cdc0704"}, - {file = "lxml-5.2.1.tar.gz", hash = "sha256:3f7765e69bbce0906a7c74d5fe46d2c7a7596147318dbc08e4a2431f3060e306"}, + {file = "lxml-5.2.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:364d03207f3e603922d0d3932ef363d55bbf48e3647395765f9bfcbdf6d23632"}, + {file = "lxml-5.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:50127c186f191b8917ea2fb8b206fbebe87fd414a6084d15568c27d0a21d60db"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74e4f025ef3db1c6da4460dd27c118d8cd136d0391da4e387a15e48e5c975147"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:981a06a3076997adf7c743dcd0d7a0415582661e2517c7d961493572e909aa1d"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aef5474d913d3b05e613906ba4090433c515e13ea49c837aca18bde190853dff"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e275ea572389e41e8b039ac076a46cb87ee6b8542df3fff26f5baab43713bca"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5b65529bb2f21ac7861a0e94fdbf5dc0daab41497d18223b46ee8515e5ad297"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:bcc98f911f10278d1daf14b87d65325851a1d29153caaf146877ec37031d5f36"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:b47633251727c8fe279f34025844b3b3a3e40cd1b198356d003aa146258d13a2"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:fbc9d316552f9ef7bba39f4edfad4a734d3d6f93341232a9dddadec4f15d425f"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:13e69be35391ce72712184f69000cda04fc89689429179bc4c0ae5f0b7a8c21b"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3b6a30a9ab040b3f545b697cb3adbf3696c05a3a68aad172e3fd7ca73ab3c835"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:a233bb68625a85126ac9f1fc66d24337d6e8a0f9207b688eec2e7c880f012ec0"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:dfa7c241073d8f2b8e8dbc7803c434f57dbb83ae2a3d7892dd068d99e96efe2c"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1a7aca7964ac4bb07680d5c9d63b9d7028cace3e2d43175cb50bba8c5ad33316"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ae4073a60ab98529ab8a72ebf429f2a8cc612619a8c04e08bed27450d52103c0"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ffb2be176fed4457e445fe540617f0252a72a8bc56208fd65a690fdb1f57660b"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e290d79a4107d7d794634ce3e985b9ae4f920380a813717adf61804904dc4393"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:96e85aa09274955bb6bd483eaf5b12abadade01010478154b0ec70284c1b1526"}, + {file = "lxml-5.2.2-cp310-cp310-win32.whl", hash = "sha256:f956196ef61369f1685d14dad80611488d8dc1ef00be57c0c5a03064005b0f30"}, + {file = "lxml-5.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:875a3f90d7eb5c5d77e529080d95140eacb3c6d13ad5b616ee8095447b1d22e7"}, + {file = "lxml-5.2.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:45f9494613160d0405682f9eee781c7e6d1bf45f819654eb249f8f46a2c22545"}, + {file = "lxml-5.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b0b3f2df149efb242cee2ffdeb6674b7f30d23c9a7af26595099afaf46ef4e88"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d28cb356f119a437cc58a13f8135ab8a4c8ece18159eb9194b0d269ec4e28083"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:657a972f46bbefdbba2d4f14413c0d079f9ae243bd68193cb5061b9732fa54c1"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b74b9ea10063efb77a965a8d5f4182806fbf59ed068b3c3fd6f30d2ac7bee734"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07542787f86112d46d07d4f3c4e7c760282011b354d012dc4141cc12a68cef5f"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:303f540ad2dddd35b92415b74b900c749ec2010e703ab3bfd6660979d01fd4ed"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:2eb2227ce1ff998faf0cd7fe85bbf086aa41dfc5af3b1d80867ecfe75fb68df3"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:1d8a701774dfc42a2f0b8ccdfe7dbc140500d1049e0632a611985d943fcf12df"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:56793b7a1a091a7c286b5f4aa1fe4ae5d1446fe742d00cdf2ffb1077865db10d"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:eb00b549b13bd6d884c863554566095bf6fa9c3cecb2e7b399c4bc7904cb33b5"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a2569a1f15ae6c8c64108a2cd2b4a858fc1e13d25846be0666fc144715e32ab"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:8cf85a6e40ff1f37fe0f25719aadf443686b1ac7652593dc53c7ef9b8492b115"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:d237ba6664b8e60fd90b8549a149a74fcc675272e0e95539a00522e4ca688b04"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0b3f5016e00ae7630a4b83d0868fca1e3d494c78a75b1c7252606a3a1c5fc2ad"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:23441e2b5339bc54dc949e9e675fa35efe858108404ef9aa92f0456929ef6fe8"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:2fb0ba3e8566548d6c8e7dd82a8229ff47bd8fb8c2da237607ac8e5a1b8312e5"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:79d1fb9252e7e2cfe4de6e9a6610c7cbb99b9708e2c3e29057f487de5a9eaefa"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6dcc3d17eac1df7859ae01202e9bb11ffa8c98949dcbeb1069c8b9a75917e01b"}, + {file = "lxml-5.2.2-cp311-cp311-win32.whl", hash = "sha256:4c30a2f83677876465f44c018830f608fa3c6a8a466eb223535035fbc16f3438"}, + {file = "lxml-5.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:49095a38eb333aaf44c06052fd2ec3b8f23e19747ca7ec6f6c954ffea6dbf7be"}, + {file = "lxml-5.2.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:7429e7faa1a60cad26ae4227f4dd0459efde239e494c7312624ce228e04f6391"}, + {file = "lxml-5.2.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:50ccb5d355961c0f12f6cf24b7187dbabd5433f29e15147a67995474f27d1776"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc911208b18842a3a57266d8e51fc3cfaccee90a5351b92079beed912a7914c2"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33ce9e786753743159799fdf8e92a5da351158c4bfb6f2db0bf31e7892a1feb5"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ec87c44f619380878bd49ca109669c9f221d9ae6883a5bcb3616785fa8f94c97"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08ea0f606808354eb8f2dfaac095963cb25d9d28e27edcc375d7b30ab01abbf6"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75a9632f1d4f698b2e6e2e1ada40e71f369b15d69baddb8968dcc8e683839b18"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74da9f97daec6928567b48c90ea2c82a106b2d500f397eeb8941e47d30b1ca85"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:0969e92af09c5687d769731e3f39ed62427cc72176cebb54b7a9d52cc4fa3b73"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:9164361769b6ca7769079f4d426a41df6164879f7f3568be9086e15baca61466"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:d26a618ae1766279f2660aca0081b2220aca6bd1aa06b2cf73f07383faf48927"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab67ed772c584b7ef2379797bf14b82df9aa5f7438c5b9a09624dd834c1c1aaf"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:3d1e35572a56941b32c239774d7e9ad724074d37f90c7a7d499ab98761bd80cf"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:8268cbcd48c5375f46e000adb1390572c98879eb4f77910c6053d25cc3ac2c67"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e282aedd63c639c07c3857097fc0e236f984ceb4089a8b284da1c526491e3f3d"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfdc2bfe69e9adf0df4915949c22a25b39d175d599bf98e7ddf620a13678585"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4aefd911793b5d2d7a921233a54c90329bf3d4a6817dc465f12ffdfe4fc7b8fe"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:8b8df03a9e995b6211dafa63b32f9d405881518ff1ddd775db4e7b98fb545e1c"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f11ae142f3a322d44513de1018b50f474f8f736bc3cd91d969f464b5bfef8836"}, + {file = "lxml-5.2.2-cp312-cp312-win32.whl", hash = "sha256:16a8326e51fcdffc886294c1e70b11ddccec836516a343f9ed0f82aac043c24a"}, + {file = "lxml-5.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:bbc4b80af581e18568ff07f6395c02114d05f4865c2812a1f02f2eaecf0bfd48"}, + {file = "lxml-5.2.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e3d9d13603410b72787579769469af730c38f2f25505573a5888a94b62b920f8"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38b67afb0a06b8575948641c1d6d68e41b83a3abeae2ca9eed2ac59892b36706"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c689d0d5381f56de7bd6966a4541bff6e08bf8d3871bbd89a0c6ab18aa699573"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:cf2a978c795b54c539f47964ec05e35c05bd045db5ca1e8366988c7f2fe6b3ce"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:739e36ef7412b2bd940f75b278749106e6d025e40027c0b94a17ef7968d55d56"}, + {file = "lxml-5.2.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d8bbcd21769594dbba9c37d3c819e2d5847656ca99c747ddb31ac1701d0c0ed9"}, + {file = "lxml-5.2.2-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:2304d3c93f2258ccf2cf7a6ba8c761d76ef84948d87bf9664e14d203da2cd264"}, + {file = "lxml-5.2.2-cp36-cp36m-win32.whl", hash = "sha256:02437fb7308386867c8b7b0e5bc4cd4b04548b1c5d089ffb8e7b31009b961dc3"}, + {file = "lxml-5.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:edcfa83e03370032a489430215c1e7783128808fd3e2e0a3225deee278585196"}, + {file = "lxml-5.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28bf95177400066596cdbcfc933312493799382879da504633d16cf60bba735b"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a745cc98d504d5bd2c19b10c79c61c7c3df9222629f1b6210c0368177589fb8"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b336b0416828022bfd5a2e3083e7f5ba54b96242159f83c7e3eebaec752f1716"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:4bc6cb140a7a0ad1f7bc37e018d0ed690b7b6520ade518285dc3171f7a117905"}, + {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:57f0a0bbc9868e10ebe874e9f129d2917750adf008fe7b9c1598c0fbbfdde6a6"}, + {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:60499fe961b21264e17a471ec296dcbf4365fbea611bf9e303ab69db7159ce61"}, + {file = "lxml-5.2.2-cp37-cp37m-win32.whl", hash = "sha256:d9b342c76003c6b9336a80efcc766748a333573abf9350f4094ee46b006ec18f"}, + {file = "lxml-5.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b16db2770517b8799c79aa80f4053cd6f8b716f21f8aca962725a9565ce3ee40"}, + {file = "lxml-5.2.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7ed07b3062b055d7a7f9d6557a251cc655eed0b3152b76de619516621c56f5d3"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f60fdd125d85bf9c279ffb8e94c78c51b3b6a37711464e1f5f31078b45002421"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a7e24cb69ee5f32e003f50e016d5fde438010c1022c96738b04fc2423e61706"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23cfafd56887eaed93d07bc4547abd5e09d837a002b791e9767765492a75883f"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:19b4e485cd07b7d83e3fe3b72132e7df70bfac22b14fe4bf7a23822c3a35bff5"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:7ce7ad8abebe737ad6143d9d3bf94b88b93365ea30a5b81f6877ec9c0dee0a48"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e49b052b768bb74f58c7dda4e0bdf7b79d43a9204ca584ffe1fb48a6f3c84c66"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d14a0d029a4e176795cef99c056d58067c06195e0c7e2dbb293bf95c08f772a3"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:be49ad33819d7dcc28a309b86d4ed98e1a65f3075c6acd3cd4fe32103235222b"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a6d17e0370d2516d5bb9062c7b4cb731cff921fc875644c3d751ad857ba9c5b1"}, + {file = "lxml-5.2.2-cp38-cp38-win32.whl", hash = "sha256:5b8c041b6265e08eac8a724b74b655404070b636a8dd6d7a13c3adc07882ef30"}, + {file = "lxml-5.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:f61efaf4bed1cc0860e567d2ecb2363974d414f7f1f124b1df368bbf183453a6"}, + {file = "lxml-5.2.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fb91819461b1b56d06fa4bcf86617fac795f6a99d12239fb0c68dbeba41a0a30"}, + {file = "lxml-5.2.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d4ed0c7cbecde7194cd3228c044e86bf73e30a23505af852857c09c24e77ec5d"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54401c77a63cc7d6dc4b4e173bb484f28a5607f3df71484709fe037c92d4f0ed"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:625e3ef310e7fa3a761d48ca7ea1f9d8718a32b1542e727d584d82f4453d5eeb"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:519895c99c815a1a24a926d5b60627ce5ea48e9f639a5cd328bda0515ea0f10c"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c7079d5eb1c1315a858bbf180000757db8ad904a89476653232db835c3114001"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:343ab62e9ca78094f2306aefed67dcfad61c4683f87eee48ff2fd74902447726"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:cd9e78285da6c9ba2d5c769628f43ef66d96ac3085e59b10ad4f3707980710d3"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_ppc64le.whl", hash = "sha256:546cf886f6242dff9ec206331209db9c8e1643ae642dea5fdbecae2453cb50fd"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_s390x.whl", hash = "sha256:02f6a8eb6512fdc2fd4ca10a49c341c4e109aa6e9448cc4859af5b949622715a"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:339ee4a4704bc724757cd5dd9dc8cf4d00980f5d3e6e06d5847c1b594ace68ab"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0a028b61a2e357ace98b1615fc03f76eb517cc028993964fe08ad514b1e8892d"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f90e552ecbad426eab352e7b2933091f2be77115bb16f09f78404861c8322981"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d83e2d94b69bf31ead2fa45f0acdef0757fa0458a129734f59f67f3d2eb7ef32"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a02d3c48f9bb1e10c7788d92c0c7db6f2002d024ab6e74d6f45ae33e3d0288a3"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:6d68ce8e7b2075390e8ac1e1d3a99e8b6372c694bbe612632606d1d546794207"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:453d037e09a5176d92ec0fd282e934ed26d806331a8b70ab431a81e2fbabf56d"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:3b019d4ee84b683342af793b56bb35034bd749e4cbdd3d33f7d1107790f8c472"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb3942960f0beb9f46e2a71a3aca220d1ca32feb5a398656be934320804c0df9"}, + {file = "lxml-5.2.2-cp39-cp39-win32.whl", hash = "sha256:ac6540c9fff6e3813d29d0403ee7a81897f1d8ecc09a8ff84d2eea70ede1cdbf"}, + {file = "lxml-5.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:610b5c77428a50269f38a534057444c249976433f40f53e3b47e68349cca1425"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b537bd04d7ccd7c6350cdaaaad911f6312cbd61e6e6045542f781c7f8b2e99d2"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4820c02195d6dfb7b8508ff276752f6b2ff8b64ae5d13ebe02e7667e035000b9"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a09f6184f17a80897172863a655467da2b11151ec98ba8d7af89f17bf63dae"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:76acba4c66c47d27c8365e7c10b3d8016a7da83d3191d053a58382311a8bf4e1"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b128092c927eaf485928cec0c28f6b8bead277e28acf56800e972aa2c2abd7a2"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ae791f6bd43305aade8c0e22f816b34f3b72b6c820477aab4d18473a37e8090b"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a2f6a1bc2460e643785a2cde17293bd7a8f990884b822f7bca47bee0a82fc66b"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e8d351ff44c1638cb6e980623d517abd9f580d2e53bfcd18d8941c052a5a009"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bec4bd9133420c5c52d562469c754f27c5c9e36ee06abc169612c959bd7dbb07"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:55ce6b6d803890bd3cc89975fca9de1dff39729b43b73cb15ddd933b8bc20484"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8ab6a358d1286498d80fe67bd3d69fcbc7d1359b45b41e74c4a26964ca99c3f8"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:06668e39e1f3c065349c51ac27ae430719d7806c026fec462e5693b08b95696b"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9cd5323344d8ebb9fb5e96da5de5ad4ebab993bbf51674259dbe9d7a18049525"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89feb82ca055af0fe797a2323ec9043b26bc371365847dbe83c7fd2e2f181c34"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e481bba1e11ba585fb06db666bfc23dbe181dbafc7b25776156120bf12e0d5a6"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:9d6c6ea6a11ca0ff9cd0390b885984ed31157c168565702959c25e2191674a14"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3d98de734abee23e61f6b8c2e08a88453ada7d6486dc7cdc82922a03968928db"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:69ab77a1373f1e7563e0fb5a29a8440367dec051da6c7405333699d07444f511"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:34e17913c431f5ae01d8658dbf792fdc457073dcdfbb31dc0cc6ab256e664a8d"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05f8757b03208c3f50097761be2dea0aba02e94f0dc7023ed73a7bb14ff11eb0"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a520b4f9974b0a0a6ed73c2154de57cdfd0c8800f4f15ab2b73238ffed0b36e"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5e097646944b66207023bc3c634827de858aebc226d5d4d6d16f0b77566ea182"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b5e4ef22ff25bfd4ede5f8fb30f7b24446345f3e79d9b7455aef2836437bc38a"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ff69a9a0b4b17d78170c73abe2ab12084bdf1691550c5629ad1fe7849433f324"}, + {file = "lxml-5.2.2.tar.gz", hash = "sha256:bb2dc4898180bea79863d5487e5f9c7c34297414bad54bcd0f0852aee9cfdb87"}, ] [package.extras] diff --git a/library/dataclasses.po b/library/dataclasses.po index 02f0c7274ac..2431a39e987 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -42,7 +42,7 @@ msgid "" "pep:`526` type annotations. For example, this code::" msgstr "" "在這些生成的方法中使用的成員變數是使用 :pep:`526` 型別註釋定義的。例如,這段" -"程式碼:" +"程式碼: ::" #: ../../library/dataclasses.rst:34 #, fuzzy @@ -111,7 +111,7 @@ msgid "" "these three uses of ``@dataclass`` are equivalent::" msgstr "" "如果 ``@dataclass`` 僅用作不帶參數的簡單裝飾器,它的行為就好像它具有此簽名中" -"記錄的預設值一樣。也就是說,``@dataclass`` 的這三種用法是等價的::" +"記錄的預設值一樣。也就是說,``@dataclass`` 的這三種用法是等價的: ::" #: ../../library/dataclasses.rst:87 msgid "The parameters to ``@dataclass`` are:" @@ -122,13 +122,13 @@ msgstr "``@dataclass`` 的參數是:" msgid "" "*init*: If true (the default), a :meth:`~object.__init__` method will be " "generated." -msgstr "*init*:如果為真(預設值),將生成一個 :meth:`__init__` 方法。" +msgstr "*init*:如果為真(預設值),將生成一個 :meth:`~object.__init__` 方法。" #: ../../library/dataclasses.rst:92 #, fuzzy msgid "" "If the class already defines :meth:`!__init__`, this parameter is ignored." -msgstr "如果該類已經定義了 :meth:`__init__`,則忽略此參數。" +msgstr "如果該類已經定義了 :meth:`!__init__`,則忽略此參數。" #: ../../library/dataclasses.rst:95 #, fuzzy @@ -197,7 +197,7 @@ msgid "" "*unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method " "is generated according to how *eq* and *frozen* are set." msgstr "" -"*unsafe_hash*:如果``False``(預設值),將根據 *eq* 和 *frozen* 的設定生成一" +"*unsafe_hash*:如果 ``False``(預設值),將根據 *eq* 和 *frozen* 的設定生成一" "個 :meth:`~object.__hash__` 方法。" #: ../../library/dataclasses.rst:127 @@ -240,10 +240,10 @@ msgid "" "and should be considered carefully." msgstr "" "如果 :meth:`!__hash__` 沒有明確定義,或者如果它被設定為 ``None``,那麼 " -"``@dataclass`` *可能* 新增一個隱式的 :meth:`__hash__` 方法。雖然不推薦,但你" -"可以強制 :func:`dataclass` 使用 ``unsafe_hash=True`` 建立一個 :meth:" -"`__hash__` 方法。如果你的類在邏輯上是不可變的但仍然可以改變,則可能是這種情" -"況。這是一個特殊的用例,應該仔細考慮。" +"``@dataclass`` *可能* 新增一個隱式的 :meth:`!__hash__` 方法。雖然不推薦,但你" +"可以強制 ``@dataclass`` 使用 ``unsafe_hash=True`` 建立一個 :meth:`!__hash__` " +"方法。如果你的類在邏輯上是不可變的但仍然可以改變,則可能是這種情況。這是一個" +"特殊的用例,應該仔細考慮。" #: ../../library/dataclasses.rst:147 #, fuzzy @@ -354,8 +354,8 @@ msgid "" "an error to specify ``weakref_slot=True`` without also specifying " "``slots=True``." msgstr "" -"*weakref_slot*:如果為真(預設為 ``False``),新增一個名為“__weakref__”的插" -"槽,這是使實例可弱引用所必需的。在沒有指定 ``slots=True`` 的情況下指定 " +"*weakref_slot*:如果為真(預設為 ``False``),新增一個名為 \"__weakref__\" 的" +"插槽,這是使實例可弱引用所必需的。在沒有指定 ``slots=True`` 的情況下指定 " "``weakref_slot=True`` 是錯誤的。" #: ../../library/dataclasses.rst:209 @@ -363,7 +363,7 @@ msgstr "" msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" -msgstr "``field``\\s 可以選擇指定一個預設值,使用普通的 Python 語法:" +msgstr "``field``\\s 可以選擇指定一個預設值,使用普通的 Python 語法: ::" #: ../../library/dataclasses.rst:217 #, fuzzy @@ -372,7 +372,7 @@ msgid "" "added :meth:`~object.__init__` method, which will be defined as::" msgstr "" "在此示例中,:attr:`!a` 和 :attr:`!b` 都將包含在新增的 :meth:`~object." -"__init__` 方法中,該方法將定義為:" +"__init__` 方法中,該方法將定義為: ::" #: ../../library/dataclasses.rst:222 #, fuzzy @@ -394,8 +394,8 @@ msgid "" "function. For example::" msgstr "" "對於常見和簡單的用例,不需要其他功能。但是,有些資料類別功能需要額外的每個欄" -"位資訊。為了滿足這種對附加資訊的需求,你可以通過呼叫提供的 :func:`field` 函式" -"來替換預設欄位值。例如: ::" +"位資訊。為了滿足這種對附加資訊的需求,你可以通過呼叫提供的 :func:`!field` 函" +"式來替換預設欄位值。例如: ::" #: ../../library/dataclasses.rst:241 #, fuzzy @@ -432,7 +432,7 @@ msgid "" "discussed below. It is an error to specify both *default* and " "*default_factory*." msgstr "" -"*default_factory*:如果提供,它必須是一個零參數可呼叫函式,當此欄位需要預設值" +"*default_factory*:如果提供,它必須是一個零引數可呼叫函式,當此欄位需要預設值" "時將被呼叫。除其他用途外,這可用於指定具有可變預設值的欄位,如下所述。同時指" "定 *default* 和 *default_factory* 是錯誤的。" @@ -442,8 +442,8 @@ msgid "" "*init*: If true (the default), this field is included as a parameter to the " "generated :meth:`~object.__init__` method." msgstr "" -"``init``:如果為 true(預設值),則此欄位將作為生成的 :meth:`~object." -"__init__` 方法的參數包含在內。" +"*init*:如果為 true(預設值),則此欄位將作為生成的 :meth:`~object.__init__` " +"方法的參數包含在內。" #: ../../library/dataclasses.rst:261 #, fuzzy @@ -451,8 +451,8 @@ msgid "" "*repr*: If true (the default), this field is included in the string returned " "by the generated :meth:`~object.__repr__` method." msgstr "" -"``repr``:如果為真(預設值),則此欄位包含在生成的 :meth:`~object.__repr__` " -"方法回傳的字串中。" +"*repr*:如果為真(預設值),則此欄位包含在生成的 :meth:`~object.__repr__` 方" +"法回傳的字串中。" #: ../../library/dataclasses.rst:264 #, fuzzy @@ -463,7 +463,7 @@ msgid "" "field should be considered in the hash if it's used for comparisons. " "Setting this value to anything other than ``None`` is discouraged." msgstr "" -"``hash``:這可以是 bool 或 ``None``。如果為真,則此欄位包含在生成的 :meth:" +"*hash*:這可以是 bool 或 ``None``。如果為真,則此欄位包含在生成的 :meth:" "`__hash__` 方法中。如果“無”(預設值),則使用“比較”的值:這通常是預期的行為。" "如果一個欄位用於比較,則應在雜湊中考慮該欄位。不鼓勵將此值設定為“無”以外的任" "何值。" @@ -488,8 +488,8 @@ msgid "" "equality and comparison methods (:meth:`~object.__eq__`, :meth:`~object." "__gt__`, et al.)." msgstr "" -"``compare``:如果為真(預設值),則此欄位包含在生成的相等和比較方法中(:meth:" -"`__eq__`、:meth:`__gt__` 等)。" +"*compare*:如果為真(預設值),則此欄位包含在生成的相等和比較方法中(:meth:" +"`~object.__eq__`、:meth:`~object.__gt__` 等)。" #: ../../library/dataclasses.rst:281 #, fuzzy @@ -501,7 +501,7 @@ msgid "" "mechanism. Multiple third-parties can each have their own key, to use as a " "namespace in the metadata." msgstr "" -"``元資料``:這可以是映射或無。 None 被視為空字典。此值包含在 :func:`~types." +"*metadata*:這可以是映射或無。 None 被視為空字典。此值包含在 :func:`~types." "MappingProxyType` 中以使其成為只讀的,並暴露在 :class:`Field` 對像上。它根本" "不被資料類別使用,而是作為第三方擴充機制提供的。多個第三方可以各自擁有自己的" "密鑰,用作元資料中的命名空間。" @@ -512,8 +512,8 @@ msgid "" "*kw_only*: If true, this field will be marked as keyword-only. This is used " "when the generated :meth:`~object.__init__` method's parameters are computed." msgstr "" -"``kw_only``:如果為真,該欄位將被標記為僅限關鍵字。這在計算生成的 :meth:" -"`__init__` 方法的參數時使用。" +"*kw_only*:如果為真,該欄位將被標記為僅限關鍵字。這在計算生成的 :meth:" +"`~object.__init__` 方法的參數時使用。" #: ../../library/dataclasses.rst:295 #, fuzzy @@ -526,10 +526,10 @@ msgid "" "default values for the fields, just as if the default value itself were " "specified. For example, after::" msgstr "" -"如果欄位的預設值是通過呼叫 :func:`field()` 指定的,那麼該欄位的類別屬性將被指" -"定的*default* 值替換。如果沒有提供 *default*,那麼類別屬性將被刪除。目的是" -"在 :func:`dataclass` 裝飾器運行後,類別屬性將全部包含欄位的預設值,就像預設值" -"本身已指定一樣。例如,在::" +"如果欄位的預設值是通過呼叫 :func:`!field` 指定的,那麼該欄位的類別屬性將被指" +"定的 *default* 值替換。如果沒有提供 *default*,那麼類別屬性將被刪除。目的是" +"在 :func:`@dataclass ` 裝飾器運行後,類別屬性將全部包含欄位的預設" +"值,就像預設值本身已指定一樣。例如,在: ::" #: ../../library/dataclasses.rst:311 #, fuzzy @@ -611,7 +611,7 @@ msgstr "在嵌套資料類別上使用 :func:`!asdict` 的範例: ::" #: ../../library/dataclasses.rst:363 ../../library/dataclasses.rst:383 #, fuzzy msgid "To create a shallow copy, the following workaround may be used::" -msgstr "要建立淺拷貝,可以使用以下解決方法:" +msgstr "要建立淺複製,可以使用以下解決方法:" #: ../../library/dataclasses.rst:367 #, fuzzy @@ -779,8 +779,8 @@ msgid "" msgstr "" "用作型別註釋的標記值。型別為 :const:`!KW_ONLY` 的偽欄位之後的任何欄位都被標記" "為僅關鍵字欄位。請注意,:const:`!KW_ONLY` 型別的偽欄位將被完全忽略。這包括此" -"類欄位的名稱。按照慣例,名稱 _ 用於 :const:`!KW_ONLY` 欄位。僅關鍵字欄位表" -"示 :meth:`~object.__init__` 參數,在實例化類時必須將其指定為關鍵字。" +"類欄位的名稱。按照慣例,名稱 ``_`` 用於 :const:`!KW_ONLY` 欄位。僅關鍵字欄位" +"表示 :meth:`~object.__init__` 參數,在實例化類時必須將其指定為關鍵字。" #: ../../library/dataclasses.rst:484 #, fuzzy @@ -844,7 +844,7 @@ msgid "" msgstr "" ":func:`@dataclass ` 生成的 :meth:`~object.__init__` 方法不呼叫基底" "類別 :meth:`!__init__` 方法。如果基底類別有一個必須呼叫的 :meth:`!__init__` " -"方法,通常在 :meth:`__post_init__` 方法中呼叫此方法::" +"方法,通常在 :meth:`__post_init__` 方法中呼叫此方法: ::" #: ../../library/dataclasses.rst:549 #, fuzzy @@ -954,7 +954,7 @@ msgid "" "must use :meth:`!object.__setattr__`." msgstr "" "使用 ``frozen=True`` 時有一個微小的性能損失::meth:`~object.__init__` 不能使" -"用簡單賦值來初始化欄位,必須使用 :meth:`!__setattr__`。" +"用簡單賦值來初始化欄位,必須使用 :meth:`!object.__setattr__`。" #: ../../library/dataclasses.rst:623 msgid "Inheritance" @@ -993,12 +993,12 @@ msgstr "" msgid "" "The generated :meth:`~object.__init__` method for :class:`!C` will look " "like::" -msgstr "為 ``C`` 生成的 :meth:`~object.__init__` 方法將如下所示:" +msgstr "為 :class:`!C` 生成的 :meth:`~object.__init__` 方法將如下所示: ::" #: ../../library/dataclasses.rst:653 #, fuzzy msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" -msgstr ":meth:`__init__` 中僅關鍵字參數的重新排序" +msgstr ":meth:`!__init__` 中僅關鍵字參數的重新排序" #: ../../library/dataclasses.rst:655 #, fuzzy @@ -1025,7 +1025,7 @@ msgstr "" #: ../../library/dataclasses.rst:676 #, fuzzy msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" -msgstr "為 :class:`!D` 生成的 :meth:`!__init__` 方法將如下所示:" +msgstr "為 :class:`!D` 生成的 :meth:`!__init__` 方法將如下所示: ::" #: ../../library/dataclasses.rst:680 #, fuzzy @@ -1056,7 +1056,7 @@ msgid "" "create a new instance of a list, use::" msgstr "" "如果 :func:`field` 指定了 *default_factory*,當需要該欄位的預設值時,它會以零" -"參數呼叫。例如,要建立列表的新實例,請使用:" +"引數呼叫。例如,要建立列表的新實例,請使用: ::" #: ../../library/dataclasses.rst:697 #, fuzzy @@ -1081,7 +1081,7 @@ msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" msgstr "" -"Python 將預設成員變數值存儲在類別屬性中。考慮這個例子,不使用資料類別::" +"Python 將預設成員變數值存儲在類別屬性中。考慮這個例子,不使用資料類別: ::" #: ../../library/dataclasses.rst:721 #, fuzzy @@ -1126,7 +1126,7 @@ msgstr "" msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" -msgstr "使用預設工廠函式是一種建立可變型別的新實例作為欄位預設值的方法:" +msgstr "使用預設工廠函式是一種建立可變型別的新實例作為欄位預設值的方法: ::" #: ../../library/dataclasses.rst:763 #, fuzzy diff --git a/library/functions.po b/library/functions.po index 21c99071a79..d6f5ca498ee 100644 --- a/library/functions.po +++ b/library/functions.po @@ -1252,8 +1252,7 @@ msgstr "" "*globals* 引數,就必須是 dictionary 型別,而且會被用作全域性和本地變數。如果" "同時提供了 *globals* 和 *locals* 引數,它們分別被用作全域性和本地變數。如果提" "供了 *locals* 引數,則它可以是任何映射物件。請記住在 module 層級中全域性和本" -"地變數是相同的 dictionary。如果 exec 有兩個不同的 *globals* 和 *locals* 物" -"件,程式碼就像嵌入在 class 定義中一樣執行。" +"地變數是相同的 dictionary。" #: ../../library/functions.rst:611 msgid "" @@ -1261,6 +1260,8 @@ msgid "" "gets two separate objects as *globals* and *locals*, the code will be " "executed as if it were embedded in a class definition." msgstr "" +"大部分使用者只需要傳入 *globals* 引數,而不用傳遞 *locals*。如果 exec 有兩個" +"不同的 *globals* 和 *locals* 物件,程式碼就像嵌入在 class 定義中一樣執行。" #: ../../library/functions.rst:615 msgid "" diff --git a/library/marshal.po b/library/marshal.po index a0ea145ae95..c8ef5840754 100644 --- a/library/marshal.po +++ b/library/marshal.po @@ -27,7 +27,6 @@ msgid ":mod:`!marshal` --- Internal Python object serialization" msgstr ":mod:`!marshal` --- 内部 Python 物件序列化" #: ../../library/marshal.rst:10 -#, fuzzy msgid "" "This module contains functions that can read and write Python values in a " "binary format. The format is specific to Python, but independent of machine " @@ -38,7 +37,7 @@ msgid "" msgstr "" "此 module(模組)包含一個能以二進位制格式來讀寫 Python 值的函式。這種格式是 " "Python 專屬但獨立於機器架構的(例如,你可以在一臺 PC 上寫入某個 Python 值,再" -"將檔案傳到一臺 Sun 上並在那裡讀取它)。這種格式的細節是有意地不在文件上說明" +"將檔案傳到一臺 Mac 上並在那裡讀取它)。這種格式的細節是有意地不在文件上說明" "的;它可能在不同 Python 版本中被改變(雖然這種情況極少發生)。\\ [#]_" #: ../../library/marshal.rst:21 diff --git a/library/secrets.po b/library/secrets.po index 5a8b774015e..53c2a2d6591 100644 --- a/library/secrets.po +++ b/library/secrets.po @@ -75,9 +75,8 @@ msgid "Return a randomly chosen element from a non-empty sequence." msgstr "從一非空序列中,回傳一個隨機選取的元素。" #: ../../library/secrets.rst:51 -#, fuzzy msgid "Return a random int in the range [0, *exclusive_upper_bound*)." -msgstr "回傳一個 [0, *n*) 範圍之內的隨機整數。" +msgstr "回傳一個 [0, *exclusive_upper_bound*) 範圍之內的隨機整數。" #: ../../library/secrets.rst:55 msgid "Return an int with *k* random bits." diff --git a/library/shutil.po b/library/shutil.po index fa6da4fbdb7..9e1c72edf1f 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -442,9 +442,8 @@ msgid "" msgstr "" #: ../../library/shutil.rst:340 -#, fuzzy msgid "Added the *dir_fd* parameter." -msgstr "*dir_fd* 參數。" +msgstr "新增 *dir_fd* 參數。" #: ../../library/shutil.rst:343 msgid "Added the *onexc* parameter, deprecated *onerror*." diff --git a/library/unittest.mock.po b/library/unittest.mock.po index cf39b04d3bd..5a1d96efcdf 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -459,7 +459,6 @@ msgid "Added two keyword-only arguments to the reset_mock function." msgstr "reset_mock 函式新增了兩個僅限關鍵字引數 (keyword-only arguments)。" #: ../../library/unittest.mock.rst:411 -#, fuzzy msgid "" "This can be useful where you want to make a series of assertions that reuse " "the same object. Note that :meth:`reset_mock` *doesn't* clear the :attr:" @@ -470,14 +469,14 @@ msgid "" "well." msgstr "" "這在你想要進行一系列重複使用同一物件的斷言時非常有用。請注意,預設情況下,:" -"meth:`reset_mock` *不會*\\ 清除回傳值、:attr:`side_effect` 或使用普通賦值設定" -"的任何子屬性。如果你想要重置 *return_value* 或 :attr:`side_effect`,則將相應" -"的參數設置為 ``True``。Child mock 和回傳值 mock(如果有的話)也會被重置。" +"meth:`reset_mock` *不會*\\ 清除 :attr:`return_value`、:attr:`side_effect` 或" +"使用普通賦值設定的任何子屬性。如果你想要重置 :attr:`return_value` 或 :attr:" +"`side_effect`,則將相應的參數設置為 ``True``。Child mock 和回傳值 mock(如果" +"有的話)也會被重置。" #: ../../library/unittest.mock.rst:419 -#, fuzzy msgid "*return_value*, and *side_effect* are keyword-only arguments." -msgstr "*return_value* 和 :attr:`side_effect` 是僅限關鍵字引數。" +msgstr "*return_value* 和 *side_effect* 是僅限關鍵字引數。" #: ../../library/unittest.mock.rst:425 msgid "" @@ -2740,7 +2739,6 @@ msgid "Before I explain how auto-speccing works, here's why it is needed." msgstr "在解釋自動規格如何運作之前,我們先解釋為什麼需要它。" #: ../../library/unittest.mock.rst:2538 -#, fuzzy msgid "" ":class:`Mock` is a very powerful and flexible object, but it suffers from a " "flaw which is general to mocking. If you refactor some of your code, rename " @@ -2748,9 +2746,10 @@ msgid "" "uses mocks instead of the real objects will still pass. This means your " "tests can all pass even though your code is broken." msgstr "" -"第二個問題對於 mock 來說更為普遍。如果你重構某些程式碼、重新命名成員等等,則" -"對任何仍然使用\\ *舊 api* 但使用 mock 而不是真實物件的程式碼的測試仍然會通" -"過。這意味著即使你的程式碼已經壞了,你的測試也可以全部通過。" +":class:`Mock` 是一個非常強大且靈活的物件,但它有一個常見的 mock 缺陷。如果你" +"重構某些程式碼或重新命名成員等,則任何仍然使用\\ *舊 api* 但使用 mock 而非真" +"實物件的程式碼測試仍然會通過。這意味著即使你的程式碼壞了,但測試仍可以全部通" +"過。" #: ../../library/unittest.mock.rst:2546 msgid "" @@ -2758,6 +2757,8 @@ msgid "" "they should raise an error. You can still achieve this behavior by passing " "``unsafe=True`` to Mock." msgstr "" +"在 3.5 之前,當測試應該引發錯誤時,斷言單字中存在拼字錯誤的測驗會默默地通過。" +"你仍可以透過將 ``unsafe=True`` 傳遞給 Mock 來實作此行為。" #: ../../library/unittest.mock.rst:2549 msgid "" @@ -2980,11 +2981,11 @@ msgstr "" #: ../../library/unittest.mock.rst:2763 msgid "" "Order of precedence of :attr:`side_effect`, :attr:`return_value` and *wraps*" -msgstr "" +msgstr ":attr:`side_effect`、:attr:`return_value` 和 *wraps* 的優先順序" #: ../../library/unittest.mock.rst:2765 msgid "The order of their precedence is:" -msgstr "" +msgstr "它們的優先順序是:" #: ../../library/unittest.mock.rst:2767 msgid ":attr:`~Mock.side_effect`" @@ -2996,7 +2997,7 @@ msgstr ":attr:`~Mock.return_value`" #: ../../library/unittest.mock.rst:2769 msgid "*wraps*" -msgstr "" +msgstr "*wraps*" #: ../../library/unittest.mock.rst:2771 msgid "" @@ -3006,6 +3007,9 @@ msgid "" "return the value. Regardless of the order of which was set first, the order " "of precedence remains unchanged." msgstr "" +"如果這三個都有設定,mock 將會回傳來自 :attr:`~Mock.side_effect` 的值,並忽" +"略 :attr:`~Mock.return_value` 和被包裝物件。如果設定了任兩項,則優先順序較高" +"的一項將回傳該值。無論先設定哪個順序,優先順序都保持不變。" #: ../../library/unittest.mock.rst:2789 msgid "" @@ -3014,6 +3018,9 @@ msgid "" "between :attr:`~Mock.return_value` and the wrapped object, ignoring :attr:" "`~Mock.side_effect`." msgstr "" +"由於 ``None`` 是 :attr:`~Mock.side_effect` 的預設值,如果將其值重新賦值回為 " +"``None``,則會檢查 :attr:`~Mock.return_value` 和被包裝物件之間的優先順序,忽" +"略 :attr:`~Mock.side_effect`。" #: ../../library/unittest.mock.rst:2798 msgid "" @@ -3021,18 +3028,22 @@ msgid "" "it is ignored and the order of precedence moves to the successor to obtain " "the value to return." msgstr "" +"如果 :attr:`~Mock.side_effect` 回傳的值是 :data:`DEFAULT`,它將被忽略,並且優" +"先順序被移動到後面一個以獲得要回傳的值。" #: ../../library/unittest.mock.rst:2807 msgid "" "When :class:`Mock` wraps an object, the default value of :attr:`~Mock." "return_value` will be :data:`DEFAULT`." msgstr "" +"當 :class:`Mock` 包裝一個物件時,:attr:`~Mock.return_value` 的預設值將為 :" +"data:`DEFAULT`。" #: ../../library/unittest.mock.rst:2816 msgid "" "The order of precedence will ignore this value and it will move to the last " "successor which is the wrapped object." -msgstr "" +msgstr "優先順序將忽略該值,並將移動到最後一個,即被包裝物件。" #: ../../library/unittest.mock.rst:2819 msgid "" @@ -3040,6 +3051,8 @@ msgid "" "of this mock will return the real instance of the class. The positional " "arguments, if any, required by the wrapped object must be passed." msgstr "" +"當對被包裝物件進行真正的呼叫時,建立此 mock 的實例將回傳該類別的真實實例。必" +"須傳遞被包裝物件所需的位置引數(如果存在)。" #: ../../library/unittest.mock.rst:2837 msgid "" @@ -3047,12 +3060,14 @@ msgid "" "explicit assignment. So, the order of precedence will not move to the " "wrapped object." msgstr "" +"但如果你為其賦予 ``None`` 則不會被忽略,因為它是明確賦值。因此,優先順序不會" +"移至被包裝物件。" #: ../../library/unittest.mock.rst:2845 msgid "" "Even if you set all three at once when initializing the mock, the order of " "precedence remains the same:" -msgstr "" +msgstr "即使你在初始化 mock 時同時設定所有三個,優先順序也保持不變:" #: ../../library/unittest.mock.rst:2862 msgid "" @@ -3060,32 +3075,5 @@ msgid "" "cause a value to be obtained from the successors. Instead, ``StopIteration`` " "exception is raised." msgstr "" - -#~ msgid "" -#~ ":class:`Mock` is a very powerful and flexible object, but it suffers from " -#~ "two flaws when used to mock out objects from a system under test. One of " -#~ "these flaws is specific to the :class:`Mock` api and the other is a more " -#~ "general problem with using mock objects." -#~ msgstr "" -#~ ":class:`Mock` 是一個非常強大且靈活的物件,但是當用於從被測試的系統中 mock " -#~ "out 物件時,它有兩個缺陷。其中一個缺陷是 :class:`Mock` api 特有的,另一個" -#~ "缺陷是使用 mock 物件時出現的更普遍的問題。" - -#~ msgid "" -#~ "First the problem specific to :class:`Mock`. :class:`Mock` has two assert " -#~ "methods that are extremely handy: :meth:`~Mock.assert_called_with` and :" -#~ "meth:`~Mock.assert_called_once_with`." -#~ msgstr "" -#~ "首先是 :class:`Mock` 特有的問題。:class:`Mock` 有兩個非常方便的斷言方法::" -#~ "meth:`~Mock.assert_used_with` 和 :meth:`~Mock.assert_used_once_with`。" - -#~ msgid "" -#~ "Because mocks auto-create attributes on demand, and allow you to call " -#~ "them with arbitrary arguments, if you misspell one of these assert " -#~ "methods then your assertion is gone:" -#~ msgstr "" -#~ "因為 mock 會根據需要自動建立屬性,並允許你使用任意引數呼叫它們,所以如果你" -#~ "拼錯了其中一個斷言方法,那麼你的斷言就不見了:" - -#~ msgid "Your tests can pass silently and incorrectly because of the typo." -#~ msgstr "由於拼字錯誤,你的測試可能會安靜且錯誤地通過。" +"如果 :attr:`~Mock.side_effect` 已耗盡,則優先順序將不會使值由後面取得。相反地" +"這會引發 ``StopIteration`` 例外。" diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index a1a1e2eab4d..d93bb6e41b0 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -46,10 +46,10 @@ msgid "" "referenced as ``sys.stdout``. See the Library Reference for more information " "on this.)" msgstr "" -"目前為止我們已經學過兩種寫值的方式:\\ *運算式陳述 (expression statements)* " -"與 :func:`print` 函式。(第三種方法是使用檔案物件的 :meth:`~io.TextIOBase." -"write` 方法;標準輸出的檔案是使用 ``sys.stdout`` 來達成的。詳細的資訊請參考對" -"應的函式庫說明。)" +"目前為止我們已經學過兩種寫值的方式:*運算式陳述 (expression statements)* 與 :" +"func:`print` 函式。(第三種方法是使用檔案物件的 :meth:`~io.TextIOBase.write` " +"方法;標準輸出的檔案是使用 ``sys.stdout`` 來達成的。詳細的資訊請參考對應的函" +"式庫說明。)" #: ../../tutorial/inputoutput.rst:22 msgid "" @@ -67,13 +67,12 @@ msgid "" "Inside this string, you can write a Python expression between ``{`` and ``}" "`` characters that can refer to variables or literal values." msgstr "" -"要使用\\ :ref:`格式化字串文本 (formatted string literals) `\\ ,需在字串開始前的引號或連續三個引號前加上 ``f`` 或 ``F``。你可以" -"在這個字串中使用 ``{`` 與 ``}`` 包夾 Python 的運算式,引用變數或其他字面值 " -"(literal values)。" +"要使用\\ :ref:`格式化字串文本 (formatted string literals) `," +"需在字串開始前的引號或連續三個引號前加上 ``f`` 或 ``F``。你可以在這個字串中使" +"用 ``{`` 與 ``}`` 包夾 Python 的運算式,引用變數或其他字面值 (literal " +"values)。" #: ../../tutorial/inputoutput.rst:37 -#, fuzzy msgid "" "The :meth:`str.format` method of strings requires more manual effort. " "You'll still use ``{`` and ``}`` to mark where a variable will be " @@ -83,7 +82,7 @@ msgid "" msgstr "" "字串的 :meth:`str.format` method 需要更多手動操作。你還是可以用 ``{`` 和 ``}" "`` 標示欲替代變數的位置,且可給予詳細的格式指令,但你也需提供要被格式化的資" -"訊。" +"訊。在以下程式碼區塊中,有兩個如何格式化變數的範例:" #: ../../tutorial/inputoutput.rst:52 msgid "" @@ -92,6 +91,9 @@ msgid "" "100, with 2 decimal places and followed by a percent sign (see :ref:" "`formatspec` for details)." msgstr "" +"請注意 ``yes_votes`` 如何對於負數用空格和負號填補。該範例還會列出 " +"``percentage`` 乘以 100,並保留 2 位小數且後面跟著一個百分號(有關詳細資訊," +"請參閱 :ref:`formatspec`)。" #: ../../tutorial/inputoutput.rst:57 msgid "" @@ -125,17 +127,14 @@ msgid "" "either function. Strings, in particular, have two distinct representations." msgstr "" ":func:`str` 函式的用意是回傳一個人類易讀的表示法,而 :func:`repr` 的用意是產" -"生直譯器可讀取的表示法(如果沒有等效的語法,則造成 :exc:`SyntaxError`\\ )。" -"如果物件沒有人類易讀的特定表示法,\\ :func:`str` 會回傳與 :func:`repr` 相同的" -"值。有許多的值,像是數字,或 list 及 dictionary 等結構,使用這兩個函式會有相" -"同的表示法。而字串,則較為特別,有兩種不同的表示法。" +"生直譯器可讀取的表示法(如果沒有等效的語法,則造成 :exc:`SyntaxError`)。如果" +"物件沒有人類易讀的特定表示法,:func:`str` 會回傳與 :func:`repr` 相同的值。有" +"許多的值,像是數字,或 list 及 dictionary 等結構,使用這兩個函式會有相同的表" +"示法。而字串,則較為特別,有兩種不同的表示法。" #: ../../tutorial/inputoutput.rst:75 msgid "Some examples::" -msgstr "" -"一些範例:\n" -"\n" -"::" +msgstr "一些範例: ::" #: ../../tutorial/inputoutput.rst:98 msgid "" @@ -160,7 +159,7 @@ msgid "" "``{expression}``." msgstr "" ":ref:`格式化的字串文本 `\\ (簡稱為 f-字串),透過在字串加入前綴 " -"``f`` 或 ``F``,並將運算式編寫為 ``{expression}``\\ ,讓你可以在字串內加入 " +"``f`` 或 ``F``,並將運算式編寫為 ``{expression}``,讓你可以在字串內加入 " "Python 運算式的值。" #: ../../tutorial/inputoutput.rst:114 @@ -170,9 +169,7 @@ msgid "" "three places after the decimal::" msgstr "" "格式說明符 (format specifier) 是選擇性的,寫在運算式後面,可以更好地控制值的" -"格式化方式。以下範例將 pi 捨入到小數點後三位:\n" -"\n" -"::" +"格式化方式。以下範例將 pi 捨入到小數點後三位: ::" #: ../../tutorial/inputoutput.rst:122 msgid "" @@ -180,9 +177,7 @@ msgid "" "number of characters wide. This is useful for making columns line up. ::" msgstr "" "在 ``':'`` 後傳遞一個整數,可以設定該欄位至少為幾個字元寬,常用於將每一欄對" -"齊。\n" -"\n" -"::" +"齊。 ::" #: ../../tutorial/inputoutput.rst:133 msgid "" @@ -190,11 +185,8 @@ msgid "" "a'`` applies :func:`ascii`, ``'!s'`` applies :func:`str`, and ``'!r'`` " "applies :func:`repr`::" msgstr "" -"還有一些修飾符號可以在格式化前先將值轉換過。\\ ``'!a'`` 會套用 :func:" -"`ascii`\\ ,\\ ``'!s'`` 會套用 :func:`str`\\ ,\\ ``'!r'`` 會套用 :func:" -"`repr`\\ :\n" -"\n" -"::" +"還有一些修飾符號可以在格式化前先將值轉換過。``'!a'`` 會套用 :func:`ascii`," +"``'!s'`` 會套用 :func:`str`,``'!r'`` 會套用 :func:`repr`: ::" #: ../../tutorial/inputoutput.rst:143 msgid "" @@ -221,10 +213,7 @@ msgstr "字串的 format() method" #: ../../tutorial/inputoutput.rst:161 msgid "Basic usage of the :meth:`str.format` method looks like this::" -msgstr "" -":meth:`str.format` method 的基本用法如下:\n" -"\n" -"::" +msgstr ":meth:`str.format` method 的基本用法如下: ::" #: ../../tutorial/inputoutput.rst:166 msgid "" @@ -235,9 +224,7 @@ msgid "" msgstr "" "大括號及其內的字元(稱為格式欄位)會被取代為傳遞給 :meth:`str.format` method " "的物件。大括號中的數字表示該物件在傳遞給 :meth:`str.format` method 時所在的位" -"置。\n" -"\n" -"::" +"置。 ::" #: ../../tutorial/inputoutput.rst:176 msgid "" @@ -245,16 +232,11 @@ msgid "" "are referred to by using the name of the argument. ::" msgstr "" "如果在 :meth:`str.format` method 中使用關鍵字引數,可以使用引數名稱去引用它們" -"的值。\n" -"\n" -"::" +"的值。 ::" #: ../../tutorial/inputoutput.rst:183 msgid "Positional and keyword arguments can be arbitrarily combined::" -msgstr "" -"位置引數和關鍵字引數可以任意組合:\n" -"\n" -"::" +msgstr "位置引數和關鍵字引數可以任意組合: ::" #: ../../tutorial/inputoutput.rst:189 msgid "" @@ -265,18 +247,14 @@ msgid "" msgstr "" "如果你有一個不想分割的長格式化字串,比較好的方式是按名稱而不是按位置來引用變" "數。這項操作可以透過傳遞字典 (dict),並用方括號 ``'[]'`` 使用鍵 (key) 來輕鬆" -"完成。\n" -"\n" -"::" +"完成。 ::" #: ../../tutorial/inputoutput.rst:199 msgid "" "This could also be done by passing the ``table`` dictionary as keyword " "arguments with the ``**`` notation. ::" msgstr "" -"用 '**' 符號,把 ``table`` 字典當作關鍵字引數來傳遞,也有一樣的結果。\n" -"\n" -"::" +"用 '**' 符號,把 ``table`` 字典當作關鍵字引數來傳遞,也有一樣的結果。 ::" #: ../../tutorial/inputoutput.rst:206 #, fuzzy @@ -291,10 +269,7 @@ msgstr "" msgid "" "As an example, the following lines produce a tidily aligned set of columns " "giving integers and their squares and cubes::" -msgstr "" -"例如,下面的程式碼產生一組排列整齊的欄,列出整數及其平方與立方:\n" -"\n" -"::" +msgstr "例如,下面的程式碼產生一組排列整齊的欄,列出整數及其平方與立方: ::" #: ../../tutorial/inputoutput.rst:231 msgid "" @@ -302,7 +277,7 @@ msgid "" "ref:`formatstrings`." msgstr "" "關於使用 :meth:`str.format` 進行字串格式化的完整概述,請見\\ :ref:" -"`formatstrings`\\ 。" +"`formatstrings`。" #: ../../tutorial/inputoutput.rst:236 msgid "Manual String Formatting" @@ -310,10 +285,7 @@ msgstr "手動格式化字串" #: ../../tutorial/inputoutput.rst:238 msgid "Here's the same table of squares and cubes, formatted manually::" -msgstr "" -"下面是以手動格式化完成的同一個平方及立方的表:\n" -"\n" -"::" +msgstr "下面是以手動格式化完成的同一個平方及立方的表: ::" #: ../../tutorial/inputoutput.rst:256 msgid "" @@ -335,21 +307,19 @@ msgid "" "add a slice operation, as in ``x.ljust(n)[:n]``.)" msgstr "" "字串物件的 :meth:`str.rjust` method 透過在左側填補空格,使字串以給定的欄寬進" -"行靠右對齊。類似的 method 還有 :meth:`str.ljust` 和 :meth:`str.center`\\ 。這" -"些 method 不寫入任何內容,只回傳一個新字串,如果輸入的字串太長,它們不會截斷" -"字串,而是不做任何改變地回傳;雖然這樣會弄亂欄的編排,但這通常還是比另一種情" -"況好,那種情況會讓值變得不正確。(如果你真的想截斷字串,可以加入像 ``x." -"ljust(n)[:n]`` 這樣的切片運算。)" +"行靠右對齊。類似的 method 還有 :meth:`str.ljust` 和 :meth:`str.center`。這些 " +"method 不寫入任何內容,只回傳一個新字串,如果輸入的字串太長,它們不會截斷字" +"串,而是不做任何改變地回傳;雖然這樣會弄亂欄的編排,但這通常還是比另一種情況" +"好,那種情況會讓值變得不正確。(如果你真的想截斷字串,可以加入像 ``x.ljust(n)" +"[:n]`` 這樣的切片運算。)" #: ../../tutorial/inputoutput.rst:268 msgid "" "There is another method, :meth:`str.zfill`, which pads a numeric string on " "the left with zeros. It understands about plus and minus signs::" msgstr "" -"另一種 method 是 :meth:`str.zfill`\\ ,可在數值字串的左邊填補零,且能識別正負" -"號:\n" -"\n" -"::" +"另一種 method 是 :meth:`str.zfill`,可在數值字串的左邊填補零,且能識別正負" +"號: ::" #: ../../tutorial/inputoutput.rst:280 msgid "Old string formatting" @@ -362,11 +332,9 @@ msgid "" "zero or more elements of ``values``. This operation is commonly known as " "string interpolation. For example::" msgstr "" -"% 運算子(modulo,模數)也可用於字串格式化。在 ``'string' % values`` 中,\\ " +"% 運算子(modulo,模數)也可用於字串格式化。在 ``'string' % values`` 中," "``string`` 中所有的 ``%`` 會被 ``values`` 的零個或多個元素所取代。此運算常被" -"稱為字串插值 (string interpolation)。例如:\n" -"\n" -"::" +"稱為字串插值 (string interpolation)。例如: ::" #: ../../tutorial/inputoutput.rst:291 msgid "" @@ -383,8 +351,8 @@ msgid "" "two positional arguments and one keyword argument: ``open(filename, mode, " "encoding=None)``" msgstr "" -":func:`open` 回傳一個 :term:`file object`\\ ,而它最常使用的兩個位置引數和一" -"個關鍵字引數是:\\ ``open(filename, mode, encoding=None)``" +":func:`open` 回傳一個 :term:`file object`,而它最常使用的兩個位置引數和一個關" +"鍵字引數是:``open(filename, mode, encoding=None)``" #: ../../tutorial/inputoutput.rst:316 msgid "" @@ -398,11 +366,10 @@ msgid "" "assumed if it's omitted." msgstr "" "第一個引數是一個包含檔案名稱的字串。第二個引數是另一個字串,包含了描述檔案使" -"用方式的幾個字元。\\ *mode* 為 ``'r'`` 時,表示以唯讀模式開啟檔案;為 " -"``'w'`` 時,表示以唯寫模式開啟檔案(已存在的同名檔案會被抹除);為 ``'a'`` " -"時,以附加內容為目的開啟檔案,任何寫入檔案的資料會自動被加入到檔案的結尾。\\ " -"``'r+'`` 可以開啟檔案並進行讀取和寫入。\\ *mode* 引數是選擇性的,若省略時會預" -"設為 ``'r'``。" +"用方式的幾個字元。*mode* 為 ``'r'`` 時,表示以唯讀模式開啟檔案;為 ``'w'`` " +"時,表示以唯寫模式開啟檔案(已存在的同名檔案會被抹除);為 ``'a'`` 時,以附加" +"內容為目的開啟檔案,任何寫入檔案的資料會自動被加入到檔案的結尾。``'r+'`` 可以" +"開啟檔案並進行讀取和寫入。*mode* 引數是選擇性的,若省略時會預設為 ``'r'``。" #: ../../tutorial/inputoutput.rst:325 msgid "" @@ -416,11 +383,11 @@ msgid "" "objects. You can not specify *encoding* when opening file in binary mode." msgstr "" "通常,檔案以 :dfn:`text mode` 開啟,意即,從檔案中讀取或寫入字串時,都以特定" -"編碼方式 *encoding* 進行編碼。如未指定 *encoding*\\ ,則預設值會取決於系統平" -"台(見 :func:`open`\\ )。因為 UTF-8 是現時的標準,除非你很清楚該用什麼編碼," -"否則推薦使用 ``encoding=\"utf-8\"``\\ 。在 mode 後面加上 ``'b'`` 會以 :dfn:" -"`binary mode`\\ (二進制模式)開啟檔案,二進制模式資料以 :class:`bytes` 物件" -"的形式被讀寫。以二進制模式開啟檔案時不可以指定 *encoding*\\ 。" +"編碼方式 *encoding* 進行編碼。如未指定 *encoding*,則預設值會取決於系統平台" +"(見 :func:`open`)。因為 UTF-8 是現時的標準,除非你很清楚該用什麼編碼,否則" +"推薦使用 ``encoding=\"utf-8\"``。在 mode 後面加上 ``'b'`` 會以 :dfn:`binary " +"mode`\\ (二進制模式)開啟檔案,二進制模式資料以 :class:`bytes` 物件的形式被" +"讀寫。以二進制模式開啟檔案時不可以指定 *encoding*。" #: ../../tutorial/inputoutput.rst:335 msgid "" @@ -448,9 +415,7 @@ msgid "" msgstr "" "在處理檔案物件時,使用 :keyword:`with` 關鍵字是個好習慣。優點是,當它的套件結" "束後,即使在某個時刻引發了例外,檔案仍會正確地被關閉。使用 :keyword:`!with` " -"也比寫等效的 :keyword:`try`\\ -\\ :keyword:`finally` 區塊,來得簡短許多:\n" -"\n" -"::" +"也比寫等效的 :keyword:`try`\\ -\\ :keyword:`finally` 區塊,來得簡短許多: ::" #: ../../tutorial/inputoutput.rst:356 msgid "" @@ -478,9 +443,7 @@ msgid "" "fail. ::" msgstr "" "不論是透過 :keyword:`with` 陳述式,或呼叫 ``f.close()`` 關閉一個檔案物件之" -"後,嘗試使用該檔案物件將會自動失效。\n" -"\n" -"::" +"後,嘗試使用該檔案物件將會自動失效。 ::" #: ../../tutorial/inputoutput.rst:383 msgid "Methods of File Objects" @@ -504,13 +467,11 @@ msgid "" "``f.read()`` will return an empty string (``''``). ::" msgstr "" "要讀取檔案的內容,可呼叫 ``f.read(size)``,它可讀取一部份的資料,並以字串(文" -"字模式)或位元組串物件(二進制模式)形式回傳。\\ *size* 是個選擇性的數字引" -"數。當 *size* 被省略或為負數時,檔案的全部內容會被讀取並回傳;如果檔案是機器" -"記憶體容量的兩倍大時,這會是你的問題。否則,最多只有等同於 *size* 數量的字元" -"(文字模式)或 *size* 數量的位元組串(二進制模式)會被讀取及回傳。如果之前已" -"經到達檔案的末端,\\ ``f.read()`` 會回傳空字串(``''``)。\n" -"\n" -"::" +"字模式)或位元組串物件(二進制模式)形式回傳。*size* 是個選擇性的數字引數。" +"當 *size* 被省略或為負數時,檔案的全部內容會被讀取並回傳;如果檔案是機器記憶" +"體容量的兩倍大時,這會是你的問題。否則,最多只有等同於 *size* 數量的字元(文" +"字模式)或 *size* 數量的位元組串(二進制模式)會被讀取及回傳。如果之前已經到" +"達檔案的末端,``f.read()`` 會回傳空字串(``''``)。 ::" #: ../../tutorial/inputoutput.rst:402 msgid "" @@ -524,9 +485,7 @@ msgstr "" "``f.readline()`` 從檔案中讀取單獨一行;換行字元(``\\n``)會被留在字串的結" "尾,只有當檔案末端不是換行字元時,它才會在檔案的最後一行被省略。這種方式讓回" "傳值清晰明確;只要 ``f.readline()`` 回傳一個空字串,就表示已經到達了檔案末" -"端,而空白行的表示法是 ``'\\n'``,也就是只含一個換行字元的字串。\n" -"\n" -"::" +"端,而空白行的表示法是 ``'\\n'``,也就是只含一個換行字元的字串。 ::" #: ../../tutorial/inputoutput.rst:416 msgid "" @@ -534,9 +493,7 @@ msgid "" "memory efficient, fast, and leads to simple code::" msgstr "" "想從檔案中讀取多行時,可以對檔案物件進行迴圈。這種方法能有效地使用記憶體、快" -"速,且程式碼簡潔:\n" -"\n" -"::" +"速,且程式碼簡潔: ::" #: ../../tutorial/inputoutput.rst:425 msgid "" @@ -551,9 +508,7 @@ msgid "" "``f.write(string)`` writes the contents of *string* to the file, returning " "the number of characters written. ::" msgstr "" -"``f.write(string)`` 把 *string* 的內容寫入檔案,並回傳寫入的字元數。\n" -"\n" -"::" +"``f.write(string)`` 把 *string* 的內容寫入檔案,並回傳寫入的字元數。 ::" #: ../../tutorial/inputoutput.rst:434 msgid "" @@ -561,9 +516,7 @@ msgid "" "mode) or a bytes object (in binary mode) -- before writing them::" msgstr "" "寫入其他類型的物件之前,要先把它們轉換為字串(文字模式)或位元組串物件(二進" -"制模式):\n" -"\n" -"::" +"制模式): ::" #: ../../tutorial/inputoutput.rst:442 msgid "" @@ -587,9 +540,7 @@ msgstr "" "使用 ``f.seek(offset, whence)`` 可以改變檔案物件的位置。位置計算方法是從一個" "參考點增加 *offset* 的偏移量;參考點則由引數 *whence* 來選擇。當 *whence* 值" "為 0 時,表示使用檔案開頭,1 表示使用當前的檔案位置,2 表示使用檔案末端作為參" -"考點。\\ *whence* 可省略,其預設值為 0,即以檔案開頭作為參考點。\n" -"\n" -"::" +"考點。*whence* 可省略,其預設值為 0,即以檔案開頭作為參考點。 ::" #: ../../tutorial/inputoutput.rst:465 msgid "" @@ -611,7 +562,7 @@ msgid "" "Library Reference for a complete guide to file objects." msgstr "" "檔案物件還有一些附加的 method,像是較不常使用的 :meth:`~io.IOBase.isatty` " -"和 :meth:`~io.IOBase.truncate`\\ ;檔案物件的完整指南詳見程式庫參考手冊。" +"和 :meth:`~io.IOBase.truncate`;檔案物件的完整指南詳見程式庫參考手冊。" #: ../../tutorial/inputoutput.rst:479 msgid "Saving structured data with :mod:`json`" @@ -646,10 +597,10 @@ msgid "" msgstr "" "相較於讓使用者不斷地編寫和除錯程式碼才能把複雜的資料類型儲存到檔案,Python 支" "援一個普及的資料交換格式,稱為 `JSON (JavaScript Object Notation) `_\\ 。標準模組 :mod:`json` 可接收 Python 資料階層,並將它們轉換為字" -"串表示法;這個過程稱為 :dfn:`serializing`\\ (序列化)。從字串表示法中重建資" -"料則稱為 :dfn:`deserializing`\\ (反序列化)。在序列化和反序列化之間,表示物" -"件的字串可以被儲存在檔案或資料中,或通過網路連接發送到遠端的機器。" +"json.org>`_。標準模組 :mod:`json` 可接收 Python 資料階層,並將它們轉換為字串" +"表示法;這個過程稱為 :dfn:`serializing`\\ (序列化)。從字串表示法中重建資料" +"則稱為 :dfn:`deserializing`\\ (反序列化)。在序列化和反序列化之間,表示物件" +"的字串可以被儲存在檔案或資料中,或通過網路連接發送到遠端的機器。" #: ../../tutorial/inputoutput.rst:501 msgid "" @@ -665,9 +616,7 @@ msgid "" "If you have an object ``x``, you can view its JSON string representation " "with a simple line of code::" msgstr "" -"如果你有一個物件 ``x``,只需一行簡單的程式碼即可檢視它的 JSON 字串表示法:\n" -"\n" -"::" +"如果你有一個物件 ``x``,只需一行簡單的程式碼即可檢視它的 JSON 字串表示法: ::" #: ../../tutorial/inputoutput.rst:513 msgid "" @@ -675,11 +624,9 @@ msgid "" "dump`, simply serializes the object to a :term:`text file`. So if ``f`` is " "a :term:`text file` object opened for writing, we can do this::" msgstr "" -":func:`~json.dumps` 函式有一個變體,稱為 :func:`~json.dump`\\ ,它單純地將物" -"件序列化為 :term:`text file`\\ 。因此,如果 ``f`` 是一個為了寫入而開啟的 :" -"term:`text file` 物件,我們可以這樣做:\n" -"\n" -"::" +":func:`~json.dumps` 函式有一個變體,稱為 :func:`~json.dump`,它單純地將物件序" +"列化為 :term:`text file`。因此,如果 ``f`` 是一個為了寫入而開啟的 :term:" +"`text file` 物件,我們可以這樣做: ::" #: ../../tutorial/inputoutput.rst:519 msgid "" @@ -687,9 +634,7 @@ msgid "" "file` object which has been opened for reading::" msgstr "" "若 ``f`` 是一個已開啟、可讀取的 :term:`binary file` 或 :term:`text file` 物" -"件,要再次解碼物件的話:\n" -"\n" -"::" +"件,要再次解碼物件的話: ::" #: ../../tutorial/inputoutput.rst:525 msgid "" @@ -707,8 +652,8 @@ msgid "" "this." msgstr "" "這種簡單的序列化技術可以處理 list 和 dictionary,但要在 JSON 中序列化任意的 " -"class(類別)實例,則需要一些額外的工作。\\ :mod:`json` 模組的參考資料包含對" -"此的說明。" +"class(類別)實例,則需要一些額外的工作。:mod:`json` 模組的參考資料包含對此的" +"說明。" #: ../../tutorial/inputoutput.rst:534 msgid ":mod:`pickle` - the pickle module" @@ -723,10 +668,10 @@ msgid "" "pickle data coming from an untrusted source can execute arbitrary code, if " "the data was crafted by a skilled attacker." msgstr "" -"與 :ref:`JSON ` 不同,\\ *pickle* 是一種允許對任意的複雜 Python 物" -"件進行序列化的協定。因此,它為 Python 所特有,不能用於與其他語言編寫的應用程" -"式溝通。在預設情況,它也是不安全的:如果資料是由手段高明的攻擊者精心設計,將" -"這段來自於不受信任來源的 pickle 資料反序列化,可以執行任意的程式碼。" +"與 :ref:`JSON ` 不同,*pickle* 是一種允許對任意的複雜 Python 物件進" +"行序列化的協定。因此,它為 Python 所特有,不能用於與其他語言編寫的應用程式溝" +"通。在預設情況,它也是不安全的:如果資料是由手段高明的攻擊者精心設計,將這段" +"來自於不受信任來源的 pickle 資料反序列化,可以執行任意的程式碼。" #: ../../tutorial/inputoutput.rst:299 msgid "built-in function" diff --git a/tutorial/venv.po b/tutorial/venv.po index 00a95697ad1..6f0cc2c9ff1 100644 --- a/tutorial/venv.po +++ b/tutorial/venv.po @@ -80,16 +80,15 @@ msgid "Creating Virtual Environments" msgstr "建立虛擬環境" #: ../../tutorial/venv.rst:38 -#, fuzzy msgid "" "The module used to create and manage virtual environments is called :mod:" "`venv`. :mod:`venv` will install the Python version from which the command " "was run (as reported by the :option:`--version` option). For instance, " "excuting the command with ``python3.12`` will install version 3.12." msgstr "" -"用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 通常會安裝你能夠取" -"得的最新版本的 Python。要是你的系統有不同版本的 Python,你可以透過 " -"``python3`` 這個指令選擇特定或是任意版本的 Python。" +"用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 將安裝執行命令的 " +"Python 版本(如 :option:`--version` 選項所報告的)。例如使用 ``python3.12`` " +"執行命令將安裝 3.12 版本。" #: ../../tutorial/venv.rst:44 msgid "" @@ -98,9 +97,7 @@ msgid "" "path::" msgstr "" "在建立虛擬環境的時候,在你決定要放該虛擬環境的資料夾之後,以腳本 (script) 執" -"行 :mod:`venv` 模組並且給定資料夾路徑:\n" -"\n" -"::" +"行 :mod:`venv` 模組並且給定資料夾路徑: ::" #: ../../tutorial/venv.rst:49 msgid "" @@ -129,17 +126,11 @@ msgstr "一旦你建立了一個虛擬環境,你可以啟動它。" #: ../../tutorial/venv.rst:61 msgid "On Windows, run::" -msgstr "" -"在 Windows 系統中,使用:\n" -"\n" -"::" +msgstr "在 Windows 系統中,使用: ::" #: ../../tutorial/venv.rst:65 msgid "On Unix or MacOS, run::" -msgstr "" -"在 Unix 或 MacOS 系統,使用:\n" -"\n" -"::" +msgstr "在 Unix 或 MacOS 系統,使用: ::" #: ../../tutorial/venv.rst:69 msgid "" @@ -162,10 +153,7 @@ msgstr "" #: ../../tutorial/venv.rst:91 msgid "To deactivate a virtual environment, type::" -msgstr "" -"要停用虛擬環境,輸入:\n" -"\n" -"::" +msgstr "要停用虛擬環境,輸入: ::" #: ../../tutorial/venv.rst:95 msgid "into the terminal." @@ -192,7 +180,7 @@ msgid "" "etc. (Consult the :ref:`installing-index` guide for complete documentation " "for ``pip``.)" msgstr "" -"``pip`` 有好幾個子指令:\"install\"、\"uninstall\"、\"freeze\" 等等。(可以參" +"``pip`` 有好幾個子命令:\"install\"、\"uninstall\"、\"freeze\" 等等。(可以參" "考\\ :ref:`installing-index`\\ 指南,來取得 ``pip`` 的完整說明文件。)" #: ../../tutorial/venv.rst:109 @@ -214,7 +202,7 @@ msgid "" "number to get that version, or you can run ``python -m pip install --" "upgrade`` to upgrade the package to the latest version:" msgstr "" -"要是你重新執行此指令,``pip`` 會知道該版本已經安裝過,然後什麼也不做。你可以" +"要是你重新執行此命令,``pip`` 會知道該版本已經安裝過,然後什麼也不做。你可以" "提供不同的版本號碼來取得該版本,或是可以執行 ``python -m pip install --" "upgrade`` 來把套件升級到最新的版本:" From 69322219535c61ff6ea59dd1437bf03be38a8788 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 May 2024 00:04:58 +0000 Subject: [PATCH 13/13] sync with cpython 122dd4f4 --- library/dataclasses.po | 188 +++++++++++++++++++++-------------------- 1 file changed, 96 insertions(+), 92 deletions(-) diff --git a/library/dataclasses.po b/library/dataclasses.po index 2431a39e987..aa98ab8d0be 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-21 00:03+0000\n" +"POT-Creation-Date: 2024-05-24 00:03+0000\n" "PO-Revision-Date: 2023-02-11 15:02+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -324,13 +324,17 @@ msgid "" "*slots*: If true (the default is ``False``), :attr:`~object.__slots__` " "attribute will be generated and new class will be returned instead of the " "original one. If :attr:`!__slots__` is already defined in the class, then :" -"exc:`TypeError` is raised." +"exc:`TypeError` is raised. Calling no-arg :func:`super` in dataclasses using " +"``slots=True`` will result in the following exception being raised: " +"``TypeError: super(type, obj): obj must be an instance or subtype of type``. " +"The two-arg :func:`super` is a valid workaround. See :gh:`90562` for full " +"details." msgstr "" "``slots``:如果為 true(預設為 ``False``),將生成 :attr:`~object.__slots__` " "屬性並回傳新類而不是原始類。如果 :attr:`!__slots__` 已經在類中定義,則 :exc:" "`TypeError` 被引發。" -#: ../../library/dataclasses.rst:192 +#: ../../library/dataclasses.rst:195 #, fuzzy msgid "" "If a field name is already included in the :attr:`!__slots__` of a base " @@ -346,7 +350,7 @@ msgstr "" "夠確定繼承的插槽,基底類別 :attr:`!__slots__` 可以是任何可疊代的,但*不是*疊" "代器。" -#: ../../library/dataclasses.rst:202 +#: ../../library/dataclasses.rst:205 #, fuzzy msgid "" "*weakref_slot*: If true (the default is ``False``), add a slot named " @@ -358,14 +362,14 @@ msgstr "" "插槽,這是使實例可弱引用所必需的。在沒有指定 ``slots=True`` 的情況下指定 " "``weakref_slot=True`` 是錯誤的。" -#: ../../library/dataclasses.rst:209 +#: ../../library/dataclasses.rst:212 #, fuzzy msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" msgstr "``field``\\s 可以選擇指定一個預設值,使用普通的 Python 語法: ::" -#: ../../library/dataclasses.rst:217 +#: ../../library/dataclasses.rst:220 #, fuzzy msgid "" "In this example, both :attr:`!a` and :attr:`!b` will be included in the " @@ -374,7 +378,7 @@ msgstr "" "在此示例中,:attr:`!a` 和 :attr:`!b` 都將包含在新增的 :meth:`~object." "__init__` 方法中,該方法將定義為: ::" -#: ../../library/dataclasses.rst:222 +#: ../../library/dataclasses.rst:225 #, fuzzy msgid "" ":exc:`TypeError` will be raised if a field without a default value follows a " @@ -384,7 +388,7 @@ msgstr "" ":exc:`TypeError` 如果沒有預設值的欄位跟在具有預設值的欄位之後,將引發。無論這" "發生在單個類中還是作為類繼承的結果,都是如此。" -#: ../../library/dataclasses.rst:228 +#: ../../library/dataclasses.rst:231 #, fuzzy msgid "" "For common and simple use cases, no other functionality is required. There " @@ -397,7 +401,7 @@ msgstr "" "位資訊。為了滿足這種對附加資訊的需求,你可以通過呼叫提供的 :func:`!field` 函" "式來替換預設欄位值。例如: ::" -#: ../../library/dataclasses.rst:241 +#: ../../library/dataclasses.rst:244 #, fuzzy msgid "" "As shown above, the :const:`MISSING` value is a sentinel object used to " @@ -409,11 +413,11 @@ msgstr "" "供。使用此標記是因為“None”對於某些具有不同含義的參數是有效值。任何程式碼都不" "應直接使用 :const:`MISSING` 值。" -#: ../../library/dataclasses.rst:246 +#: ../../library/dataclasses.rst:249 msgid "The parameters to :func:`!field` are:" msgstr ":func:`!field` 的參數是:" -#: ../../library/dataclasses.rst:248 +#: ../../library/dataclasses.rst:251 #, fuzzy msgid "" "*default*: If provided, this will be the default value for this field. This " @@ -423,7 +427,7 @@ msgstr "" "*default*:如果提供,這將是該欄位的預設值。這是必需的,因為 :meth:`!field` 呼" "叫本身會替換預設值的正常位置。" -#: ../../library/dataclasses.rst:252 +#: ../../library/dataclasses.rst:255 #, fuzzy msgid "" "*default_factory*: If provided, it must be a zero-argument callable that " @@ -436,7 +440,7 @@ msgstr "" "時將被呼叫。除其他用途外,這可用於指定具有可變預設值的欄位,如下所述。同時指" "定 *default* 和 *default_factory* 是錯誤的。" -#: ../../library/dataclasses.rst:258 +#: ../../library/dataclasses.rst:261 #, fuzzy msgid "" "*init*: If true (the default), this field is included as a parameter to the " @@ -445,7 +449,7 @@ msgstr "" "*init*:如果為 true(預設值),則此欄位將作為生成的 :meth:`~object.__init__` " "方法的參數包含在內。" -#: ../../library/dataclasses.rst:261 +#: ../../library/dataclasses.rst:264 #, fuzzy msgid "" "*repr*: If true (the default), this field is included in the string returned " @@ -454,7 +458,7 @@ msgstr "" "*repr*:如果為真(預設值),則此欄位包含在生成的 :meth:`~object.__repr__` 方" "法回傳的字串中。" -#: ../../library/dataclasses.rst:264 +#: ../../library/dataclasses.rst:267 #, fuzzy msgid "" "*hash*: This can be a bool or ``None``. If true, this field is included in " @@ -468,7 +472,7 @@ msgstr "" "如果一個欄位用於比較,則應在雜湊中考慮該欄位。不鼓勵將此值設定為“無”以外的任" "何值。" -#: ../../library/dataclasses.rst:271 +#: ../../library/dataclasses.rst:274 #, fuzzy msgid "" "One possible reason to set ``hash=False`` but ``compare=True`` would be if a " @@ -481,7 +485,7 @@ msgstr "" "湊值的成本很高,則需要該欄位進行相等性測試,並且還有其他欄位有助於型別的雜湊" "值。即使一個欄位被排除在雜湊之外,它仍然會被用於比較。" -#: ../../library/dataclasses.rst:277 +#: ../../library/dataclasses.rst:280 #, fuzzy msgid "" "*compare*: If true (the default), this field is included in the generated " @@ -491,7 +495,7 @@ msgstr "" "*compare*:如果為真(預設值),則此欄位包含在生成的相等和比較方法中(:meth:" "`~object.__eq__`、:meth:`~object.__gt__` 等)。" -#: ../../library/dataclasses.rst:281 +#: ../../library/dataclasses.rst:284 #, fuzzy msgid "" "*metadata*: This can be a mapping or ``None``. ``None`` is treated as an " @@ -506,7 +510,7 @@ msgstr "" "不被資料類別使用,而是作為第三方擴充機制提供的。多個第三方可以各自擁有自己的" "密鑰,用作元資料中的命名空間。" -#: ../../library/dataclasses.rst:289 +#: ../../library/dataclasses.rst:292 #, fuzzy msgid "" "*kw_only*: If true, this field will be marked as keyword-only. This is used " @@ -515,7 +519,7 @@ msgstr "" "*kw_only*:如果為真,該欄位將被標記為僅限關鍵字。這在計算生成的 :meth:" "`~object.__init__` 方法的參數時使用。" -#: ../../library/dataclasses.rst:295 +#: ../../library/dataclasses.rst:298 #, fuzzy msgid "" "If the default value of a field is specified by a call to :func:`!field`, " @@ -531,7 +535,7 @@ msgstr "" "在 :func:`@dataclass ` 裝飾器運行後,類別屬性將全部包含欄位的預設" "值,就像預設值本身已指定一樣。例如,在: ::" -#: ../../library/dataclasses.rst:311 +#: ../../library/dataclasses.rst:314 #, fuzzy msgid "" "The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!" @@ -541,7 +545,7 @@ msgstr "" "類別屬性 :attr:`!C.z` 將為 ``10``,類別屬性 :attr:`!C.t` 將為 ``20``,類別屬" "性 :attr:`!C.x` 和 :attr:`!C.y` 將不會放。" -#: ../../library/dataclasses.rst:317 +#: ../../library/dataclasses.rst:320 #, fuzzy msgid "" ":class:`!Field` objects describe each defined field. These objects are " @@ -553,15 +557,15 @@ msgstr "" "`fields` 模組級方法回傳(見下文)。使用者不應該直接實例化 :class:`!Field` 物" "件。它記錄的屬性是:" -#: ../../library/dataclasses.rst:322 +#: ../../library/dataclasses.rst:325 msgid ":attr:`!name`: The name of the field." msgstr ":attr:`!name`:欄位的名稱。" -#: ../../library/dataclasses.rst:323 +#: ../../library/dataclasses.rst:326 msgid ":attr:`!type`: The type of the field." msgstr ":attr:`!type`:欄位的型別。" -#: ../../library/dataclasses.rst:324 +#: ../../library/dataclasses.rst:327 #, fuzzy msgid "" ":attr:`!default`, :attr:`!default_factory`, :attr:`!init`, :attr:`!repr`, :" @@ -572,14 +576,14 @@ msgstr "" "attr:`!hash`、:attr:`!compare`, :attr:`!metadata` 和 :attr:`!kw_only` 有與它" "們在 :func:`field` 函式中的含義和值相同。" -#: ../../library/dataclasses.rst:328 +#: ../../library/dataclasses.rst:331 #, fuzzy msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." msgstr "可能存在其他屬性,但它們是私有的,不得檢查或依賴。" -#: ../../library/dataclasses.rst:333 +#: ../../library/dataclasses.rst:336 #, fuzzy msgid "" "Returns a tuple of :class:`Field` objects that define the fields for this " @@ -591,7 +595,7 @@ msgstr "" "實例。如果未傳遞資料類別或其中一個實例,則引發 :exc:`TypeError`。不回傳 " "``ClassVar`` 或 ``InitVar`` 的偽欄位。" -#: ../../library/dataclasses.rst:340 +#: ../../library/dataclasses.rst:343 #, fuzzy msgid "" "Converts the dataclass *obj* to a dict (by using the factory function " @@ -603,23 +607,23 @@ msgstr "" "都被轉換為其欄位的字典,作為 ``name: value`` 對。資料類別、字典、列表和元組被" "遞迴到。其他物件使用 :func:`copy.deepcopy` 複製。" -#: ../../library/dataclasses.rst:346 +#: ../../library/dataclasses.rst:349 #, fuzzy msgid "Example of using :func:`!asdict` on nested dataclasses::" msgstr "在嵌套資料類別上使用 :func:`!asdict` 的範例: ::" -#: ../../library/dataclasses.rst:363 ../../library/dataclasses.rst:383 +#: ../../library/dataclasses.rst:366 ../../library/dataclasses.rst:386 #, fuzzy msgid "To create a shallow copy, the following workaround may be used::" msgstr "要建立淺複製,可以使用以下解決方法:" -#: ../../library/dataclasses.rst:367 +#: ../../library/dataclasses.rst:370 #, fuzzy msgid "" ":func:`!asdict` raises :exc:`TypeError` if *obj* is not a dataclass instance." msgstr ":func:`!asdict` 如果 *obj* 不是資料類別實例,則引發 :exc:`TypeError`。" -#: ../../library/dataclasses.rst:372 +#: ../../library/dataclasses.rst:375 #, fuzzy msgid "" "Converts the dataclass *obj* to a tuple (by using the factory function " @@ -631,11 +635,11 @@ msgstr "" "都被轉換為其欄位值的元組。資料類別、字典、列表和元組被遞迴到。其他物件使用 :" "func:`copy.deepcopy` 複製。" -#: ../../library/dataclasses.rst:378 +#: ../../library/dataclasses.rst:381 msgid "Continuing from the previous example::" msgstr "從前面的例子繼續: ::" -#: ../../library/dataclasses.rst:387 +#: ../../library/dataclasses.rst:390 #, fuzzy msgid "" ":func:`!astuple` raises :exc:`TypeError` if *obj* is not a dataclass " @@ -643,7 +647,7 @@ msgid "" msgstr "" ":func:`!astuple` 如果 *obj* 不是資料類別實例,則引發 :exc:`TypeError`。" -#: ../../library/dataclasses.rst:392 +#: ../../library/dataclasses.rst:395 #, fuzzy msgid "" "Creates a new dataclass with name *cls_name*, fields as defined in *fields*, " @@ -663,13 +667,13 @@ msgstr "" "``kw_only`` 的值, ``slots`` 和 ``weakref_slot`` 與它們在 :func:`dataclass` 中" "的含義相同。" -#: ../../library/dataclasses.rst:402 +#: ../../library/dataclasses.rst:405 msgid "" "If *module* is defined, the :attr:`!__module__` attribute of the dataclass " "is set to that value. By default, it is set to the module name of the caller." msgstr "" -#: ../../library/dataclasses.rst:406 +#: ../../library/dataclasses.rst:409 #, fuzzy msgid "" "This function is not strictly required, because any Python mechanism for " @@ -681,11 +685,11 @@ msgstr "" "制都可以應用 :func:`dataclass` 函式將該類轉換為資料類別。提供此功能是為了方" "便。例如: ::" -#: ../../library/dataclasses.rst:418 +#: ../../library/dataclasses.rst:421 msgid "Is equivalent to::" msgstr "相當於: ::" -#: ../../library/dataclasses.rst:431 +#: ../../library/dataclasses.rst:434 #, fuzzy msgid "" "Creates a new object of the same type as *obj*, replacing fields with values " @@ -697,7 +701,7 @@ msgstr "" "``obj`` 不是資料類別,則引發 :exc:`TypeError`。如果 ``changes`` 中的值未指定" "欄位,則引發 :exc:`TypeError`。" -#: ../../library/dataclasses.rst:436 +#: ../../library/dataclasses.rst:439 #, fuzzy msgid "" "The newly returned object is created by calling the :meth:`~object.__init__` " @@ -707,7 +711,7 @@ msgstr "" "新回傳的對像是通過呼叫資料類別的 :meth:`~object.__init__` 方法建立的。這確" "保 :meth:`__post_init__`(如果存在)也被呼叫。" -#: ../../library/dataclasses.rst:440 +#: ../../library/dataclasses.rst:443 #, fuzzy msgid "" "Init-only variables without default values, if any exist, must be specified " @@ -717,7 +721,7 @@ msgstr "" "沒有預設值的僅初始化變數(如果存在)必須在呼叫 :func:`replace` 時指定,以便它" "們可以傳遞給 :meth:`__init__` 和 :meth:`__post_init__`。" -#: ../../library/dataclasses.rst:444 +#: ../../library/dataclasses.rst:447 #, fuzzy msgid "" "It is an error for *changes* to contain any fields that are defined as " @@ -726,7 +730,7 @@ msgstr "" "*changes* 包含任何定義為具有 ``init=False`` 的欄位是錯誤的。在這種情況下將引" "發 :exc:`ValueError`。" -#: ../../library/dataclasses.rst:448 +#: ../../library/dataclasses.rst:451 #, fuzzy msgid "" "Be forewarned about how ``init=False`` fields work during a call to :func:`!" @@ -743,7 +747,7 @@ msgstr "" "造函式可能是明智的,或者可能是處理實例複製的自定義:func:`!replace` (或類似命" "名的)方法。" -#: ../../library/dataclasses.rst:459 +#: ../../library/dataclasses.rst:462 #, fuzzy msgid "" "Return ``True`` if its parameter is a dataclass or an instance of one, " @@ -751,7 +755,7 @@ msgid "" msgstr "" "如果它的參數是一個資料類別或一個實例,則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/dataclasses.rst:462 +#: ../../library/dataclasses.rst:465 #, fuzzy msgid "" "If you need to know if a class is an instance of a dataclass (and not a " @@ -761,12 +765,12 @@ msgstr "" "如果你需要知道一個類是否是資料類別的實例(而不是資料類別本身),那麼新增一個" "進一步的檢查 ``not isinstance(obj, type)``: ::" -#: ../../library/dataclasses.rst:471 +#: ../../library/dataclasses.rst:474 #, fuzzy msgid "A sentinel value signifying a missing default or default_factory." msgstr "表示缺少 default 或 default_factory 的標記值。" -#: ../../library/dataclasses.rst:475 +#: ../../library/dataclasses.rst:478 #, fuzzy msgid "" "A sentinel value used as a type annotation. Any fields after a pseudo-field " @@ -782,21 +786,21 @@ msgstr "" "類欄位的名稱。按照慣例,名稱 ``_`` 用於 :const:`!KW_ONLY` 欄位。僅關鍵字欄位" "表示 :meth:`~object.__init__` 參數,在實例化類時必須將其指定為關鍵字。" -#: ../../library/dataclasses.rst:484 +#: ../../library/dataclasses.rst:487 #, fuzzy msgid "" "In this example, the fields ``y`` and ``z`` will be marked as keyword-only " "fields::" msgstr "在此示例中,欄位 ``y`` 和 ``z`` 將被標記為僅關鍵字欄位: ::" -#: ../../library/dataclasses.rst:495 +#: ../../library/dataclasses.rst:498 #, fuzzy msgid "" "In a single dataclass, it is an error to specify more than one field whose " "type is :const:`!KW_ONLY`." msgstr "在單個資料類別中,指定多個型別為 :const:`!KW_ONLY` 的欄位是錯誤的。" -#: ../../library/dataclasses.rst:502 +#: ../../library/dataclasses.rst:505 #, fuzzy msgid "" "Raised when an implicitly defined :meth:`~object.__setattr__` or :meth:" @@ -806,12 +810,12 @@ msgstr "" "當在使用 frozen=True 定義的資料類別上呼叫隱式定義的 :meth:`__setattr__` 或 :" "meth:`__delattr__` 時引發。它是 :exc:`AttributeError` 的子類別。" -#: ../../library/dataclasses.rst:509 +#: ../../library/dataclasses.rst:512 #, fuzzy msgid "Post-init processing" msgstr "初始化後處理" -#: ../../library/dataclasses.rst:513 +#: ../../library/dataclasses.rst:516 #, fuzzy msgid "" "When defined on the class, it will be called by the generated :meth:`~object." @@ -827,14 +831,14 @@ msgstr "" "按照它們在類中定義的順序傳遞給 :meth:`!__post_init__` 。如果沒有生成 :meth:`!" "__init__` 方法,那麼 :meth:`!__post_init__` 將不會被自動呼叫。" -#: ../../library/dataclasses.rst:520 +#: ../../library/dataclasses.rst:523 #, fuzzy msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" msgstr "在其他用途中,這允許初始化依賴於一個或多個其他欄位的欄位值。例如: ::" -#: ../../library/dataclasses.rst:532 +#: ../../library/dataclasses.rst:535 #, fuzzy msgid "" "The :meth:`~object.__init__` method generated by :func:`@dataclass " @@ -846,7 +850,7 @@ msgstr "" "類別 :meth:`!__init__` 方法。如果基底類別有一個必須呼叫的 :meth:`!__init__` " "方法,通常在 :meth:`__post_init__` 方法中呼叫此方法: ::" -#: ../../library/dataclasses.rst:549 +#: ../../library/dataclasses.rst:552 #, fuzzy msgid "" "Note, however, that in general the dataclass-generated :meth:`!__init__` " @@ -856,7 +860,7 @@ msgstr "" "但是請注意,通常不需要呼叫資料類別生成的 :meth:`!__init__` 方法,因為派生資料" "類別將負責初始化作為資料類別本身的任何基底類別的所有欄位。" -#: ../../library/dataclasses.rst:553 +#: ../../library/dataclasses.rst:556 #, fuzzy msgid "" "See the section below on init-only variables for ways to pass parameters to :" @@ -866,11 +870,11 @@ msgstr "" "請參閱下面有關僅初始化變數的部分,了解將參數傳遞給 :meth:`!__post_init__` 的" "方法。另請參閱有關 :func:`replace` 如何處理 ``init=False`` 欄位的警告。" -#: ../../library/dataclasses.rst:560 +#: ../../library/dataclasses.rst:563 msgid "Class variables" msgstr "類別變數" -#: ../../library/dataclasses.rst:562 +#: ../../library/dataclasses.rst:565 #, fuzzy msgid "" "One of the few places where :func:`@dataclass ` actually inspects " @@ -887,12 +891,12 @@ msgstr "" "外,並被資料類別機制忽略。模組級 :func:`fields` 函式不會回傳此類別 " "``ClassVar`` 偽欄位。" -#: ../../library/dataclasses.rst:573 +#: ../../library/dataclasses.rst:576 #, fuzzy msgid "Init-only variables" msgstr "僅初始化變數" -#: ../../library/dataclasses.rst:575 +#: ../../library/dataclasses.rst:578 #, fuzzy msgid "" "Another place where :func:`@dataclass ` inspects a type " @@ -912,14 +916,14 @@ msgstr "" "的 :meth:`~object.__init__` 方法,並傳遞給可選的 :meth:`__post_init__` 方法。" "它們不被資料類使用。" -#: ../../library/dataclasses.rst:585 +#: ../../library/dataclasses.rst:588 #, fuzzy msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" msgstr "例如,假設一個欄位將從資料庫中初始化,如果在建立類時沒有提供值: ::" -#: ../../library/dataclasses.rst:600 +#: ../../library/dataclasses.rst:603 #, fuzzy msgid "" "In this case, :func:`fields` will return :class:`Field` objects for :attr:`!" @@ -928,11 +932,11 @@ msgstr "" "在這種情況下,:func:`fields` 將為 :attr:`!i` 和 :attr:`!j` 回傳 :class:" "`Field` 物件,但不會為 :attr:`!database` 回傳。" -#: ../../library/dataclasses.rst:606 +#: ../../library/dataclasses.rst:609 msgid "Frozen instances" msgstr "凍結實例" -#: ../../library/dataclasses.rst:608 +#: ../../library/dataclasses.rst:611 #, fuzzy msgid "" "It is not possible to create truly immutable Python objects. However, by " @@ -946,7 +950,7 @@ msgstr "" "別將向類新增 :meth:`~object.__setattr__` 和 :meth:`~object.__delattr__` 方" "法。這些方法在呼叫時會引發 :exc:`FrozenInstanceError`。" -#: ../../library/dataclasses.rst:614 +#: ../../library/dataclasses.rst:617 #, fuzzy msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" @@ -956,11 +960,11 @@ msgstr "" "使用 ``frozen=True`` 時有一個微小的性能損失::meth:`~object.__init__` 不能使" "用簡單賦值來初始化欄位,必須使用 :meth:`!object.__setattr__`。" -#: ../../library/dataclasses.rst:623 +#: ../../library/dataclasses.rst:626 msgid "Inheritance" msgstr "繼承" -#: ../../library/dataclasses.rst:625 +#: ../../library/dataclasses.rst:628 #, fuzzy msgid "" "When the dataclass is being created by the :func:`@dataclass ` " @@ -978,7 +982,7 @@ msgstr "" "將自己的欄位新增到有序映射中。所有生成的方法都將使用這種組合的、計算的有序欄" "位映射。因為欄位是按插入順序排列的,所以派生類會覆蓋基底類別。一個例子: ::" -#: ../../library/dataclasses.rst:645 +#: ../../library/dataclasses.rst:648 #, fuzzy msgid "" "The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " @@ -988,19 +992,19 @@ msgstr "" "最終的欄位列表按順序為 :attr:`!x`、:attr:`!y`、:attr:`!z`。:attr:`!x` 的最終" "型別是 :class:`int`,如類別 :class:`!C` 中指定的那樣。" -#: ../../library/dataclasses.rst:648 +#: ../../library/dataclasses.rst:651 #, fuzzy msgid "" "The generated :meth:`~object.__init__` method for :class:`!C` will look " "like::" msgstr "為 :class:`!C` 生成的 :meth:`~object.__init__` 方法將如下所示: ::" -#: ../../library/dataclasses.rst:653 +#: ../../library/dataclasses.rst:656 #, fuzzy msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" msgstr ":meth:`!__init__` 中僅關鍵字參數的重新排序" -#: ../../library/dataclasses.rst:655 +#: ../../library/dataclasses.rst:658 #, fuzzy msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " @@ -1012,7 +1016,7 @@ msgstr "" "僅關鍵字)參數之後。這是如何在 Python 中實作僅關鍵字參數的要求:它們必須位於" "非僅關鍵字參數之後。" -#: ../../library/dataclasses.rst:661 +#: ../../library/dataclasses.rst:664 #, fuzzy msgid "" "In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " @@ -1022,12 +1026,12 @@ msgstr "" "在此示例中,:attr:`!Base.y`、:attr:`!Base.w` 和 :attr:`!D.t` 是僅限關鍵字的欄" "位,:attr:`!Base.x` 和 :attr:`!D.z` 是常規欄位: ::" -#: ../../library/dataclasses.rst:676 +#: ../../library/dataclasses.rst:679 #, fuzzy msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" msgstr "為 :class:`!D` 生成的 :meth:`!__init__` 方法將如下所示: ::" -#: ../../library/dataclasses.rst:680 +#: ../../library/dataclasses.rst:683 #, fuzzy msgid "" "Note that the parameters have been re-ordered from how they appear in the " @@ -1037,18 +1041,18 @@ msgstr "" "請注意,參數已根據它們在欄位列表中的顯示方式重新排序:從常規欄位派生的參數後" "跟從僅關鍵字欄位派生的參數。" -#: ../../library/dataclasses.rst:684 +#: ../../library/dataclasses.rst:687 #, fuzzy msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" "ordered :meth:`!__init__` parameter list." msgstr "僅關鍵字參數的相對順序在重新排序的 :meth:`!__init__` 參數列表中維護。" -#: ../../library/dataclasses.rst:689 +#: ../../library/dataclasses.rst:692 msgid "Default factory functions" msgstr "預設工廠函式" -#: ../../library/dataclasses.rst:691 +#: ../../library/dataclasses.rst:694 #, fuzzy msgid "" "If a :func:`field` specifies a *default_factory*, it is called with zero " @@ -1058,7 +1062,7 @@ msgstr "" "如果 :func:`field` 指定了 *default_factory*,當需要該欄位的預設值時,它會以零" "引數呼叫。例如,要建立列表的新實例,請使用: ::" -#: ../../library/dataclasses.rst:697 +#: ../../library/dataclasses.rst:700 #, fuzzy msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " @@ -1071,11 +1075,11 @@ msgstr "" "位還指定了 ``default_factory``,那麼預設工廠函式將始終從生成的 :meth:" "`__init__ 中呼叫`功能。發生這種情況是因為沒有其他方法可以為該欄位賦予初始值。" -#: ../../library/dataclasses.rst:704 +#: ../../library/dataclasses.rst:707 msgid "Mutable default values" msgstr "可變預設值" -#: ../../library/dataclasses.rst:706 +#: ../../library/dataclasses.rst:709 #, fuzzy msgid "" "Python stores default member variable values in class attributes. Consider " @@ -1083,7 +1087,7 @@ msgid "" msgstr "" "Python 將預設成員變數值存儲在類別屬性中。考慮這個例子,不使用資料類別: ::" -#: ../../library/dataclasses.rst:721 +#: ../../library/dataclasses.rst:724 #, fuzzy msgid "" "Note that the two instances of class :class:`!C` share the same class " @@ -1092,16 +1096,16 @@ msgstr "" "請注意,類別 :class:`!C` 的兩個實例共享同一個類別變數 :attr:`!x`,正如預期的" "那樣。" -#: ../../library/dataclasses.rst:724 +#: ../../library/dataclasses.rst:727 #, fuzzy msgid "Using dataclasses, *if* this code was valid::" msgstr "使用資料類別,*如果*此程式碼有效: ::" -#: ../../library/dataclasses.rst:732 +#: ../../library/dataclasses.rst:735 msgid "it would generate code similar to::" msgstr "它會生成類似的程式碼: ::" -#: ../../library/dataclasses.rst:743 +#: ../../library/dataclasses.rst:746 #, fuzzy msgid "" "This has the same issue as the original example using class :class:`!C`. " @@ -1121,14 +1125,14 @@ msgstr "" "到不可散列的預設參數,它將引發 :exc:`TypeError`。假設是如果一個值是不可散列" "的,那麼它就是可變的。這是一個部分解決方案,但它確實可以防止許多常見錯誤。" -#: ../../library/dataclasses.rst:754 +#: ../../library/dataclasses.rst:757 #, fuzzy msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "使用預設工廠函式是一種建立可變型別的新實例作為欄位預設值的方法: ::" -#: ../../library/dataclasses.rst:763 +#: ../../library/dataclasses.rst:766 #, fuzzy msgid "" "Instead of looking for and disallowing objects of type :class:`list`, :class:" @@ -1138,12 +1142,12 @@ msgstr "" "不再查找和禁止型別為 :class:`list`、:class:`dict` 或 :class:`set` 的物件,現" "在不允許使用不可散列的對像作為預設值。不可散列性用於近似可變性。" -#: ../../library/dataclasses.rst:770 +#: ../../library/dataclasses.rst:773 #, fuzzy msgid "Descriptor-typed fields" msgstr "描述器型別的欄位" -#: ../../library/dataclasses.rst:772 +#: ../../library/dataclasses.rst:775 #, fuzzy msgid "" "Fields that are assigned :ref:`descriptor objects ` as their " @@ -1151,7 +1155,7 @@ msgid "" msgstr "" "指定為\\ :ref:`描述器物件 `\\ 作為預設值的欄位具有以下特殊行為:" -#: ../../library/dataclasses.rst:775 +#: ../../library/dataclasses.rst:778 #, fuzzy msgid "" "The value for the field passed to the dataclass's :meth:`~object.__init__` " @@ -1161,7 +1165,7 @@ msgstr "" "傳遞給資料類別的 :meth:`~object.__init__` 方法的欄位值被傳遞給描述器的 :meth:" "`~object.__set__` 方法,而不是覆蓋描述器物件。" -#: ../../library/dataclasses.rst:779 +#: ../../library/dataclasses.rst:782 #, fuzzy msgid "" "Similarly, when getting or setting the field, the descriptor's :meth:" @@ -1171,7 +1175,7 @@ msgstr "" "同樣,在獲取或設定欄位時,將呼叫描述器的 :meth:`~object.__get__` 或 :meth:`!" "__set__` 方法,而不是回傳或覆蓋描述器物件。" -#: ../../library/dataclasses.rst:783 +#: ../../library/dataclasses.rst:786 #, fuzzy msgid "" "To determine whether a field contains a default value, :func:`@dataclass " @@ -1187,7 +1191,7 @@ msgstr "" "面,如果描述器在這種情況下引發 :exc:`AttributeError`,則不會為該欄位提供預設" "值。" -#: ../../library/dataclasses.rst:818 +#: ../../library/dataclasses.rst:821 #, fuzzy msgid "" "Note that if a field is annotated with a descriptor type, but is not "