diff --git a/copyright.po b/copyright.po index 68c76639b9..b927148cc0 100644 --- a/copyright.po +++ b/copyright.po @@ -1,16 +1,17 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2023, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: # Adrian Liaw , 2015 # Ching-Lung Chuang, 2015 # Liang-Bo Wang , 2016 +# meowmeowcat , 2021 msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-03 00:10+0000\n" +"POT-Creation-Date: 2023-01-10 00:17+0000\n" "PO-Revision-Date: 2021-06-25 20:17+0800\n" "Last-Translator: meowmeowcat \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -31,8 +32,8 @@ msgid "Python and this documentation is:" msgstr "Python 和這份說明文件的版權:" #: ../../copyright.rst:7 -msgid "Copyright © 2001-2022 Python Software Foundation. All rights reserved." -msgstr "Copyright © 2001-2022 Python Software Foundation 保留一切權利。" +msgid "Copyright © 2001-2023 Python Software Foundation. All rights reserved." +msgstr "Copyright © 2001-2023 Python Software Foundation 保留一切權利。" #: ../../copyright.rst:9 msgid "Copyright © 2000 BeOpen.com. All rights reserved." diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index db4a953fc7..7d51719a36 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-17 00:14+0000\n" +"POT-Creation-Date: 2023-01-11 00:15+0000\n" "PO-Revision-Date: 2022-02-20 12:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -86,7 +86,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:50 msgid "" "If there is no running event loop set, the function will return the result " -"of ``get_event_loop_policy().get_event_loop()`` call." +"of the ``get_event_loop_policy().get_event_loop()`` call." msgstr "" #: ../../library/asyncio-eventloop.rst:53 @@ -103,17 +103,14 @@ msgid "" "and close an event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:62 -msgid "" -"Deprecation warning is emitted if there is no current event loop. In Python " -"3.12 it will be an error." -msgstr "" - -#: ../../library/asyncio-eventloop.rst:67 +#: ../../library/asyncio-eventloop.rst:63 msgid "" "In Python versions 3.10.0--3.10.8 and 3.11.0 this function (and other " -"functions which used it implicitly) emitted a :exc:`DeprecationWarning` if " -"there was no running event loop, even if the current loop was set." +"functions which use it implicitly) emitted a :exc:`DeprecationWarning` if " +"there was no running event loop, even if the current loop was set on the " +"policy. In Python versions 3.10.9, 3.11.1 and 3.12 they emit a :exc:" +"`DeprecationWarning` if there is no running event loop and no current loop " +"is set. In some future Python release this will become an error." msgstr "" #: ../../library/asyncio-eventloop.rst:74 diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index 7da2ec5a83..fc94297ca9 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-07 00:17+0000\n" +"POT-Creation-Date: 2023-01-11 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -145,47 +145,47 @@ msgstr "" msgid "On Windows, :class:`ProactorEventLoop` is now used by default." msgstr "" -#: ../../library/asyncio-policy.rst:115 +#: ../../library/asyncio-policy.rst:116 msgid "" -":meth:`get_event_loop` now emits a :exc:`DeprecationWarning` if there is no " -"current event loop set and a new event loop has been implicitly created. In " -"Python 3.12 it will be an error." +"In Python versions 3.10.9, 3.11.1 and 3.12 this function emits a :exc:" +"`DeprecationWarning` if there is no running event loop and no current loop " +"is set. In some future Python release this will become an error." msgstr "" -#: ../../library/asyncio-policy.rst:123 +#: ../../library/asyncio-policy.rst:124 msgid "" "An alternative event loop policy that uses the :class:`SelectorEventLoop` " "event loop implementation." msgstr "" -#: ../../library/asyncio-policy.rst:126 ../../library/asyncio-policy.rst:134 +#: ../../library/asyncio-policy.rst:127 ../../library/asyncio-policy.rst:135 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../library/asyncio-policy.rst:131 +#: ../../library/asyncio-policy.rst:132 msgid "" "An alternative event loop policy that uses the :class:`ProactorEventLoop` " "event loop implementation." msgstr "" -#: ../../library/asyncio-policy.rst:140 +#: ../../library/asyncio-policy.rst:141 msgid "Process Watchers" msgstr "" -#: ../../library/asyncio-policy.rst:142 +#: ../../library/asyncio-policy.rst:143 msgid "" "A process watcher allows customization of how an event loop monitors child " "processes on Unix. Specifically, the event loop needs to know when a child " "process has exited." msgstr "" -#: ../../library/asyncio-policy.rst:146 +#: ../../library/asyncio-policy.rst:147 msgid "" "In asyncio, child processes are created with :func:`create_subprocess_exec` " "and :meth:`loop.subprocess_exec` functions." msgstr "" -#: ../../library/asyncio-policy.rst:150 +#: ../../library/asyncio-policy.rst:151 msgid "" "asyncio defines the :class:`AbstractChildWatcher` abstract base class, which " "child watchers should implement, and has four different implementations: :" @@ -194,176 +194,176 @@ msgid "" "`FastChildWatcher`." msgstr "" -#: ../../library/asyncio-policy.rst:156 +#: ../../library/asyncio-policy.rst:157 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." msgstr "" -#: ../../library/asyncio-policy.rst:159 +#: ../../library/asyncio-policy.rst:160 msgid "" "The following two functions can be used to customize the child process " "watcher implementation used by the asyncio event loop:" msgstr "" -#: ../../library/asyncio-policy.rst:164 +#: ../../library/asyncio-policy.rst:165 msgid "Return the current child watcher for the current policy." msgstr "" -#: ../../library/asyncio-policy.rst:168 +#: ../../library/asyncio-policy.rst:169 msgid "" "Set the current child watcher to *watcher* for the current policy. " "*watcher* must implement methods defined in the :class:" "`AbstractChildWatcher` base class." msgstr "" -#: ../../library/asyncio-policy.rst:173 +#: ../../library/asyncio-policy.rst:174 msgid "" "Third-party event loops implementations might not support custom child " "watchers. For such event loops, using :func:`set_child_watcher` might be " "prohibited or have no effect." msgstr "" -#: ../../library/asyncio-policy.rst:181 +#: ../../library/asyncio-policy.rst:182 msgid "Register a new child handler." msgstr "" -#: ../../library/asyncio-policy.rst:183 +#: ../../library/asyncio-policy.rst:184 msgid "" "Arrange for ``callback(pid, returncode, *args)`` to be called when a process " "with PID equal to *pid* terminates. Specifying another callback for the " "same process replaces the previous handler." msgstr "" -#: ../../library/asyncio-policy.rst:188 +#: ../../library/asyncio-policy.rst:189 msgid "The *callback* callable must be thread-safe." msgstr "" -#: ../../library/asyncio-policy.rst:192 +#: ../../library/asyncio-policy.rst:193 msgid "Removes the handler for process with PID equal to *pid*." msgstr "" -#: ../../library/asyncio-policy.rst:194 +#: ../../library/asyncio-policy.rst:195 msgid "" "The function returns ``True`` if the handler was successfully removed, " "``False`` if there was nothing to remove." msgstr "" -#: ../../library/asyncio-policy.rst:199 +#: ../../library/asyncio-policy.rst:200 msgid "Attach the watcher to an event loop." msgstr "" -#: ../../library/asyncio-policy.rst:201 +#: ../../library/asyncio-policy.rst:202 msgid "" "If the watcher was previously attached to an event loop, then it is first " "detached before attaching to the new loop." msgstr "" -#: ../../library/asyncio-policy.rst:204 +#: ../../library/asyncio-policy.rst:205 msgid "Note: loop may be ``None``." msgstr "" -#: ../../library/asyncio-policy.rst:208 +#: ../../library/asyncio-policy.rst:209 msgid "Return ``True`` if the watcher is ready to use." msgstr "" -#: ../../library/asyncio-policy.rst:210 +#: ../../library/asyncio-policy.rst:211 msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" -#: ../../library/asyncio-policy.rst:217 +#: ../../library/asyncio-policy.rst:218 msgid "Close the watcher." msgstr "" -#: ../../library/asyncio-policy.rst:219 +#: ../../library/asyncio-policy.rst:220 msgid "" "This method has to be called to ensure that underlying resources are cleaned-" "up." msgstr "" -#: ../../library/asyncio-policy.rst:224 +#: ../../library/asyncio-policy.rst:225 msgid "" "This implementation starts a new waiting thread for every subprocess spawn." msgstr "" -#: ../../library/asyncio-policy.rst:226 +#: ../../library/asyncio-policy.rst:227 msgid "" "It works reliably even when the asyncio event loop is run in a non-main OS " "thread." msgstr "" -#: ../../library/asyncio-policy.rst:228 +#: ../../library/asyncio-policy.rst:229 msgid "" "There is no noticeable overhead when handling a big number of children " "(*O(1)* each time a child terminates), but starting a thread per process " "requires extra memory." msgstr "" -#: ../../library/asyncio-policy.rst:231 +#: ../../library/asyncio-policy.rst:232 msgid "This watcher is used by default." msgstr "" -#: ../../library/asyncio-policy.rst:237 +#: ../../library/asyncio-policy.rst:238 msgid "" "This implementation registers a :py:data:`SIGCHLD` signal handler on " "instantiation. That can break third-party code that installs a custom " "handler for :py:data:`SIGCHLD` signal." msgstr "" -#: ../../library/asyncio-policy.rst:241 ../../library/asyncio-policy.rst:259 +#: ../../library/asyncio-policy.rst:242 ../../library/asyncio-policy.rst:260 msgid "" "The watcher avoids disrupting other code spawning processes by polling every " "process explicitly on a :py:data:`SIGCHLD` signal." msgstr "" -#: ../../library/asyncio-policy.rst:244 +#: ../../library/asyncio-policy.rst:245 msgid "" "There is no limitation for running subprocesses from different threads once " "the watcher is installed." msgstr "" -#: ../../library/asyncio-policy.rst:247 +#: ../../library/asyncio-policy.rst:248 msgid "" "The solution is safe but it has a significant overhead when handling a big " "number of processes (*O(n)* each time a :py:data:`SIGCHLD` is received)." msgstr "" -#: ../../library/asyncio-policy.rst:255 +#: ../../library/asyncio-policy.rst:256 msgid "" "This implementation uses active event loop from the main thread to handle :" "py:data:`SIGCHLD` signal. If the main thread has no running event loop " "another thread cannot spawn a subprocess (:exc:`RuntimeError` is raised)." msgstr "" -#: ../../library/asyncio-policy.rst:262 +#: ../../library/asyncio-policy.rst:263 msgid "" "This solution is as safe as :class:`MultiLoopChildWatcher` and has the same " "*O(N)* complexity but requires a running event loop in the main thread to " "work." msgstr "" -#: ../../library/asyncio-policy.rst:267 +#: ../../library/asyncio-policy.rst:268 msgid "" "This implementation reaps every terminated processes by calling ``os." "waitpid(-1)`` directly, possibly breaking other code spawning processes and " "waiting for their termination." msgstr "" -#: ../../library/asyncio-policy.rst:271 +#: ../../library/asyncio-policy.rst:272 msgid "" "There is no noticeable overhead when handling a big number of children " "(*O(1)* each time a child terminates)." msgstr "" -#: ../../library/asyncio-policy.rst:274 +#: ../../library/asyncio-policy.rst:275 msgid "" "This solution requires a running event loop in the main thread to work, as :" "class:`SafeChildWatcher`." msgstr "" -#: ../../library/asyncio-policy.rst:279 +#: ../../library/asyncio-policy.rst:280 msgid "" "This implementation polls process file descriptors (pidfds) to await child " "process termination. In some respects, :class:`PidfdChildWatcher` is a " @@ -374,11 +374,11 @@ msgid "" "only work on recent (5.3+) kernels." msgstr "" -#: ../../library/asyncio-policy.rst:293 +#: ../../library/asyncio-policy.rst:294 msgid "Custom Policies" msgstr "" -#: ../../library/asyncio-policy.rst:295 +#: ../../library/asyncio-policy.rst:296 msgid "" "To implement a new event loop policy, it is recommended to subclass :class:" "`DefaultEventLoopPolicy` and override the methods for which custom behavior " diff --git a/library/ctypes.po b/library/ctypes.po index 79aa5fb865..388e9d54b8 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-26 00:17+0000\n" +"POT-Creation-Date: 2023-01-10 17:25+0000\n" "PO-Revision-Date: 2022-10-16 03:20+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -512,7 +512,7 @@ msgstr "" #: ../../library/ctypes.rst:392 msgid "" -"Because specifying the attribute does inhibit portability it is adviced to " +"Because specifying the attribute does inhibit portability it is advised to " "always specify ``argtypes`` for all variadic functions." msgstr "" diff --git a/library/dataclasses.po b/library/dataclasses.po index 5d6ca800de..55431d8f40 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-06 00:15+0000\n" +"POT-Creation-Date: 2023-01-07 00:15+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -610,8 +610,8 @@ msgstr "" #: ../../library/dataclasses.rst:555 msgid "" -"One of two places where :func:`dataclass` actually inspects the type of a " -"field is to determine if a field is a class variable as defined in :pep:" +"One of the few places where :func:`dataclass` actually inspects the type of " +"a field is to determine if a field is a class variable as defined in :pep:" "`526`. It does this by checking if the type of the field is ``typing." "ClassVar``. If a field is a ``ClassVar``, it is excluded from consideration " "as a field and is ignored by the dataclass mechanisms. Such ``ClassVar`` " @@ -624,7 +624,7 @@ msgstr "" #: ../../library/dataclasses.rst:566 msgid "" -"The other place where :func:`dataclass` inspects a type annotation is to " +"Another place where :func:`dataclass` inspects a type annotation is to " "determine if a field is an init-only variable. It does this by seeing if " "the type of a field is of type ``dataclasses.InitVar``. If a field is an " "``InitVar``, it is considered a pseudo-field called an init-only field. As " diff --git a/library/itertools.po b/library/itertools.po index 2db798417e..bd005e9b6f 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-01 00:23+0000\n" +"POT-Creation-Date: 2023-01-08 00:17+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-" @@ -49,7 +49,8 @@ msgid "" "These tools and their built-in counterparts also work well with the high-" "speed functions in the :mod:`operator` module. For example, the " "multiplication operator can be mapped across two vectors to form an " -"efficient dot-product: ``sum(map(operator.mul, vector1, vector2))``." +"efficient dot-product: ``sum(starmap(operator.mul, zip(vec1, vec2, " +"strict=True)))``." msgstr "" #: ../../library/itertools.rst:39 diff --git a/library/os.path.po b/library/os.path.po index 514e8c9aab..cc57a77576 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-02 00:25+0000\n" +"POT-Creation-Date: 2023-01-09 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -99,11 +99,11 @@ msgstr "" #: ../../library/os.path.rst:235 ../../library/os.path.rst:245 #: ../../library/os.path.rst:255 ../../library/os.path.rst:265 #: ../../library/os.path.rst:275 ../../library/os.path.rst:294 -#: ../../library/os.path.rst:324 ../../library/os.path.rst:344 -#: ../../library/os.path.rst:367 ../../library/os.path.rst:389 -#: ../../library/os.path.rst:407 ../../library/os.path.rst:420 -#: ../../library/os.path.rst:436 ../../library/os.path.rst:452 -#: ../../library/os.path.rst:477 ../../library/os.path.rst:508 +#: ../../library/os.path.rst:325 ../../library/os.path.rst:345 +#: ../../library/os.path.rst:368 ../../library/os.path.rst:390 +#: ../../library/os.path.rst:408 ../../library/os.path.rst:421 +#: ../../library/os.path.rst:437 ../../library/os.path.rst:453 +#: ../../library/os.path.rst:478 ../../library/os.path.rst:509 msgid "Accepts a :term:`path-like object`." msgstr "" @@ -124,9 +124,9 @@ msgid "" "empty. Unlike :func:`commonprefix`, this returns a valid path." msgstr "" -#: ../../library/os.path.rst:89 ../../library/os.path.rst:388 -#: ../../library/os.path.rst:400 ../../library/os.path.rst:416 -#: ../../library/os.path.rst:432 +#: ../../library/os.path.rst:89 ../../library/os.path.rst:389 +#: ../../library/os.path.rst:401 ../../library/os.path.rst:417 +#: ../../library/os.path.rst:433 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" @@ -300,36 +300,37 @@ msgstr "" #: ../../library/os.path.rst:300 msgid "" -"Join one or more path components intelligently. The return value is the " -"concatenation of *path* and any members of *\\*paths* with exactly one " -"directory separator following each non-empty part except the last, meaning " -"that the result will only end in a separator if the last part is empty. If " -"a component is an absolute path, all previous components are thrown away and " -"joining continues from the absolute path component." +"Join one or more path segments intelligently. The return value is the " +"concatenation of *path* and all members of *\\*paths*, with exactly one " +"directory separator following each non-empty part except the last. That is, " +"if the last part is empty, the result will end in a separator. If a segment " +"is an absolute path (which on Windows requires both a drive and a root), " +"then all previous segments are ignored and joining continues from the " +"absolute path segment." msgstr "" -#: ../../library/os.path.rst:307 +#: ../../library/os.path.rst:308 msgid "" -"On Windows, the drive letter is not reset when an absolute path component (e." -"g., ``r'\\foo'``) is encountered. If a component contains a drive letter, " -"all previous components are thrown away and the drive letter is reset. Note " -"that since there is a current directory for each drive, ``os.path.join(\"c:" -"\", \"foo\")`` represents a path relative to the current directory on drive :" -"file:`C:` (:file:`c:foo`), not :file:`c:\\\\foo`." +"On Windows, the drive is not reset when a rooted path segment (e.g., " +"``r'\\foo'``) is encountered. If a segment is on a different drive or is an " +"absolute path, all previous segments are ignored and the drive is reset. " +"Note that since there is a current directory for each drive, ``os.path." +"join(\"c:\", \"foo\")`` represents a path relative to the current directory " +"on drive :file:`C:` (:file:`c:foo`), not :file:`c:\\\\foo`." msgstr "" -#: ../../library/os.path.rst:314 +#: ../../library/os.path.rst:315 msgid "Accepts a :term:`path-like object` for *path* and *paths*." msgstr "" -#: ../../library/os.path.rst:320 +#: ../../library/os.path.rst:321 msgid "" "Normalize the case of a pathname. On Windows, convert all characters in the " "pathname to lowercase, and also convert forward slashes to backward slashes. " "On other operating systems, return the path unchanged." msgstr "" -#: ../../library/os.path.rst:330 +#: ../../library/os.path.rst:331 msgid "" "Normalize a pathname by collapsing redundant separators and up-level " "references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all " @@ -338,7 +339,7 @@ msgid "" "backward slashes. To normalize case, use :func:`normcase`." msgstr "" -#: ../../library/os.path.rst:337 +#: ../../library/os.path.rst:338 msgid "" "On POSIX systems, in accordance with `IEEE Std 1003.1 2013 Edition; 4.13 " "Pathname Resolution \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -299,28 +299,28 @@ msgstr "" #: ../../library/os.rst:1498 ../../library/os.rst:1862 #: ../../library/os.rst:1951 ../../library/os.rst:1991 #: ../../library/os.rst:2208 ../../library/os.rst:2230 -#: ../../library/os.rst:3755 ../../library/os.rst:3762 -#: ../../library/os.rst:3769 ../../library/os.rst:3776 -#: ../../library/os.rst:3783 ../../library/os.rst:3790 -#: ../../library/os.rst:3797 ../../library/os.rst:3805 -#: ../../library/os.rst:3813 ../../library/os.rst:3820 -#: ../../library/os.rst:3827 ../../library/os.rst:3836 -#: ../../library/os.rst:3844 ../../library/os.rst:3852 -#: ../../library/os.rst:3859 ../../library/os.rst:3866 -#: ../../library/os.rst:3887 ../../library/os.rst:3904 -#: ../../library/os.rst:3944 ../../library/os.rst:3951 -#: ../../library/os.rst:3972 ../../library/os.rst:4099 -#: ../../library/os.rst:4149 ../../library/os.rst:4386 -#: ../../library/os.rst:4420 ../../library/os.rst:4477 -#: ../../library/os.rst:4491 ../../library/os.rst:4509 -#: ../../library/os.rst:4523 ../../library/os.rst:4535 -#: ../../library/os.rst:4547 ../../library/os.rst:4559 -#: ../../library/os.rst:4568 ../../library/os.rst:4578 -#: ../../library/os.rst:4592 ../../library/os.rst:4642 -#: ../../library/os.rst:4653 ../../library/os.rst:4665 -#: ../../library/os.rst:4672 ../../library/os.rst:4681 -#: ../../library/os.rst:4690 ../../library/os.rst:4699 -#: ../../library/os.rst:4708 +#: ../../library/os.rst:3757 ../../library/os.rst:3764 +#: ../../library/os.rst:3771 ../../library/os.rst:3778 +#: ../../library/os.rst:3785 ../../library/os.rst:3792 +#: ../../library/os.rst:3799 ../../library/os.rst:3807 +#: ../../library/os.rst:3815 ../../library/os.rst:3822 +#: ../../library/os.rst:3829 ../../library/os.rst:3838 +#: ../../library/os.rst:3846 ../../library/os.rst:3854 +#: ../../library/os.rst:3861 ../../library/os.rst:3868 +#: ../../library/os.rst:3889 ../../library/os.rst:3906 +#: ../../library/os.rst:3946 ../../library/os.rst:3953 +#: ../../library/os.rst:3974 ../../library/os.rst:4101 +#: ../../library/os.rst:4151 ../../library/os.rst:4388 +#: ../../library/os.rst:4422 ../../library/os.rst:4479 +#: ../../library/os.rst:4493 ../../library/os.rst:4511 +#: ../../library/os.rst:4525 ../../library/os.rst:4537 +#: ../../library/os.rst:4549 ../../library/os.rst:4561 +#: ../../library/os.rst:4570 ../../library/os.rst:4580 +#: ../../library/os.rst:4594 ../../library/os.rst:4644 +#: ../../library/os.rst:4655 ../../library/os.rst:4667 +#: ../../library/os.rst:4674 ../../library/os.rst:4683 +#: ../../library/os.rst:4692 ../../library/os.rst:4701 +#: ../../library/os.rst:4710 #, fuzzy msgid ":ref:`Availability `: Unix, not Emscripten, not WASI." msgstr ":ref:`適用 `:Unix、非 Emscripten、非 WASI。" @@ -472,9 +472,9 @@ msgstr "" #: ../../library/os.rst:-1 ../../library/os.rst:317 ../../library/os.rst:975 #: ../../library/os.rst:987 ../../library/os.rst:1203 ../../library/os.rst:1637 #: ../../library/os.rst:2035 ../../library/os.rst:2308 -#: ../../library/os.rst:3133 ../../library/os.rst:3747 -#: ../../library/os.rst:4236 ../../library/os.rst:4247 -#: ../../library/os.rst:4365 +#: ../../library/os.rst:3135 ../../library/os.rst:3749 +#: ../../library/os.rst:4238 ../../library/os.rst:4249 +#: ../../library/os.rst:4367 #, fuzzy msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" @@ -503,10 +503,10 @@ msgstr "" #: ../../library/os.rst:1611 ../../library/os.rst:1964 #: ../../library/os.rst:2006 ../../library/os.rst:2019 #: ../../library/os.rst:2274 ../../library/os.rst:2285 -#: ../../library/os.rst:2962 ../../library/os.rst:3119 -#: ../../library/os.rst:3352 ../../library/os.rst:4854 -#: ../../library/os.rst:4863 ../../library/os.rst:4884 -#: ../../library/os.rst:4894 ../../library/os.rst:4904 +#: ../../library/os.rst:2964 ../../library/os.rst:3121 +#: ../../library/os.rst:3354 ../../library/os.rst:4856 +#: ../../library/os.rst:4865 ../../library/os.rst:4886 +#: ../../library/os.rst:4896 ../../library/os.rst:4906 #, fuzzy msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" @@ -580,9 +580,9 @@ msgid "" msgstr "" #: ../../library/os.rst:-1 ../../library/os.rst:421 ../../library/os.rst:458 -#: ../../library/os.rst:3713 ../../library/os.rst:3929 -#: ../../library/os.rst:4341 ../../library/os.rst:4458 -#: ../../library/os.rst:4627 +#: ../../library/os.rst:3715 ../../library/os.rst:3931 +#: ../../library/os.rst:4343 ../../library/os.rst:4460 +#: ../../library/os.rst:4629 #, fuzzy msgid "" ":ref:`Availability `: Unix, Windows, not Emscripten, not WASI." @@ -829,7 +829,7 @@ msgid "" "or even ``socket.gethostbyaddr(socket.gethostname())``." msgstr "" -#: ../../library/os.rst:735 ../../library/os.rst:4366 +#: ../../library/os.rst:735 ../../library/os.rst:4368 msgid "" "Return type changed from a tuple to a tuple-like object with named " "attributes." @@ -1018,7 +1018,7 @@ msgstr "" #: ../../library/os.rst:895 ../../library/os.rst:910 ../../library/os.rst:1001 #: ../../library/os.rst:1475 ../../library/os.rst:1906 -#: ../../library/os.rst:1935 ../../library/os.rst:3097 +#: ../../library/os.rst:1935 ../../library/os.rst:3099 msgid "" "The function is limited on Emscripten and WASI, see :ref:`wasm-availability` " "for more information." @@ -1118,7 +1118,7 @@ msgid "" "``fd``, ``length``." msgstr "" -#: ../../library/os.rst:988 ../../library/os.rst:3136 +#: ../../library/os.rst:988 ../../library/os.rst:3138 msgid "Added support for Windows" msgstr "新增對 Windows 的支援" @@ -1229,7 +1229,7 @@ msgid "The *dir_fd* argument." msgstr "*dir_fd* 引數。" #: ../../library/os.rst:1102 ../../library/os.rst:1421 -#: ../../library/os.rst:1592 ../../library/os.rst:4459 +#: ../../library/os.rst:1592 ../../library/os.rst:4461 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 :" @@ -1245,12 +1245,12 @@ msgstr "" #: ../../library/os.rst:2185 ../../library/os.rst:2212 #: ../../library/os.rst:2234 ../../library/os.rst:2275 #: ../../library/os.rst:2346 ../../library/os.rst:2365 -#: ../../library/os.rst:2451 ../../library/os.rst:2724 -#: ../../library/os.rst:2975 ../../library/os.rst:3139 -#: ../../library/os.rst:3155 ../../library/os.rst:3195 -#: ../../library/os.rst:3294 ../../library/os.rst:3355 -#: ../../library/os.rst:3539 ../../library/os.rst:3718 -#: ../../library/os.rst:4224 +#: ../../library/os.rst:2453 ../../library/os.rst:2726 +#: ../../library/os.rst:2977 ../../library/os.rst:3141 +#: ../../library/os.rst:3157 ../../library/os.rst:3197 +#: ../../library/os.rst:3296 ../../library/os.rst:3357 +#: ../../library/os.rst:3541 ../../library/os.rst:3720 +#: ../../library/os.rst:4226 msgid "Accepts a :term:`path-like object`." msgstr "" @@ -1786,8 +1786,8 @@ msgid "Get the \"inheritable\" flag of the specified handle (a boolean)." msgstr "" #: ../../library/os.rst:1689 ../../library/os.rst:1695 -#: ../../library/os.rst:3645 ../../library/os.rst:4259 -#: ../../library/os.rst:4305 +#: ../../library/os.rst:3647 ../../library/os.rst:4261 +#: ../../library/os.rst:4307 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" @@ -2103,7 +2103,7 @@ msgid ":data:`stat.S_IXOTH`" msgstr ":data:`stat.S_IXOTH`" #: ../../library/os.rst:1896 ../../library/os.rst:1924 -#: ../../library/os.rst:3185 +#: ../../library/os.rst:3187 msgid "" "This function can support :ref:`specifying a file descriptor `, :" "ref:`paths relative to directory descriptors ` and :ref:`not " @@ -2212,8 +2212,8 @@ msgstr "新支援 Windows。" msgid "Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* arguments." msgstr "增加 *src_dir_fd*\\ 、\\ *dst_dir_fd* 與 *follow_symlinks* 引數。" -#: ../../library/os.rst:2042 ../../library/os.rst:2395 -#: ../../library/os.rst:2432 ../../library/os.rst:3107 +#: ../../library/os.rst:2042 ../../library/os.rst:2397 +#: ../../library/os.rst:2434 ../../library/os.rst:3109 msgid "Accepts a :term:`path-like object` for *src* and *dst*." msgstr "" @@ -2234,7 +2234,7 @@ msgid "" "circumstances, they will be of type ``str``." msgstr "" -#: ../../library/os.rst:2059 ../../library/os.rst:2480 +#: ../../library/os.rst:2059 ../../library/os.rst:2482 msgid "" "This function can also support :ref:`specifying a file descriptor " "`; the file descriptor must refer to a directory." @@ -2260,7 +2260,7 @@ msgstr "" msgid "The *path* parameter became optional." msgstr "" -#: ../../library/os.rst:2076 ../../library/os.rst:2966 +#: ../../library/os.rst:2076 ../../library/os.rst:2968 msgid "Added support for specifying *path* as an open file descriptor." msgstr "" @@ -2292,7 +2292,7 @@ msgid "" msgstr "" #: ../../library/os.rst:2102 ../../library/os.rst:2309 -#: ../../library/os.rst:3100 +#: ../../library/os.rst:3102 msgid "Added support for Windows 6.0 (Vista) symbolic links." msgstr "" @@ -2443,8 +2443,8 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:2270 ../../library/os.rst:2959 -#: ../../library/os.rst:3128 +#: ../../library/os.rst:2270 ../../library/os.rst:2961 +#: ../../library/os.rst:3130 msgid "" "This function can support :ref:`specifying a file descriptor `." msgstr "" @@ -2500,8 +2500,8 @@ msgid "" "does not exist, a :exc:`FileNotFoundError` is raised." msgstr "" -#: ../../library/os.rst:2332 ../../library/os.rst:2443 -#: ../../library/os.rst:3079 +#: ../../library/os.rst:2332 ../../library/os.rst:2445 +#: ../../library/os.rst:3081 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." @@ -2544,10 +2544,13 @@ msgid "" msgstr "" #: ../../library/os.rst:2374 -msgid "On Windows, if *dst* exists a :exc:`FileExistsError` is always raised." +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:2376 +#: ../../library/os.rst:2378 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 " @@ -2559,29 +2562,29 @@ msgid "" "operation (this is a POSIX requirement)." msgstr "" -#: ../../library/os.rst:2385 ../../library/os.rst:2425 +#: ../../library/os.rst:2387 ../../library/os.rst:2427 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:2388 +#: ../../library/os.rst:2390 msgid "" "If you want cross-platform overwriting of the destination, use :func:" "`replace`." msgstr "" -#: ../../library/os.rst:10 ../../library/os.rst:11 ../../library/os.rst:20 +#: ../../library/os.rst:10 ../../library/os.rst:11 ../../library/os.rst:22 msgid "" "Raises an :ref:`auditing event ` ``os.rename`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: ../../library/os.rst:2392 +#: ../../library/os.rst:2394 msgid "The *src_dir_fd* and *dst_dir_fd* arguments." msgstr "" -#: ../../library/os.rst:2401 +#: ../../library/os.rst:2403 msgid "" "Recursive directory or file renaming function. Works like :func:`rename`, " "except creation of any intermediate directories needed to make the new " @@ -2590,17 +2593,17 @@ msgid "" "using :func:`removedirs`." msgstr "" -#: ../../library/os.rst:2408 +#: ../../library/os.rst:2410 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:2413 +#: ../../library/os.rst:2415 msgid "Accepts a :term:`path-like object` for *old* and *new*." msgstr "" -#: ../../library/os.rst:2419 +#: ../../library/os.rst:2421 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 " @@ -2609,7 +2612,7 @@ msgid "" "renaming will be an atomic operation (this is a POSIX requirement)." msgstr "" -#: ../../library/os.rst:2438 +#: ../../library/os.rst:2440 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 " @@ -2623,11 +2626,11 @@ msgid "" "``path``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:2448 ../../library/os.rst:3152 +#: ../../library/os.rst:2450 ../../library/os.rst:3154 msgid "The *dir_fd* parameter." msgstr "*dir_fd* 參數。" -#: ../../library/os.rst:2457 +#: ../../library/os.rst:2459 msgid "" "Return an iterator of :class:`os.DirEntry` objects corresponding to the " "entries in the directory given by *path*. The entries are yielded in " @@ -2637,7 +2640,7 @@ msgid "" "unspecified." msgstr "" -#: ../../library/os.rst:2464 +#: ../../library/os.rst:2466 msgid "" "Using :func:`scandir` instead of :func:`listdir` can significantly increase " "the performance of code that also needs file type or file attribute " @@ -2649,7 +2652,7 @@ msgid "" "Unix but only requires one for symbolic links on Windows." msgstr "" -#: ../../library/os.rst:2474 +#: ../../library/os.rst:2476 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 " @@ -2664,24 +2667,24 @@ msgid "" "``path``." msgstr "" -#: ../../library/os.rst:2485 +#: ../../library/os.rst:2487 msgid "" "The :func:`scandir` iterator supports the :term:`context manager` protocol " "and has the following method:" msgstr "" -#: ../../library/os.rst:2490 +#: ../../library/os.rst:2492 msgid "Close the iterator and free acquired resources." msgstr "" -#: ../../library/os.rst:2492 +#: ../../library/os.rst:2494 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:2499 +#: ../../library/os.rst:2501 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 " @@ -2689,7 +2692,7 @@ msgid "" "system call::" msgstr "" -#: ../../library/os.rst:2511 +#: ../../library/os.rst:2513 msgid "" "On Unix-based systems, :func:`scandir` uses the system's `opendir() `_ and " @@ -2700,7 +2703,7 @@ msgid "" "desktop/aa364428(v=vs.85).aspx>`_ functions." msgstr "" -#: ../../library/os.rst:2523 +#: ../../library/os.rst:2525 msgid "" "Added support for the :term:`context manager` protocol and the :func:" "`~scandir.close()` method. If a :func:`scandir` iterator is neither " @@ -2708,28 +2711,28 @@ msgid "" "its destructor." msgstr "" -#: ../../library/os.rst:2529 +#: ../../library/os.rst:2531 msgid "The function accepts a :term:`path-like object`." msgstr "" -#: ../../library/os.rst:2531 +#: ../../library/os.rst:2533 msgid "Added support for :ref:`file descriptors ` on Unix." msgstr "" -#: ../../library/os.rst:2537 +#: ../../library/os.rst:2539 msgid "" "Object yielded by :func:`scandir` to expose the file path and other file " "attributes of a directory entry." msgstr "" -#: ../../library/os.rst:2540 +#: ../../library/os.rst:2542 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:2544 +#: ../../library/os.rst:2546 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 " @@ -2737,7 +2740,7 @@ msgid "" "up-to-date information." msgstr "" -#: ../../library/os.rst:2549 +#: ../../library/os.rst:2551 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 " @@ -2745,29 +2748,29 @@ msgid "" "methods and handle as appropriate." msgstr "" -#: ../../library/os.rst:2554 +#: ../../library/os.rst:2556 msgid "" "To be directly usable as a :term:`path-like object`, ``os.DirEntry`` " "implements the :class:`PathLike` interface." msgstr "" -#: ../../library/os.rst:2557 +#: ../../library/os.rst:2559 msgid "Attributes and methods on a ``os.DirEntry`` instance are as follows:" msgstr "" -#: ../../library/os.rst:2561 +#: ../../library/os.rst:2563 msgid "" "The entry's base filename, relative to the :func:`scandir` *path* argument." msgstr "" -#: ../../library/os.rst:2564 +#: ../../library/os.rst:2566 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:2570 +#: ../../library/os.rst:2572 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 " @@ -2777,51 +2780,51 @@ msgid "" "attribute." msgstr "" -#: ../../library/os.rst:2577 +#: ../../library/os.rst:2579 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:2583 +#: ../../library/os.rst:2585 msgid "Return the inode number of the entry." msgstr "" -#: ../../library/os.rst:2585 +#: ../../library/os.rst:2587 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:2589 +#: ../../library/os.rst:2591 msgid "" "On the first, uncached call, a system call is required on Windows but not on " "Unix." msgstr "" -#: ../../library/os.rst:2594 +#: ../../library/os.rst:2596 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:2598 +#: ../../library/os.rst:2600 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:2602 +#: ../../library/os.rst:2604 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:2606 +#: ../../library/os.rst:2608 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 " @@ -2831,46 +2834,46 @@ msgid "" "is ``False``." msgstr "" -#: ../../library/os.rst:2613 ../../library/os.rst:2643 +#: ../../library/os.rst:2615 ../../library/os.rst:2645 msgid "" "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :" "exc:`FileNotFoundError` is caught and not raised." msgstr "" -#: ../../library/os.rst:2618 +#: ../../library/os.rst:2620 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:2622 +#: ../../library/os.rst:2624 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:2626 +#: ../../library/os.rst:2628 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:2631 +#: ../../library/os.rst:2633 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:2635 +#: ../../library/os.rst:2637 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:2638 +#: ../../library/os.rst:2640 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 " @@ -2878,35 +2881,35 @@ msgid "" "``dirent.d_type == DT_UNKNOWN``." msgstr "" -#: ../../library/os.rst:2648 +#: ../../library/os.rst:2650 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:2652 +#: ../../library/os.rst:2654 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:2657 +#: ../../library/os.rst:2659 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:2661 +#: ../../library/os.rst:2663 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:2665 +#: ../../library/os.rst:2667 msgid "" "Note that there is a nice correspondence between several attributes and " "methods of ``os.DirEntry`` and of :class:`pathlib.Path`. In particular, the " @@ -2914,13 +2917,13 @@ msgid "" "``is_file()``, ``is_symlink()`` and ``stat()`` methods." msgstr "" -#: ../../library/os.rst:2673 +#: ../../library/os.rst:2675 msgid "" "Added support for the :class:`~os.PathLike` interface. Added support for :" "class:`bytes` paths on Windows." msgstr "" -#: ../../library/os.rst:2680 +#: ../../library/os.rst:2682 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 " @@ -2929,21 +2932,21 @@ msgid "" "`stat_result` object." msgstr "" -#: ../../library/os.rst:2686 +#: ../../library/os.rst:2688 msgid "" "This function normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :func:`lstat`." msgstr "" -#: ../../library/os.rst:2689 ../../library/os.rst:3518 -#: ../../library/os.rst:3534 ../../library/os.rst:3550 -#: ../../library/os.rst:3570 +#: ../../library/os.rst:2691 ../../library/os.rst:3520 +#: ../../library/os.rst:3536 ../../library/os.rst:3552 +#: ../../library/os.rst:3572 msgid "" "This function can support :ref:`specifying a file descriptor ` and :" "ref:`not following symlinks `." msgstr "" -#: ../../library/os.rst:2692 +#: ../../library/os.rst:2694 msgid "" "On Windows, passing ``follow_symlinks=False`` will disable following all " "name-surrogate reparse points, which includes symlinks and directory " @@ -2957,24 +2960,24 @@ msgid "" "junction points, which will raise the usual exceptions." msgstr "" -#: ../../library/os.rst:2705 ../../library/os.rst:3438 +#: ../../library/os.rst:2707 ../../library/os.rst:3440 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/os.rst:2718 +#: ../../library/os.rst:2720 msgid ":func:`fstat` and :func:`lstat` functions." msgstr ":func:`fstat` 和 :func:`lstat` 函式。" -#: ../../library/os.rst:2720 +#: ../../library/os.rst:2722 msgid "" "Added the *dir_fd* and *follow_symlinks* arguments, specifying a file " "descriptor instead of a path." msgstr "" -#: ../../library/os.rst:2727 +#: ../../library/os.rst:2729 msgid "" "On Windows, all reparse points that can be resolved by the operating system " "are now followed, and passing ``follow_symlinks=False`` disables following " @@ -2984,100 +2987,100 @@ msgid "" "of raising an error." msgstr "" -#: ../../library/os.rst:2738 +#: ../../library/os.rst:2740 msgid "" "Object whose attributes correspond roughly to the members of the :c:type:" "`stat` structure. It is used for the result of :func:`os.stat`, :func:`os." "fstat` and :func:`os.lstat`." msgstr "" -#: ../../library/os.rst:2742 +#: ../../library/os.rst:2744 msgid "Attributes:" msgstr "" -#: ../../library/os.rst:2746 +#: ../../library/os.rst:2748 msgid "File mode: file type and file mode bits (permissions)." msgstr "" -#: ../../library/os.rst:2750 +#: ../../library/os.rst:2752 msgid "" "Platform dependent, but if non-zero, uniquely identifies the file for a " "given value of ``st_dev``. Typically:" msgstr "" -#: ../../library/os.rst:2753 +#: ../../library/os.rst:2755 msgid "the inode number on Unix," msgstr "" -#: ../../library/os.rst:2754 +#: ../../library/os.rst:2756 msgid "" "the `file index `_ on " "Windows" msgstr "" -#: ../../library/os.rst:2760 +#: ../../library/os.rst:2762 msgid "Identifier of the device on which this file resides." msgstr "" -#: ../../library/os.rst:2764 +#: ../../library/os.rst:2766 msgid "Number of hard links." msgstr "" -#: ../../library/os.rst:2768 +#: ../../library/os.rst:2770 msgid "User identifier of the file owner." msgstr "" -#: ../../library/os.rst:2772 +#: ../../library/os.rst:2774 msgid "Group identifier of the file owner." msgstr "" -#: ../../library/os.rst:2776 +#: ../../library/os.rst:2778 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:2780 +#: ../../library/os.rst:2782 msgid "Timestamps:" msgstr "" -#: ../../library/os.rst:2784 +#: ../../library/os.rst:2786 msgid "Time of most recent access expressed in seconds." msgstr "" -#: ../../library/os.rst:2788 +#: ../../library/os.rst:2790 msgid "Time of most recent content modification expressed in seconds." msgstr "" -#: ../../library/os.rst:2792 ../../library/os.rst:2808 +#: ../../library/os.rst:2794 ../../library/os.rst:2810 msgid "Platform dependent:" msgstr "" -#: ../../library/os.rst:2794 ../../library/os.rst:2810 +#: ../../library/os.rst:2796 ../../library/os.rst:2812 msgid "the time of most recent metadata change on Unix," msgstr "" -#: ../../library/os.rst:2795 +#: ../../library/os.rst:2797 msgid "the time of creation on Windows, expressed in seconds." msgstr "" -#: ../../library/os.rst:2799 +#: ../../library/os.rst:2801 msgid "Time of most recent access expressed in nanoseconds as an integer." msgstr "" -#: ../../library/os.rst:2803 +#: ../../library/os.rst:2805 msgid "" "Time of most recent content modification expressed in nanoseconds as an " "integer." msgstr "" -#: ../../library/os.rst:2811 +#: ../../library/os.rst:2813 msgid "" "the time of creation on Windows, expressed in nanoseconds as an integer." msgstr "" -#: ../../library/os.rst:2816 +#: ../../library/os.rst:2818 msgid "" "The exact meaning and resolution of the :attr:`st_atime`, :attr:`st_mtime`, " "and :attr:`st_ctime` attributes depend on the operating system and the file " @@ -3086,7 +3089,7 @@ msgid "" "only 1-day resolution. See your operating system documentation for details." msgstr "" -#: ../../library/os.rst:2823 +#: ../../library/os.rst:2825 msgid "" "Similarly, although :attr:`st_atime_ns`, :attr:`st_mtime_ns`, and :attr:" "`st_ctime_ns` are always expressed in nanoseconds, many systems do not " @@ -3097,78 +3100,78 @@ msgid "" "attr:`st_atime_ns`, :attr:`st_mtime_ns`, and :attr:`st_ctime_ns`." msgstr "" -#: ../../library/os.rst:2832 +#: ../../library/os.rst:2834 msgid "" "On some Unix systems (such as Linux), the following attributes may also be " "available:" msgstr "" -#: ../../library/os.rst:2837 +#: ../../library/os.rst:2839 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:2842 +#: ../../library/os.rst:2844 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:2847 +#: ../../library/os.rst:2849 msgid "Type of device if an inode device." msgstr "" -#: ../../library/os.rst:2851 +#: ../../library/os.rst:2853 msgid "User defined flags for file." msgstr "" -#: ../../library/os.rst:2853 +#: ../../library/os.rst:2855 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:2858 +#: ../../library/os.rst:2860 msgid "File generation number." msgstr "" -#: ../../library/os.rst:2862 +#: ../../library/os.rst:2864 msgid "Time of file creation." msgstr "" -#: ../../library/os.rst:2864 +#: ../../library/os.rst:2866 msgid "" "On Solaris and derivatives, the following attributes may also be available:" msgstr "" -#: ../../library/os.rst:2869 +#: ../../library/os.rst:2871 msgid "" "String that uniquely identifies the type of the filesystem that contains the " "file." msgstr "" -#: ../../library/os.rst:2872 +#: ../../library/os.rst:2874 msgid "On macOS systems, the following attributes may also be available:" msgstr "" -#: ../../library/os.rst:2876 +#: ../../library/os.rst:2878 msgid "Real size of the file." msgstr "" -#: ../../library/os.rst:2880 +#: ../../library/os.rst:2882 msgid "Creator of the file." msgstr "" -#: ../../library/os.rst:2884 +#: ../../library/os.rst:2886 msgid "File type." msgstr "" -#: ../../library/os.rst:2886 +#: ../../library/os.rst:2888 msgid "On Windows systems, the following attributes are also available:" msgstr "" -#: ../../library/os.rst:2890 +#: ../../library/os.rst:2892 msgid "" "Windows file attributes: ``dwFileAttributes`` member of the " "``BY_HANDLE_FILE_INFORMATION`` structure returned by :c:func:" @@ -3176,21 +3179,21 @@ msgid "" "mod:`stat` module." msgstr "" -#: ../../library/os.rst:2897 +#: ../../library/os.rst:2899 msgid "" "When :attr:`st_file_attributes` has the ``FILE_ATTRIBUTE_REPARSE_POINT`` " "set, this field contains the tag identifying the type of reparse point. See " "the ``IO_REPARSE_TAG_*`` constants in the :mod:`stat` module." msgstr "" -#: ../../library/os.rst:2901 +#: ../../library/os.rst:2903 msgid "" "The standard module :mod:`stat` defines functions and constants that are " "useful for extracting information from a :c:type:`stat` structure. (On " "Windows, some items are filled with dummy values.)" msgstr "" -#: ../../library/os.rst:2905 +#: ../../library/os.rst:2907 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 " @@ -3202,35 +3205,35 @@ msgid "" "class:`stat_result` as a tuple always returns integers." msgstr "" -#: ../../library/os.rst:2914 +#: ../../library/os.rst:2916 msgid "" "Added the :attr:`st_atime_ns`, :attr:`st_mtime_ns`, and :attr:`st_ctime_ns` " "members." msgstr "" -#: ../../library/os.rst:2918 +#: ../../library/os.rst:2920 msgid "Added the :attr:`st_file_attributes` member on Windows." msgstr "" -#: ../../library/os.rst:2921 +#: ../../library/os.rst:2923 msgid "Windows now returns the file index as :attr:`st_ino` when available." msgstr "" -#: ../../library/os.rst:2925 +#: ../../library/os.rst:2927 msgid "Added the :attr:`st_fstype` member to Solaris/derivatives." msgstr "" -#: ../../library/os.rst:2928 +#: ../../library/os.rst:2930 msgid "Added the :attr:`st_reparse_tag` member on Windows." msgstr "" -#: ../../library/os.rst:2931 +#: ../../library/os.rst:2933 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:2938 +#: ../../library/os.rst:2940 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 path, and " @@ -3240,7 +3243,7 @@ msgid "" "`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." msgstr "" -#: ../../library/os.rst:2945 +#: ../../library/os.rst:2947 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-" @@ -3248,7 +3251,7 @@ msgid "" "are disabled or not supported." msgstr "" -#: ../../library/os.rst:2950 +#: ../../library/os.rst:2952 msgid "" "Additional module-level constants are defined for GNU/glibc based systems. " "These are :const:`ST_NODEV` (disallow access to device special files), :" @@ -3261,11 +3264,11 @@ msgid "" "relative to mtime/ctime)." msgstr "" -#: ../../library/os.rst:2963 +#: ../../library/os.rst:2965 msgid "The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added." msgstr "新增 :const:`ST_RDONLY` 與 :const:`ST_NOSUID` 常數。" -#: ../../library/os.rst:2969 +#: ../../library/os.rst:2971 msgid "" "The :const:`ST_NODEV`, :const:`ST_NOEXEC`, :const:`ST_SYNCHRONOUS`, :const:" "`ST_MANDLOCK`, :const:`ST_WRITE`, :const:`ST_APPEND`, :const:" @@ -3273,11 +3276,11 @@ msgid "" "`ST_RELATIME` constants were added." msgstr "" -#: ../../library/os.rst:2978 +#: ../../library/os.rst:2980 msgid "Added :attr:`f_fsid`." msgstr "新增 :attr:`f_fsid`\\ 。" -#: ../../library/os.rst:2984 +#: ../../library/os.rst:2986 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept an open file descriptor for their *dir_fd* parameter. Different " @@ -3289,7 +3292,7 @@ msgid "" "(Specifying ``None`` for *dir_fd* is always supported on all platforms.)" msgstr "" -#: ../../library/os.rst:2994 +#: ../../library/os.rst:2996 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 " @@ -3297,13 +3300,13 @@ msgid "" "open file descriptors for *dir_fd* on the local platform::" msgstr "" -#: ../../library/os.rst:3001 +#: ../../library/os.rst:3003 msgid "" "Currently *dir_fd* parameters only work on Unix platforms; none of them work " "on Windows." msgstr "" -#: ../../library/os.rst:3009 +#: ../../library/os.rst:3011 msgid "" "A :class:`set` object indicating whether :func:`os.access` permits " "specifying ``True`` for its *effective_ids* parameter on the local platform. " @@ -3312,19 +3315,19 @@ msgid "" "func:`os.access`; otherwise it will be empty." msgstr "" -#: ../../library/os.rst:3015 +#: ../../library/os.rst:3017 msgid "" "This expression evaluates to ``True`` if :func:`os.access` supports " "``effective_ids=True`` on the local platform::" msgstr "" -#: ../../library/os.rst:3020 +#: ../../library/os.rst:3022 msgid "" "Currently *effective_ids* is only supported on Unix platforms; it does not " "work on Windows." msgstr "" -#: ../../library/os.rst:3028 +#: ../../library/os.rst:3030 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 " @@ -3333,7 +3336,7 @@ msgid "" "*path* arguments is not available on all platforms Python supports." msgstr "" -#: ../../library/os.rst:3035 +#: ../../library/os.rst:3037 msgid "" "To determine whether a particular function permits specifying an open file " "descriptor for its *path* parameter, use the ``in`` operator on " @@ -3342,7 +3345,7 @@ msgid "" "platform::" msgstr "" -#: ../../library/os.rst:3048 +#: ../../library/os.rst:3050 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept ``False`` for their *follow_symlinks* parameter on the local " @@ -3355,7 +3358,7 @@ msgid "" "on all platforms.)" msgstr "" -#: ../../library/os.rst:3058 +#: ../../library/os.rst:3060 msgid "" "To check whether a particular function accepts ``False`` for its " "*follow_symlinks* parameter, use the ``in`` operator on " @@ -3364,11 +3367,11 @@ msgid "" "stat` on the local platform::" msgstr "" -#: ../../library/os.rst:3071 +#: ../../library/os.rst:3073 msgid "Create a symbolic link pointing to *src* named *dst*." msgstr "" -#: ../../library/os.rst:3073 +#: ../../library/os.rst:3075 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 " @@ -3378,7 +3381,7 @@ msgid "" "ignored." msgstr "" -#: ../../library/os.rst:3084 +#: ../../library/os.rst:3086 msgid "" "On newer versions of Windows 10, unprivileged accounts can create symlinks " "if Developer Mode is enabled. When Developer Mode is not available/enabled, " @@ -3386,7 +3389,7 @@ msgid "" "must be run as an administrator." msgstr "" -#: ../../library/os.rst:3090 +#: ../../library/os.rst:3092 msgid "" ":exc:`OSError` is raised when the function is called by an unprivileged user." msgstr "" @@ -3397,21 +3400,21 @@ msgid "" "``src``, ``dst``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:3103 +#: ../../library/os.rst:3105 msgid "" "Added the *dir_fd* argument, and now allow *target_is_directory* on non-" "Windows platforms." msgstr "" -#: ../../library/os.rst:3110 +#: ../../library/os.rst:3112 msgid "Added support for unelevated symlinks on Windows with Developer Mode." msgstr "" -#: ../../library/os.rst:3116 +#: ../../library/os.rst:3118 msgid "Force write of everything to disk." msgstr "" -#: ../../library/os.rst:3125 +#: ../../library/os.rst:3127 msgid "" "Truncate the file corresponding to *path*, so that it is at most *length* " "bytes in size." @@ -3423,46 +3426,46 @@ msgid "" "``path``, ``length``." msgstr "" -#: ../../library/os.rst:3145 +#: ../../library/os.rst:3147 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:3161 +#: ../../library/os.rst:3163 msgid "Set the access and modified times of the file specified by *path*." msgstr "" -#: ../../library/os.rst:3163 +#: ../../library/os.rst:3165 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:3166 +#: ../../library/os.rst:3168 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:3169 +#: ../../library/os.rst:3171 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:3172 +#: ../../library/os.rst:3174 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:3176 +#: ../../library/os.rst:3178 msgid "It is an error to specify tuples for both *times* and *ns*." msgstr "" -#: ../../library/os.rst:3178 +#: ../../library/os.rst:3180 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 " @@ -3478,13 +3481,13 @@ msgid "" "``path``, ``times``, ``ns``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:3191 +#: ../../library/os.rst:3193 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd*, *follow_symlinks*, and *ns* parameters." msgstr "" -#: ../../library/os.rst:3205 +#: ../../library/os.rst:3207 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* " @@ -3492,7 +3495,7 @@ msgid "" "filenames)``." msgstr "" -#: ../../library/os.rst:3210 +#: ../../library/os.rst:3212 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 " @@ -3506,7 +3509,7 @@ msgid "" "unspecified." msgstr "" -#: ../../library/os.rst:3221 +#: ../../library/os.rst:3223 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 " @@ -3517,7 +3520,7 @@ msgid "" "its subdirectories are generated." msgstr "" -#: ../../library/os.rst:3229 +#: ../../library/os.rst:3231 msgid "" "When *topdown* is ``True``, the caller can modify the *dirnames* list in-" "place (perhaps using :keyword:`del` or slice assignment), and :func:`walk` " @@ -3530,7 +3533,7 @@ msgid "" "itself is generated." msgstr "" -#: ../../library/os.rst:3238 +#: ../../library/os.rst:3240 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 " @@ -3540,35 +3543,35 @@ msgid "" "object." msgstr "" -#: ../../library/os.rst:3244 +#: ../../library/os.rst:3246 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:3250 +#: ../../library/os.rst:3252 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:3256 +#: ../../library/os.rst:3258 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:3260 ../../library/os.rst:3321 +#: ../../library/os.rst:3262 ../../library/os.rst:3323 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:3273 +#: ../../library/os.rst:3275 msgid "" "In the next example (simple implementation of :func:`shutil.rmtree`), " "walking the tree bottom-up is essential, :func:`rmdir` doesn't allow " @@ -3581,25 +3584,25 @@ msgid "" "``top``, ``topdown``, ``onerror``, ``followlinks``." msgstr "" -#: ../../library/os.rst:3290 +#: ../../library/os.rst:3292 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:3304 +#: ../../library/os.rst:3306 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:3307 +#: ../../library/os.rst:3309 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:3310 +#: ../../library/os.rst:3312 msgid "" "This function always supports :ref:`paths relative to directory descriptors " "` and :ref:`not following symlinks `. Note however " @@ -3607,14 +3610,14 @@ msgid "" "*follow_symlinks* is ``False``." msgstr "" -#: ../../library/os.rst:3317 +#: ../../library/os.rst:3319 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:3334 +#: ../../library/os.rst:3336 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::" @@ -3626,11 +3629,11 @@ msgid "" "``top``, ``topdown``, ``onerror``, ``follow_symlinks``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:3358 +#: ../../library/os.rst:3360 msgid "Added support for :class:`bytes` paths." msgstr "" -#: ../../library/os.rst:3364 +#: ../../library/os.rst:3366 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 " @@ -3638,7 +3641,7 @@ msgid "" "descriptor is :ref:`non-inheritable `." msgstr "" -#: ../../library/os.rst:3369 +#: ../../library/os.rst:3371 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/" @@ -3648,11 +3651,11 @@ msgid "" "side effects." msgstr "" -#: ../../library/os.rst:3377 +#: ../../library/os.rst:3379 msgid ":ref:`Availability `: Linux >= 3.17 with glibc >= 2.27." msgstr ":ref:`適用 `:Linux 3.17 以上且具有 glibc 2.27 以上。" -#: ../../library/os.rst:3399 +#: ../../library/os.rst:3401 msgid "These flags can be passed to :func:`memfd_create`." msgstr "" @@ -3661,11 +3664,11 @@ msgstr "" msgid ":ref:`Availability `: Linux >= 3.17 with glibc >= 2.27" msgstr ":ref:`適用 `:Linux 3.17 以上且具有 glibc 2.27 以上" -#: ../../library/os.rst:3403 +#: ../../library/os.rst:3405 msgid "The ``MFD_HUGE*`` flags are only available since Linux 4.14." msgstr "" -#: ../../library/os.rst:3410 +#: ../../library/os.rst:3412 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." @@ -3674,7 +3677,7 @@ msgid "" "ref:`non-inheritable `." msgstr "" -#: ../../library/os.rst:3416 +#: ../../library/os.rst:3418 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 " @@ -3682,87 +3685,87 @@ msgid "" "integer with a maximum value of 2\\ :sup:`64`\\ -\\ 2." msgstr "" -#: ../../library/os.rst:3421 +#: ../../library/os.rst:3423 msgid "" "*flags* can be constructed from :const:`EFD_CLOEXEC`, :const:`EFD_NONBLOCK`, " "and :const:`EFD_SEMAPHORE`." msgstr "" -#: ../../library/os.rst:3424 +#: ../../library/os.rst:3426 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:3427 +#: ../../library/os.rst:3429 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:3431 +#: ../../library/os.rst:3433 msgid "" "If the event counter is zero and :const:`EFD_NONBLOCK` is not specified, :" "func:`eventfd_read` blocks." msgstr "" -#: ../../library/os.rst:3434 +#: ../../library/os.rst:3436 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:3456 +#: ../../library/os.rst:3458 msgid ":ref:`Availability `: Linux >= 2.6.27 with glibc >= 2.8" msgstr ":ref:`適用 `:Linux 2.6.27 以上且具有 glibc 2.8 以上" -#: ../../library/os.rst:3461 +#: ../../library/os.rst:3463 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:3465 ../../library/os.rst:3474 -#: ../../library/os.rst:3482 ../../library/os.rst:3491 +#: ../../library/os.rst:3467 ../../library/os.rst:3476 +#: ../../library/os.rst:3484 ../../library/os.rst:3493 msgid ":ref:`Availability `: Linux >= 2.6.27" msgstr ":ref:`適用 `:Linux 2.6.27 以上" -#: ../../library/os.rst:3470 +#: ../../library/os.rst:3472 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:3479 +#: ../../library/os.rst:3481 msgid "Set close-on-exec flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../library/os.rst:3487 +#: ../../library/os.rst:3489 msgid "" "Set :const:`O_NONBLOCK` status flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../library/os.rst:3496 +#: ../../library/os.rst:3498 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:3500 +#: ../../library/os.rst:3502 msgid ":ref:`Availability `: Linux >= 2.6.30" msgstr ":ref:`適用 `:Linux 2.6.30 以上" -#: ../../library/os.rst:3505 +#: ../../library/os.rst:3507 msgid "Linux extended attributes" msgstr "" -#: ../../library/os.rst:3509 +#: ../../library/os.rst:3511 msgid "These functions are all available on Linux only." msgstr "" -#: ../../library/os.rst:3513 +#: ../../library/os.rst:3515 msgid "" "Return the value of the extended filesystem attribute *attribute* for " "*path*. *attribute* can be bytes or str (directly or indirectly through the :" @@ -3776,12 +3779,12 @@ msgid "" "``path``, ``attribute``." msgstr "" -#: ../../library/os.rst:3523 ../../library/os.rst:3555 -#: ../../library/os.rst:3580 +#: ../../library/os.rst:3525 ../../library/os.rst:3557 +#: ../../library/os.rst:3582 msgid "Accepts a :term:`path-like object` for *path* and *attribute*." msgstr "" -#: ../../library/os.rst:3529 +#: ../../library/os.rst:3531 msgid "" "Return a list of the extended filesystem attributes on *path*. The " "attributes in the list are represented as strings decoded with the " @@ -3795,7 +3798,7 @@ msgid "" "``path``." msgstr "" -#: ../../library/os.rst:3545 +#: ../../library/os.rst:3547 msgid "" "Removes the extended filesystem attribute *attribute* from *path*. " "*attribute* should be bytes or str (directly or indirectly through the :" @@ -3809,7 +3812,7 @@ msgid "" "``path``, ``attribute``." msgstr "" -#: ../../library/os.rst:3561 +#: ../../library/os.rst:3563 msgid "" "Set the extended filesystem attribute *attribute* on *path* to *value*. " "*attribute* must be a bytes or str with no embedded NULs (directly or " @@ -3821,7 +3824,7 @@ msgid "" "will not be created and ``EEXISTS`` will be raised." msgstr "" -#: ../../library/os.rst:3575 +#: ../../library/os.rst:3577 msgid "" "A bug in Linux kernel versions less than 2.6.39 caused the flags argument to " "be ignored on some filesystems." @@ -3833,33 +3836,33 @@ msgid "" "``path``, ``attribute``, ``value``, ``flags``." msgstr "" -#: ../../library/os.rst:3586 +#: ../../library/os.rst:3588 msgid "" "The maximum size the value of an extended attribute can be. Currently, this " "is 64 KiB on Linux." msgstr "" -#: ../../library/os.rst:3592 +#: ../../library/os.rst:3594 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:3598 +#: ../../library/os.rst:3600 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:3605 +#: ../../library/os.rst:3607 msgid "Process Management" msgstr "" -#: ../../library/os.rst:3607 +#: ../../library/os.rst:3609 msgid "These functions may be used to create and manage processes." msgstr "" -#: ../../library/os.rst:3609 +#: ../../library/os.rst:3611 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 " @@ -3870,7 +3873,7 @@ msgid "" "standard output; ``foo`` will seem to be ignored." msgstr "" -#: ../../library/os.rst:3620 +#: ../../library/os.rst:3622 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 " @@ -3879,24 +3882,24 @@ msgid "" "`SIGABRT` with :func:`signal.signal`." msgstr "" -#: ../../library/os.rst:3629 +#: ../../library/os.rst:3631 msgid "Add a path to the DLL search path." msgstr "" -#: ../../library/os.rst:3631 +#: ../../library/os.rst:3633 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:3635 +#: ../../library/os.rst:3637 msgid "" "Remove the directory by calling **close()** on the returned object or using " "it in a :keyword:`with` statement." msgstr "" -#: ../../library/os.rst:3638 +#: ../../library/os.rst:3640 msgid "" "See the `Microsoft documentation `_ for more information about how " @@ -3909,7 +3912,7 @@ msgid "" "argument ``path``." msgstr "" -#: ../../library/os.rst:3646 +#: ../../library/os.rst:3648 msgid "" "Previous versions of CPython would resolve DLLs using the default behavior " "for the current process. This led to inconsistencies, such as only sometimes " @@ -3917,14 +3920,14 @@ msgid "" "such as ``AddDllDirectory`` having no effect." msgstr "" -#: ../../library/os.rst:3653 +#: ../../library/os.rst:3655 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:3668 +#: ../../library/os.rst:3670 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 " @@ -3932,7 +3935,7 @@ msgid "" "reported as :exc:`OSError` exceptions." msgstr "" -#: ../../library/os.rst:3673 +#: ../../library/os.rst:3675 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 " @@ -3940,7 +3943,7 @@ msgid "" "fsync` before calling an :func:`exec\\* ` function." msgstr "" -#: ../../library/os.rst:3679 +#: ../../library/os.rst:3681 msgid "" "The \"l\" and \"v\" variants of the :func:`exec\\* ` functions differ " "in how command-line arguments are passed. The \"l\" variants are perhaps " @@ -3953,7 +3956,7 @@ msgid "" "enforced." msgstr "" -#: ../../library/os.rst:3688 +#: ../../library/os.rst:3690 msgid "" "The variants which include a \"p\" near the end (:func:`execlp`, :func:" "`execlpe`, :func:`execvp`, and :func:`execvpe`) will use the :envvar:`PATH` " @@ -3966,7 +3969,7 @@ msgid "" "absolute or relative path." msgstr "" -#: ../../library/os.rst:3698 +#: ../../library/os.rst:3700 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 " @@ -3976,7 +3979,7 @@ msgid "" "process to inherit the environment of the current process." msgstr "" -#: ../../library/os.rst:3705 +#: ../../library/os.rst:3707 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 " @@ -3991,25 +3994,25 @@ msgid "" "``path``, ``args``, ``env``." msgstr "" -#: ../../library/os.rst:3714 +#: ../../library/os.rst:3716 msgid "" "Added support for specifying *path* as an open file descriptor for :func:" "`execve`." msgstr "" -#: ../../library/os.rst:3723 +#: ../../library/os.rst:3725 msgid "" "Exit the process with status *n*, without calling cleanup handlers, flushing " "stdio buffers, etc." msgstr "" -#: ../../library/os.rst:3728 +#: ../../library/os.rst:3730 msgid "" "The standard way to exit is ``sys.exit(n)``. :func:`_exit` should normally " "only be used in the child process after a :func:`fork`." msgstr "" -#: ../../library/os.rst:3731 +#: ../../library/os.rst:3733 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 " @@ -4017,104 +4020,104 @@ msgid "" "delivery program." msgstr "" -#: ../../library/os.rst:3737 +#: ../../library/os.rst:3739 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:3744 +#: ../../library/os.rst:3746 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:3752 +#: ../../library/os.rst:3754 msgid "" "Exit code that means the command was used incorrectly, such as when the " "wrong number of arguments are given." msgstr "" -#: ../../library/os.rst:3760 +#: ../../library/os.rst:3762 msgid "Exit code that means the input data was incorrect." msgstr "" -#: ../../library/os.rst:3767 +#: ../../library/os.rst:3769 msgid "Exit code that means an input file did not exist or was not readable." msgstr "" -#: ../../library/os.rst:3774 +#: ../../library/os.rst:3776 msgid "Exit code that means a specified user did not exist." msgstr "" -#: ../../library/os.rst:3781 +#: ../../library/os.rst:3783 msgid "Exit code that means a specified host did not exist." msgstr "" -#: ../../library/os.rst:3788 +#: ../../library/os.rst:3790 msgid "Exit code that means that a required service is unavailable." msgstr "" -#: ../../library/os.rst:3795 +#: ../../library/os.rst:3797 msgid "Exit code that means an internal software error was detected." msgstr "" -#: ../../library/os.rst:3802 +#: ../../library/os.rst:3804 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:3810 +#: ../../library/os.rst:3812 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:3818 +#: ../../library/os.rst:3820 msgid "Exit code that means a user specified output file could not be created." msgstr "" -#: ../../library/os.rst:3825 +#: ../../library/os.rst:3827 msgid "" "Exit code that means that an error occurred while doing I/O on some file." msgstr "" -#: ../../library/os.rst:3832 +#: ../../library/os.rst:3834 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:3841 +#: ../../library/os.rst:3843 msgid "" "Exit code that means that a protocol exchange was illegal, invalid, or not " "understood." msgstr "" -#: ../../library/os.rst:3849 +#: ../../library/os.rst:3851 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:3857 +#: ../../library/os.rst:3859 msgid "Exit code that means that some kind of configuration error occurred." msgstr "" -#: ../../library/os.rst:3864 +#: ../../library/os.rst:3866 msgid "Exit code that means something like \"an entry was not found\"." msgstr "" -#: ../../library/os.rst:3871 +#: ../../library/os.rst:3873 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:3874 +#: ../../library/os.rst:3876 msgid "" "Note that some platforms including FreeBSD <= 6.3 and Cygwin have known " "issues when using ``fork()`` from a thread." @@ -4125,17 +4128,17 @@ msgid "" "Raises an :ref:`auditing event ` ``os.fork`` with no arguments." msgstr "" -#: ../../library/os.rst:3879 +#: ../../library/os.rst:3881 msgid "" "Calling ``fork()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../library/os.rst:3885 +#: ../../library/os.rst:3887 msgid "See :mod:`ssl` for applications that use the SSL module with fork()." msgstr "" -#: ../../library/os.rst:3892 +#: ../../library/os.rst:3894 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, " @@ -4149,19 +4152,19 @@ msgid "" "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr "" -#: ../../library/os.rst:3900 +#: ../../library/os.rst:3902 msgid "" "Calling ``forkpty()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../library/os.rst:3913 +#: ../../library/os.rst:3915 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:3916 +#: ../../library/os.rst:3918 msgid "" "Windows: The :data:`signal.CTRL_C_EVENT` and :data:`signal.CTRL_BREAK_EVENT` " "signals are special signals which can only be sent to console processes " @@ -4171,7 +4174,7 @@ msgid "" "version of :func:`kill` additionally takes process handles to be killed." msgstr "" -#: ../../library/os.rst:3924 +#: ../../library/os.rst:3926 msgid "See also :func:`signal.pthread_kill`." msgstr "另請參閱 :func:`signal.pthread_kill`\\ 。" @@ -4181,11 +4184,11 @@ msgid "" "``pid``, ``sig``." msgstr "" -#: ../../library/os.rst:3930 +#: ../../library/os.rst:3932 msgid "Windows support." msgstr "" -#: ../../library/os.rst:3940 +#: ../../library/os.rst:3942 msgid "Send the signal *sig* to the process group *pgid*." msgstr "" @@ -4195,12 +4198,12 @@ msgid "" "``pgid``, ``sig``." msgstr "" -#: ../../library/os.rst:3949 +#: ../../library/os.rst:3951 msgid "" "Add *increment* to the process's \"niceness\". Return the new niceness." msgstr "" -#: ../../library/os.rst:3956 +#: ../../library/os.rst:3958 msgid "" "Return a file descriptor referring to the process *pid*. This descriptor " "can be used to perform process management without races and signals. The " @@ -4208,21 +4211,21 @@ msgid "" "currently defined." msgstr "" -#: ../../library/os.rst:3961 +#: ../../library/os.rst:3963 msgid "See the :manpage:`pidfd_open(2)` man page for more details." msgstr "更多細節請見 :manpage:`pidfd_open(2)` 手冊頁。" -#: ../../library/os.rst:3963 +#: ../../library/os.rst:3965 msgid ":ref:`Availability `: Linux >= 5.3" msgstr ":ref:`適用 `:Linux 5.3 以上" -#: ../../library/os.rst:3969 +#: ../../library/os.rst:3971 msgid "" "Lock program segments into memory. The value of *op* (defined in ````) determines which segments are locked." msgstr "" -#: ../../library/os.rst:3977 +#: ../../library/os.rst:3979 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 " @@ -4232,7 +4235,7 @@ msgid "" "rather than bytes." msgstr "" -#: ../../library/os.rst:3985 +#: ../../library/os.rst:3987 msgid "" "The ``close`` method returns :const:`None` if the subprocess exited " "successfully, or the subprocess's return code if there was an error. On " @@ -4244,60 +4247,60 @@ msgid "" "contains the signed integer return code from the child process." msgstr "" -#: ../../library/os.rst:3995 +#: ../../library/os.rst:3997 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:4000 +#: ../../library/os.rst:4002 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:4005 +#: ../../library/os.rst:4007 msgid ":ref:`Availability `: not Emscripten, not WASI." msgstr ":ref:`適用 `:非 Emscripten、非 WASI。" -#: ../../library/os.rst:4007 +#: ../../library/os.rst:4009 msgid "" "The :ref:`Python UTF-8 Mode ` affects encodings used for *cmd* " "and pipe contents." msgstr "" -#: ../../library/os.rst:4010 +#: ../../library/os.rst:4012 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:4019 +#: ../../library/os.rst:4021 msgid "Wraps the :c:func:`posix_spawn` C library API for use from Python." msgstr "" -#: ../../library/os.rst:4021 +#: ../../library/os.rst:4023 msgid "" "Most users should use :func:`subprocess.run` instead of :func:`posix_spawn`." msgstr "" -#: ../../library/os.rst:4023 +#: ../../library/os.rst:4025 msgid "" "The positional-only arguments *path*, *args*, and *env* are similar to :func:" "`execve`." msgstr "" -#: ../../library/os.rst:4026 +#: ../../library/os.rst:4028 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:4030 +#: ../../library/os.rst:4032 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 " @@ -4306,31 +4309,31 @@ msgid "" "describing the remaining tuple elements:" msgstr "" -#: ../../library/os.rst:4038 +#: ../../library/os.rst:4040 msgid "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" msgstr "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" -#: ../../library/os.rst:4040 +#: ../../library/os.rst:4042 msgid "Performs ``os.dup2(os.open(path, flags, mode), fd)``." msgstr "" -#: ../../library/os.rst:4044 +#: ../../library/os.rst:4046 msgid "(``os.POSIX_SPAWN_CLOSE``, *fd*)" msgstr "(``os.POSIX_SPAWN_CLOSE``, *fd*)" -#: ../../library/os.rst:4046 +#: ../../library/os.rst:4048 msgid "Performs ``os.close(fd)``." msgstr "" -#: ../../library/os.rst:4050 +#: ../../library/os.rst:4052 msgid "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" msgstr "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" -#: ../../library/os.rst:4052 +#: ../../library/os.rst:4054 msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "" -#: ../../library/os.rst:4054 +#: ../../library/os.rst:4056 msgid "" "These tuples correspond to the C library :c:func:" "`posix_spawn_file_actions_addopen`, :c:func:" @@ -4339,7 +4342,7 @@ msgid "" "`posix_spawn` call itself." msgstr "" -#: ../../library/os.rst:4060 +#: ../../library/os.rst:4062 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 " @@ -4348,7 +4351,7 @@ msgid "" "corresponds to the C library :c:data:`POSIX_SPAWN_SETPGROUP` flag." msgstr "" -#: ../../library/os.rst:4066 +#: ../../library/os.rst:4068 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 " @@ -4359,7 +4362,7 @@ msgid "" "library :c:data:`POSIX_SPAWN_RESETIDS` flag." msgstr "" -#: ../../library/os.rst:4074 +#: ../../library/os.rst:4076 msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " "``posix_spawn``. *setsid* requires :c:data:`POSIX_SPAWN_SETSID` or :c:data:" @@ -4367,7 +4370,7 @@ msgid "" "raised." msgstr "" -#: ../../library/os.rst:4079 +#: ../../library/os.rst:4081 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 " @@ -4375,14 +4378,14 @@ msgid "" "`POSIX_SPAWN_SETSIGMASK` flag." msgstr "" -#: ../../library/os.rst:4084 +#: ../../library/os.rst:4086 msgid "" "The *sigdef* argument will reset the disposition of all signals in the set " "specified. This argument corresponds to the C library :c:data:" "`POSIX_SPAWN_SETSIGDEF` flag." msgstr "" -#: ../../library/os.rst:4088 +#: ../../library/os.rst:4090 msgid "" "The *scheduler* argument must be a tuple containing the (optional) scheduler " "policy and an instance of :class:`sched_param` with the scheduler " @@ -4398,11 +4401,11 @@ msgid "" "``path``, ``argv``, ``env``." msgstr "" -#: ../../library/os.rst:4105 +#: ../../library/os.rst:4107 msgid "Wraps the :c:func:`posix_spawnp` C library API for use from Python." msgstr "" -#: ../../library/os.rst:4107 +#: ../../library/os.rst:4109 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` " @@ -4414,61 +4417,61 @@ msgstr "" msgid ":ref:`Availability `: POSIX, not Emscripten, not WASI." msgstr ":ref:`適用 `:POSIX、非 Emscripten、非 WASI。" -#: ../../library/os.rst:4117 +#: ../../library/os.rst:4119 msgid "See :func:`posix_spawn` documentation." msgstr "" -#: ../../library/os.rst:4123 +#: ../../library/os.rst:4125 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:4128 +#: ../../library/os.rst:4130 msgid "*before* is a function called before forking a child process." msgstr "" -#: ../../library/os.rst:4129 +#: ../../library/os.rst:4131 msgid "" "*after_in_parent* is a function called from the parent process after forking " "a child process." msgstr "" -#: ../../library/os.rst:4131 +#: ../../library/os.rst:4133 msgid "*after_in_child* is a function called from the child process." msgstr "" -#: ../../library/os.rst:4133 +#: ../../library/os.rst:4135 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:4137 +#: ../../library/os.rst:4139 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:4142 +#: ../../library/os.rst:4144 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:4146 +#: ../../library/os.rst:4148 msgid "There is no way to unregister a function." msgstr "" -#: ../../library/os.rst:4162 +#: ../../library/os.rst:4164 msgid "Execute the program *path* in a new process." msgstr "" -#: ../../library/os.rst:4164 +#: ../../library/os.rst:4166 msgid "" "(Note that the :mod:`subprocess` module provides more powerful facilities " "for spawning new processes and retrieving their results; using that module " @@ -4476,7 +4479,7 @@ msgid "" "`subprocess-replacements` section.)" msgstr "" -#: ../../library/os.rst:4169 +#: ../../library/os.rst:4171 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 " @@ -4485,13 +4488,13 @@ msgid "" "handle, so can be used with the :func:`waitpid` function." msgstr "" -#: ../../library/os.rst:4175 +#: ../../library/os.rst:4177 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:4178 +#: ../../library/os.rst:4180 msgid "" "The \"l\" and \"v\" variants of the :func:`spawn\\* ` functions " "differ in how command-line arguments are passed. The \"l\" variants are " @@ -4503,7 +4506,7 @@ msgid "" "to the child process must start with the name of the command being run." msgstr "" -#: ../../library/os.rst:4187 +#: ../../library/os.rst:4189 msgid "" "The variants which include a second \"p\" near the end (:func:`spawnlp`, :" "func:`spawnlpe`, :func:`spawnvp`, and :func:`spawnvpe`) will use the :envvar:" @@ -4516,7 +4519,7 @@ msgid "" "appropriate absolute or relative path." msgstr "" -#: ../../library/os.rst:4197 +#: ../../library/os.rst:4199 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 " @@ -4528,7 +4531,7 @@ msgid "" "values will cause the function to fail, with a return value of ``127``." msgstr "" -#: ../../library/os.rst:4206 +#: ../../library/os.rst:4208 msgid "" "As an example, the following calls to :func:`spawnlp` and :func:`spawnvpe` " "are equivalent::" @@ -4540,7 +4543,7 @@ msgid "" "``mode``, ``path``, ``args``, ``env``." msgstr "" -#: ../../library/os.rst:4219 +#: ../../library/os.rst:4221 msgid "" ":func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are " "not available on Windows. :func:`spawnle` and :func:`spawnve` are not " @@ -4548,7 +4551,7 @@ msgid "" "instead." msgstr "" -#: ../../library/os.rst:4231 +#: ../../library/os.rst:4233 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If either of these values is given, the :func:" @@ -4556,7 +4559,7 @@ msgid "" "created, with the process id as the return value." msgstr "" -#: ../../library/os.rst:4241 +#: ../../library/os.rst:4243 msgid "" "Possible value for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If this is given as *mode*, the :func:`spawn\\*` " @@ -4565,7 +4568,7 @@ msgid "" "signal`` if a signal kills the process." msgstr "" -#: ../../library/os.rst:4253 +#: ../../library/os.rst:4255 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. These are less portable than those listed above. :" @@ -4575,11 +4578,11 @@ msgid "" "function will not return." msgstr "" -#: ../../library/os.rst:4264 +#: ../../library/os.rst:4266 msgid "Start a file with its associated application." msgstr "" -#: ../../library/os.rst:4266 +#: ../../library/os.rst:4268 msgid "" "When *operation* is not specified or ``'open'``, this acts like double-" "clicking the file in Windows Explorer, or giving the file name as an " @@ -4588,7 +4591,7 @@ msgid "" "associated." msgstr "" -#: ../../library/os.rst:4271 +#: ../../library/os.rst:4273 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 " @@ -4596,28 +4599,28 @@ msgid "" "``'explore'`` and ``'find'`` (to be used on directories)." msgstr "" -#: ../../library/os.rst:4276 +#: ../../library/os.rst:4278 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:4280 +#: ../../library/os.rst:4282 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:4284 +#: ../../library/os.rst:4286 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:4288 +#: ../../library/os.rst:4290 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 " @@ -4628,7 +4631,7 @@ msgid "" "encoded for Win32." msgstr "" -#: ../../library/os.rst:4296 +#: ../../library/os.rst:4298 msgid "" "To reduce interpreter startup overhead, the Win32 :c:func:`ShellExecute` " "function is not resolved until this function is first called. If the " @@ -4647,13 +4650,13 @@ msgid "" "``path``, ``operation``, ``arguments``, ``cwd``, ``show_cmd``." msgstr "" -#: ../../library/os.rst:4306 +#: ../../library/os.rst:4308 msgid "" "Added the *arguments*, *cwd* and *show_cmd* arguments, and the ``os." "startfile/2`` audit event." msgstr "" -#: ../../library/os.rst:4313 +#: ../../library/os.rst:4315 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 " @@ -4664,13 +4667,13 @@ msgid "" "value of the Python function is system-dependent." msgstr "" -#: ../../library/os.rst:4321 +#: ../../library/os.rst:4323 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:4324 +#: ../../library/os.rst:4326 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 :" @@ -4679,7 +4682,7 @@ msgid "" "shell documentation." msgstr "" -#: ../../library/os.rst:4330 +#: ../../library/os.rst:4332 msgid "" "The :mod:`subprocess` module provides more powerful facilities for spawning " "new processes and retrieving their results; using that module is preferable " @@ -4687,7 +4690,7 @@ msgid "" "the :mod:`subprocess` documentation for some helpful recipes." msgstr "" -#: ../../library/os.rst:4335 +#: ../../library/os.rst:4337 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 " @@ -4700,40 +4703,40 @@ msgid "" "``command``." msgstr "" -#: ../../library/os.rst:4346 +#: ../../library/os.rst:4348 msgid "" "Returns the current global process times. The return value is an object with " "five attributes:" msgstr "" -#: ../../library/os.rst:4349 +#: ../../library/os.rst:4351 msgid ":attr:`!user` - user time" msgstr "" -#: ../../library/os.rst:4350 +#: ../../library/os.rst:4352 msgid ":attr:`!system` - system time" msgstr ":attr:`!system` - 系統時間" -#: ../../library/os.rst:4351 +#: ../../library/os.rst:4353 msgid ":attr:`!children_user` - user time of all child processes" msgstr "" -#: ../../library/os.rst:4352 +#: ../../library/os.rst:4354 msgid ":attr:`!children_system` - system time of all child processes" msgstr "" -#: ../../library/os.rst:4353 +#: ../../library/os.rst:4355 msgid ":attr:`!elapsed` - elapsed real time since a fixed point in the past" msgstr "" -#: ../../library/os.rst:4355 +#: ../../library/os.rst:4357 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:4359 +#: ../../library/os.rst:4361 msgid "" "See the Unix manual page :manpage:`times(2)` and `times(3) `_ manual page on Unix or `the " @@ -4743,7 +4746,7 @@ msgid "" "attributes are zero." msgstr "" -#: ../../library/os.rst:4373 +#: ../../library/os.rst:4375 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 " @@ -4752,83 +4755,83 @@ msgid "" "if a core file was produced." msgstr "" -#: ../../library/os.rst:4379 +#: ../../library/os.rst:4381 msgid "" "If there are no children that could be waited for, :exc:`ChildProcessError` " "is raised." msgstr "" -#: ../../library/os.rst:4382 ../../library/os.rst:4454 +#: ../../library/os.rst:4384 ../../library/os.rst:4456 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exit code." msgstr "" -#: ../../library/os.rst:4389 +#: ../../library/os.rst:4391 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:4396 +#: ../../library/os.rst:4398 msgid "Wait for the completion of a child process." msgstr "" -#: ../../library/os.rst:4398 +#: ../../library/os.rst:4400 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:4401 +#: ../../library/os.rst:4403 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:4405 +#: ../../library/os.rst:4407 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:4408 +#: ../../library/os.rst:4410 msgid ":attr:`!si_pid` (process ID)" msgstr "" -#: ../../library/os.rst:4409 +#: ../../library/os.rst:4411 msgid ":attr:`!si_uid` (real user ID of the child)" msgstr "" -#: ../../library/os.rst:4410 +#: ../../library/os.rst:4412 msgid ":attr:`!si_signo` (always :data:`~signal.SIGCHLD`)" msgstr "" -#: ../../library/os.rst:4411 +#: ../../library/os.rst:4413 msgid "" ":attr:`!si_status` (the exit status or signal number, depending on :attr:`!" "si_code`)" msgstr "" -#: ../../library/os.rst:4412 +#: ../../library/os.rst:4414 msgid ":attr:`!si_code` (see :data:`CLD_EXITED` for possible values)" msgstr "" -#: ../../library/os.rst:4414 +#: ../../library/os.rst:4416 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:4426 +#: ../../library/os.rst:4428 msgid "The details of this function differ on Unix and Windows." msgstr "" -#: ../../library/os.rst:4428 +#: ../../library/os.rst:4430 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 " @@ -4837,7 +4840,7 @@ msgid "" "operation." msgstr "" -#: ../../library/os.rst:4433 +#: ../../library/os.rst:4435 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 " @@ -4847,7 +4850,7 @@ msgid "" "group ``-pid`` (the absolute value of *pid*)." msgstr "" -#: ../../library/os.rst:4440 +#: ../../library/os.rst:4442 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 " @@ -4856,7 +4859,7 @@ msgid "" "are :data:`WUNTRACED` and :data:`WCONTINUED`." msgstr "" -#: ../../library/os.rst:4446 +#: ../../library/os.rst:4448 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 " @@ -4868,7 +4871,7 @@ msgid "" "process handles." msgstr "" -#: ../../library/os.rst:4467 +#: ../../library/os.rst:4469 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 " @@ -4877,13 +4880,13 @@ msgid "" "same as that provided to :func:`waitpid` and :func:`wait4`." msgstr "" -#: ../../library/os.rst:4474 ../../library/os.rst:4488 +#: ../../library/os.rst:4476 ../../library/os.rst:4490 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exitcode." msgstr "" -#: ../../library/os.rst:4482 +#: ../../library/os.rst:4484 msgid "" "Similar to :func:`waitpid`, except a 3-element tuple, containing the child's " "process id, exit status indication, and resource usage information is " @@ -4892,118 +4895,118 @@ msgid "" "to :func:`waitpid`." msgstr "" -#: ../../library/os.rst:4499 +#: ../../library/os.rst:4501 msgid "" "These are the possible values for *idtype* in :func:`waitid`. They affect " "how *id* is interpreted:" msgstr "" -#: ../../library/os.rst:4502 +#: ../../library/os.rst:4504 msgid ":data:`!P_PID` - wait for the child whose PID is *id*." msgstr "" -#: ../../library/os.rst:4503 +#: ../../library/os.rst:4505 msgid ":data:`!P_PGID` - wait for any child whose progress group ID is *id*." msgstr "" -#: ../../library/os.rst:4504 +#: ../../library/os.rst:4506 msgid ":data:`!P_ALL` - wait for any child; *id* is ignored." msgstr "" -#: ../../library/os.rst:4505 +#: ../../library/os.rst:4507 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:4510 +#: ../../library/os.rst:4512 msgid ":data:`!P_PIDFD` is only available on Linux >= 5.4." msgstr "" -#: ../../library/os.rst:4513 +#: ../../library/os.rst:4515 msgid "The :data:`!P_PIDFD` constant." msgstr "" -#: ../../library/os.rst:4519 +#: ../../library/os.rst:4521 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:4528 +#: ../../library/os.rst:4530 msgid "" "This *options* flag for :func:`waitid` causes child processes that have " "terminated to be reported." msgstr "" -#: ../../library/os.rst:4531 +#: ../../library/os.rst:4533 msgid "" "The other ``wait*`` functions always report children that have terminated, " "so this option is not available for them." msgstr "" -#: ../../library/os.rst:4541 +#: ../../library/os.rst:4543 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:4544 ../../library/os.rst:4576 +#: ../../library/os.rst:4546 ../../library/os.rst:4578 msgid "This option is not available for the other ``wait*`` functions." msgstr "" -#: ../../library/os.rst:4553 +#: ../../library/os.rst:4555 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:4557 +#: ../../library/os.rst:4559 msgid "This option is not available for :func:`waitid`." msgstr "" -#: ../../library/os.rst:4564 +#: ../../library/os.rst:4566 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:4573 +#: ../../library/os.rst:4575 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:4588 +#: ../../library/os.rst:4590 msgid "" "These are the possible values for :attr:`!si_code` in the result returned " "by :func:`waitid`." msgstr "" -#: ../../library/os.rst:4595 +#: ../../library/os.rst:4597 msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values." msgstr "" -#: ../../library/os.rst:4601 +#: ../../library/os.rst:4603 msgid "Convert a wait status to an exit code." msgstr "" -#: ../../library/os.rst:4603 +#: ../../library/os.rst:4605 msgid "On Unix:" msgstr "" -#: ../../library/os.rst:4605 +#: ../../library/os.rst:4607 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:4608 +#: ../../library/os.rst:4610 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 " @@ -5011,15 +5014,15 @@ msgid "" "than 0." msgstr "" -#: ../../library/os.rst:4612 +#: ../../library/os.rst:4614 msgid "Otherwise, raise a :exc:`ValueError`." msgstr "" -#: ../../library/os.rst:4614 +#: ../../library/os.rst:4616 msgid "On Windows, return *status* shifted right by 8 bits." msgstr "" -#: ../../library/os.rst:4616 +#: ../../library/os.rst:4618 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 " @@ -5027,217 +5030,217 @@ msgid "" "``WIFSTOPPED(status)`` is true." msgstr "" -#: ../../library/os.rst:4623 +#: ../../library/os.rst:4625 msgid "" ":func:`WIFEXITED`, :func:`WEXITSTATUS`, :func:`WIFSIGNALED`, :func:" "`WTERMSIG`, :func:`WIFSTOPPED`, :func:`WSTOPSIG` functions." msgstr "" -#: ../../library/os.rst:4631 +#: ../../library/os.rst:4633 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:4637 +#: ../../library/os.rst:4639 msgid "" "Return ``True`` if a core dump was generated for the process, otherwise " "return ``False``." msgstr "" -#: ../../library/os.rst:4640 ../../library/os.rst:4706 +#: ../../library/os.rst:4642 ../../library/os.rst:4708 msgid "This function should be employed only if :func:`WIFSIGNALED` is true." msgstr "" -#: ../../library/os.rst:4647 +#: ../../library/os.rst:4649 msgid "" "Return ``True`` if a stopped child has been resumed by delivery of :data:" "`~signal.SIGCONT` (if the process has been continued from a job control " "stop), otherwise return ``False``." msgstr "" -#: ../../library/os.rst:4651 +#: ../../library/os.rst:4653 msgid "See :data:`WCONTINUED` option." msgstr "參閱 :data:`WCONTINUED` 選項。" -#: ../../library/os.rst:4658 +#: ../../library/os.rst:4660 msgid "" "Return ``True`` if the process was stopped by delivery of a signal, " "otherwise return ``False``." msgstr "" -#: ../../library/os.rst:4661 +#: ../../library/os.rst:4663 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:4669 +#: ../../library/os.rst:4671 msgid "" "Return ``True`` if the process was terminated by a signal, otherwise return " "``False``." msgstr "" -#: ../../library/os.rst:4677 +#: ../../library/os.rst:4679 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:4686 +#: ../../library/os.rst:4688 msgid "Return the process exit status." msgstr "" -#: ../../library/os.rst:4688 +#: ../../library/os.rst:4690 msgid "This function should be employed only if :func:`WIFEXITED` is true." msgstr "" -#: ../../library/os.rst:4695 +#: ../../library/os.rst:4697 msgid "Return the signal which caused the process to stop." msgstr "" -#: ../../library/os.rst:4697 +#: ../../library/os.rst:4699 msgid "This function should be employed only if :func:`WIFSTOPPED` is true." msgstr "" -#: ../../library/os.rst:4704 +#: ../../library/os.rst:4706 msgid "Return the number of the signal that caused the process to terminate." msgstr "" -#: ../../library/os.rst:4712 +#: ../../library/os.rst:4714 msgid "Interface to the scheduler" msgstr "" -#: ../../library/os.rst:4714 +#: ../../library/os.rst:4716 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:4720 +#: ../../library/os.rst:4722 msgid "" "The following scheduling policies are exposed if they are supported by the " "operating system." msgstr "" -#: ../../library/os.rst:4725 +#: ../../library/os.rst:4727 msgid "The default scheduling policy." msgstr "" -#: ../../library/os.rst:4729 +#: ../../library/os.rst:4731 msgid "" "Scheduling policy for CPU-intensive processes that tries to preserve " "interactivity on the rest of the computer." msgstr "" -#: ../../library/os.rst:4734 +#: ../../library/os.rst:4736 msgid "Scheduling policy for extremely low priority background tasks." msgstr "" -#: ../../library/os.rst:4738 +#: ../../library/os.rst:4740 msgid "Scheduling policy for sporadic server programs." msgstr "" -#: ../../library/os.rst:4742 +#: ../../library/os.rst:4744 msgid "A First In First Out scheduling policy." msgstr "" -#: ../../library/os.rst:4746 +#: ../../library/os.rst:4748 msgid "A round-robin scheduling policy." msgstr "" -#: ../../library/os.rst:4750 +#: ../../library/os.rst:4752 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:4757 +#: ../../library/os.rst:4759 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:4761 +#: ../../library/os.rst:4763 msgid "At the moment, there is only one possible parameter:" msgstr "" -#: ../../library/os.rst:4765 +#: ../../library/os.rst:4767 msgid "The scheduling priority for a scheduling policy." msgstr "" -#: ../../library/os.rst:4770 +#: ../../library/os.rst:4772 msgid "" "Get the minimum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../library/os.rst:4776 +#: ../../library/os.rst:4778 msgid "" "Get the maximum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../library/os.rst:4782 +#: ../../library/os.rst:4784 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:4789 +#: ../../library/os.rst:4791 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:4796 +#: ../../library/os.rst:4798 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:4802 +#: ../../library/os.rst:4804 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:4808 +#: ../../library/os.rst:4810 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:4814 +#: ../../library/os.rst:4816 msgid "Voluntarily relinquish the CPU." msgstr "" -#: ../../library/os.rst:4819 +#: ../../library/os.rst:4821 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:4826 +#: ../../library/os.rst:4828 msgid "" "Return the set of CPUs the process with PID *pid* (or the current process if " "zero) is restricted to." msgstr "" -#: ../../library/os.rst:4833 +#: ../../library/os.rst:4835 msgid "Miscellaneous System Information" msgstr "" -#: ../../library/os.rst:4838 +#: ../../library/os.rst:4840 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 " @@ -5248,13 +5251,13 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:4846 +#: ../../library/os.rst:4848 msgid "" "If the configuration value specified by *name* isn't defined, ``None`` is " "returned." msgstr "" -#: ../../library/os.rst:4849 +#: ../../library/os.rst:4851 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 " @@ -5262,33 +5265,33 @@ msgid "" "`errno.EINVAL` for the error number." msgstr "" -#: ../../library/os.rst:4859 +#: ../../library/os.rst:4861 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:4868 +#: ../../library/os.rst:4870 msgid "" "Return the number of CPUs in the system. Returns ``None`` if undetermined." msgstr "" -#: ../../library/os.rst:4870 +#: ../../library/os.rst:4872 msgid "" "This number is not equivalent to the number of CPUs the current process can " "use. The number of usable CPUs can be obtained with ``len(os." "sched_getaffinity(0))``" msgstr "" -#: ../../library/os.rst:4880 +#: ../../library/os.rst:4882 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:4889 +#: ../../library/os.rst:4891 msgid "" "Return integer-valued system configuration values. If the configuration " "value specified by *name* isn't defined, ``-1`` is returned. The comments " @@ -5297,44 +5300,44 @@ msgid "" "``sysconf_names``." msgstr "" -#: ../../library/os.rst:4899 +#: ../../library/os.rst:4901 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:4905 +#: ../../library/os.rst:4907 msgid "Add ``'SC_MINSIGSTKSZ'`` name." msgstr "" -#: ../../library/os.rst:4908 +#: ../../library/os.rst:4910 msgid "" "The following data values are used to support path manipulation operations. " "These are defined for all platforms." msgstr "" -#: ../../library/os.rst:4911 +#: ../../library/os.rst:4913 msgid "" "Higher-level operations on pathnames are defined in the :mod:`os.path` " "module." msgstr "" -#: ../../library/os.rst:4917 +#: ../../library/os.rst:4919 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:4925 +#: ../../library/os.rst:4927 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:4934 +#: ../../library/os.rst:4936 msgid "" "The character used by the operating system to separate pathname components. " "This is ``'/'`` for POSIX and ``'\\\\'`` for Windows. Note that knowing " @@ -5343,7 +5346,7 @@ msgid "" "useful. Also available via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:4944 +#: ../../library/os.rst:4946 msgid "" "An alternative character used by the operating system to separate pathname " "components, or ``None`` if only one separator character exists. This is set " @@ -5351,27 +5354,27 @@ msgid "" "via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:4953 +#: ../../library/os.rst:4955 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:4961 +#: ../../library/os.rst:4963 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:4968 +#: ../../library/os.rst:4970 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:4975 +#: ../../library/os.rst:4977 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 " @@ -5380,36 +5383,36 @@ msgid "" "default); use a single ``'\\n'`` instead, on all platforms." msgstr "" -#: ../../library/os.rst:4984 +#: ../../library/os.rst:4986 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:4995 +#: ../../library/os.rst:4997 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:5003 +#: ../../library/os.rst:5005 msgid "Random numbers" msgstr "" -#: ../../library/os.rst:5008 +#: ../../library/os.rst:5010 msgid "" "Get up to *size* random bytes. The function can return less bytes than " "requested." msgstr "" -#: ../../library/os.rst:5011 +#: ../../library/os.rst:5013 msgid "" "These bytes can be used to seed user-space random number generators or for " "cryptographic purposes." msgstr "" -#: ../../library/os.rst:5014 +#: ../../library/os.rst:5016 msgid "" "``getrandom()`` relies on entropy gathered from device drivers and other " "sources of environmental noise. Unnecessarily reading large quantities of " @@ -5417,36 +5420,36 @@ msgid "" "``/dev/urandom`` devices." msgstr "" -#: ../../library/os.rst:5019 +#: ../../library/os.rst:5021 msgid "" "The flags argument is a bit mask that can contain zero or more of the " "following values ORed together: :py:data:`os.GRND_RANDOM` and :py:data:" "`GRND_NONBLOCK`." msgstr "" -#: ../../library/os.rst:5023 +#: ../../library/os.rst:5025 msgid "" "See also the `Linux getrandom() manual page `_." msgstr "" -#: ../../library/os.rst:5027 +#: ../../library/os.rst:5029 msgid ":ref:`Availability `: Linux >= 3.17." msgstr ":ref:`適用 `:Linux 3.17 以上。" -#: ../../library/os.rst:5032 +#: ../../library/os.rst:5034 msgid "" "Return a bytestring of *size* random bytes suitable for cryptographic use." msgstr "" -#: ../../library/os.rst:5034 +#: ../../library/os.rst:5036 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:5038 +#: ../../library/os.rst:5040 msgid "" "On Linux, if the ``getrandom()`` syscall is available, it is used in " "blocking mode: block until the system urandom entropy pool is initialized " @@ -5456,63 +5459,63 @@ msgid "" "to poll until the system urandom entropy pool is initialized." msgstr "" -#: ../../library/os.rst:5045 +#: ../../library/os.rst:5047 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:5049 +#: ../../library/os.rst:5051 msgid "On Windows, it will use ``BCryptGenRandom()``." msgstr "" -#: ../../library/os.rst:5052 +#: ../../library/os.rst:5054 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:5056 +#: ../../library/os.rst:5058 msgid "" "On Linux, ``getrandom()`` is now used in blocking mode to increase the " "security." msgstr "" -#: ../../library/os.rst:5060 +#: ../../library/os.rst:5062 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:5064 +#: ../../library/os.rst:5066 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:5070 +#: ../../library/os.rst:5072 msgid "" "On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()`` " "which is deprecated." msgstr "" -#: ../../library/os.rst:5076 +#: ../../library/os.rst:5078 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:5080 +#: ../../library/os.rst:5082 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:5087 +#: ../../library/os.rst:5089 msgid "" "If this bit is set, then random bytes are drawn from the ``/dev/" "random`` pool instead of the ``/dev/urandom`` pool." diff --git a/library/pathlib.po b/library/pathlib.po index 3571d8c690..acec6f16a4 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-06 00:16+0000\n" +"POT-Creation-Date: 2023-01-06 03:11+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -129,14 +129,14 @@ msgstr "" #: ../../library/pathlib.rst:121 msgid "" -"When several absolute paths are given, the last is taken as an anchor " -"(mimicking :func:`os.path.join`'s behaviour)::" +"If a segment is an absolute path, all previous segments are ignored (like :" +"func:`os.path.join`)::" msgstr "" #: ../../library/pathlib.rst:129 msgid "" -"However, in a Windows path, changing the local root doesn't discard the " -"previous drive setting::" +"On Windows, the drive is not reset when a rooted relative path segment (e." +"g., ``r'\\foo'``) is encountered::" msgstr "" #: ../../library/pathlib.rst:135 @@ -208,10 +208,10 @@ msgstr "" #: ../../library/pathlib.rst:215 msgid "" -"The slash operator helps create child paths, mimicking the behaviour of :" -"func:`os.path.join`. For instance, when several absolute paths are given, " -"the last is taken as an anchor; for a Windows path, changing the local root " -"doesn't discard the previous drive setting::" +"The slash operator helps create child paths, like :func:`os.path.join`. If " +"the argument is an absolute path, the previous path is ignored. On Windows, " +"the drive is not reset when the argument is a rooted relative path (e.g., " +"``r'\\foo'``)::" msgstr "" #: ../../library/pathlib.rst:233 diff --git a/library/typing.po b/library/typing.po index 575a5b6f7f..0b97228852 100644 --- a/library/typing.po +++ b/library/typing.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-25 00:16+0000\n" +"POT-Creation-Date: 2023-01-08 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:14+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -337,7 +337,7 @@ msgid "" msgstr "" #: ../../library/typing.rst:222 ../../library/typing.rst:1164 -#: ../../library/typing.rst:2805 +#: ../../library/typing.rst:2801 msgid "For example::" msgstr "" "舉例來說:\n" @@ -2671,22 +2671,16 @@ msgstr "新增 ``include_extras`` 參數(如 :pep:`593` 中所述)。" #: ../../library/typing.rst:2770 msgid "" -"Calling ``get_type_hints()`` on a class no longer returns the annotations of " -"its base classes." -msgstr "" - -#: ../../library/typing.rst:2774 -msgid "" "Previously, ``Optional[t]`` was added for function and method annotations if " "a default value equal to ``None`` was set. Now the annotation is returned " "unchanged." msgstr "" -#: ../../library/typing.rst:2782 +#: ../../library/typing.rst:2778 msgid "Provide basic introspection for generic types and special typing forms." msgstr "" -#: ../../library/typing.rst:2784 +#: ../../library/typing.rst:2780 msgid "" "For a typing object of the form ``X[Y, Z, ...]`` these functions return " "``X`` and ``(Y, Z, ...)``. If ``X`` is a generic alias for a builtin or :mod:" @@ -2697,11 +2691,11 @@ msgid "" "and ``()`` correspondingly. Examples::" msgstr "" -#: ../../library/typing.rst:2803 +#: ../../library/typing.rst:2799 msgid "Check if a type is a :class:`TypedDict`." msgstr "" -#: ../../library/typing.rst:2818 +#: ../../library/typing.rst:2814 msgid "" "A class used for internal typing representation of string forward " "references. For example, ``List[\"SomeClass\"]`` is implicitly transformed " @@ -2709,24 +2703,24 @@ msgid "" "instantiated by a user, but may be used by introspection tools." msgstr "" -#: ../../library/typing.rst:2824 +#: ../../library/typing.rst:2820 msgid "" ":pep:`585` generic types such as ``list[\"SomeClass\"]`` will not be " "implicitly transformed into ``list[ForwardRef(\"SomeClass\")]`` and thus " "will not automatically resolve to ``list[SomeClass]``." msgstr "" -#: ../../library/typing.rst:2831 +#: ../../library/typing.rst:2827 msgid "Constant" msgstr "常數" -#: ../../library/typing.rst:2835 +#: ../../library/typing.rst:2831 msgid "" "A special constant that is assumed to be ``True`` by 3rd party static type " "checkers. It is ``False`` at runtime. Usage::" msgstr "" -#: ../../library/typing.rst:2844 +#: ../../library/typing.rst:2840 msgid "" "The first type annotation must be enclosed in quotes, making it a \"forward " "reference\", to hide the ``expensive_mod`` reference from the interpreter " @@ -2734,7 +2728,7 @@ msgid "" "second annotation does not need to be enclosed in quotes." msgstr "" -#: ../../library/typing.rst:2851 +#: ../../library/typing.rst:2847 msgid "" "If ``from __future__ import annotations`` is used, annotations are not " "evaluated at function definition time. Instead, they are stored as strings " @@ -2742,11 +2736,11 @@ msgid "" "annotation (see :pep:`563`)." msgstr "" -#: ../../library/typing.rst:2860 +#: ../../library/typing.rst:2856 msgid "Deprecation Timeline of Major Features" msgstr "" -#: ../../library/typing.rst:2862 +#: ../../library/typing.rst:2858 msgid "" "Certain features in ``typing`` are deprecated and may be removed in a future " "version of Python. The following table summarizes major deprecations for " @@ -2754,62 +2748,62 @@ msgid "" "listed." msgstr "" -#: ../../library/typing.rst:2867 +#: ../../library/typing.rst:2863 msgid "Feature" msgstr "" -#: ../../library/typing.rst:2867 +#: ../../library/typing.rst:2863 msgid "Deprecated in" msgstr "棄用於" -#: ../../library/typing.rst:2867 +#: ../../library/typing.rst:2863 msgid "Projected removal" msgstr "" -#: ../../library/typing.rst:2867 +#: ../../library/typing.rst:2863 msgid "PEP/issue" msgstr "" -#: ../../library/typing.rst:2869 +#: ../../library/typing.rst:2865 msgid "``typing.io`` and ``typing.re`` submodules" msgstr "" -#: ../../library/typing.rst:2869 +#: ../../library/typing.rst:2865 msgid "3.8" msgstr "3.8" -#: ../../library/typing.rst:2869 +#: ../../library/typing.rst:2865 msgid "3.13" msgstr "3.13" -#: ../../library/typing.rst:2869 +#: ../../library/typing.rst:2865 msgid ":issue:`38291`" msgstr ":issue:`38291`" -#: ../../library/typing.rst:2872 +#: ../../library/typing.rst:2868 msgid "``typing`` versions of standard collections" msgstr "" -#: ../../library/typing.rst:2872 +#: ../../library/typing.rst:2868 msgid "3.9" msgstr "3.9" -#: ../../library/typing.rst:2872 ../../library/typing.rst:2875 +#: ../../library/typing.rst:2868 ../../library/typing.rst:2871 msgid "Undecided" msgstr "" -#: ../../library/typing.rst:2872 +#: ../../library/typing.rst:2868 msgid ":pep:`585`" msgstr ":pep:`585`" -#: ../../library/typing.rst:2875 +#: ../../library/typing.rst:2871 msgid "``typing.Text``" msgstr "``typing.Text``" -#: ../../library/typing.rst:2875 +#: ../../library/typing.rst:2871 msgid "3.11" msgstr "3.11" -#: ../../library/typing.rst:2875 +#: ../../library/typing.rst:2871 msgid ":gh:`92332`" msgstr ":gh:`92332`" diff --git a/library/unittest.po b/library/unittest.po index 72fac8bac1..ff5478b761 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-01-09 00:17+0000\n" "PO-Revision-Date: 2022-10-16 06:03+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -465,8 +465,9 @@ msgid "" "unittest discover``. If you want to pass arguments to test discovery the " "``discover`` sub-command must be used explicitly." msgstr "" -"``python -m unittest`` 作為捷徑,其功能相當於 ``python -m unittest discover``" -"\\ 。假如你想傳遞引數至探索測試的話,一定要明確地加入 ``discover`` 子指令。" +"``python -m unittest`` 作為捷徑,其功能相當於 ``python -m unittest " +"discover``\\ 。假如你想傳遞引數至探索測試的話,一定要明確地加入 ``discover`` " +"子指令。" #: ../../library/unittest.rst:285 msgid "The ``discover`` sub-command has the following options:" @@ -1982,8 +1983,9 @@ msgstr "" #: ../../library/unittest.rst:1651 msgid "" -"After running the test, ``events`` would contain ``[\"setUp\", \"asyncSetUp" -"\", \"test_response\", \"asyncTearDown\", \"tearDown\", \"cleanup\"]``." +"After running the test, ``events`` would contain ``[\"setUp\", " +"\"asyncSetUp\", \"test_response\", \"asyncTearDown\", \"tearDown\", " +"\"cleanup\"]``." msgstr "" #: ../../library/unittest.rst:1656 @@ -2485,7 +2487,7 @@ msgstr "" #: ../../library/unittest.rst:1985 msgid "" "List of Unix shell-style wildcard test name patterns that test methods have " -"to match to be included in test suites (see ``-v`` option)." +"to match to be included in test suites (see ``-k`` option)." msgstr "" #: ../../library/unittest.rst:1988 @@ -2493,7 +2495,7 @@ msgid "" "If this attribute is not ``None`` (the default), all test methods to be " "included in test suites must match one of the patterns in this list. Note " "that matches are always performed using :meth:`fnmatch.fnmatchcase`, so " -"unlike patterns passed to the ``-v`` option, simple substring patterns will " +"unlike patterns passed to the ``-k`` option, simple substring patterns will " "have to be converted using ``*`` wildcards." msgstr "" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 61012f123b..bdcc7b5361 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-04 00:15+0000\n" +"POT-Creation-Date: 2023-01-11 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -124,7 +124,7 @@ msgstr "" msgid ":pep:`597`, Add optional EncodingWarning" msgstr "" -#: ../../whatsnew/3.10.rst:92 ../../whatsnew/3.10.rst:2054 +#: ../../whatsnew/3.10.rst:92 ../../whatsnew/3.10.rst:2041 msgid "New Features" msgstr "" @@ -1969,7 +1969,7 @@ msgid "" "issue:`43785`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1594 ../../whatsnew/3.10.rst:2213 +#: ../../whatsnew/3.10.rst:1594 ../../whatsnew/3.10.rst:2200 msgid "Deprecated" msgstr "" @@ -2120,20 +2120,6 @@ msgstr "" #: ../../whatsnew/3.10.rst:1711 msgid "" -":func:`asyncio.get_event_loop` now emits a deprecation warning if there is " -"no running event loop. In the future it will be an alias of :func:`~asyncio." -"get_running_loop`. :mod:`asyncio` functions which implicitly create :class:" -"`~asyncio.Future` or :class:`~asyncio.Task` objects now emit a deprecation " -"warning if there is no running event loop and no explicit *loop* argument is " -"passed: :func:`~asyncio.ensure_future`, :func:`~asyncio.wrap_future`, :func:" -"`~asyncio.gather`, :func:`~asyncio.shield`, :func:`~asyncio.as_completed` " -"and constructors of :class:`~asyncio.Future`, :class:`~asyncio.Task`, :class:" -"`~asyncio.StreamReader`, :class:`~asyncio.StreamReaderProtocol`. " -"(Contributed by Serhiy Storchaka in :issue:`39529`.)" -msgstr "" - -#: ../../whatsnew/3.10.rst:1724 -msgid "" "The undocumented built-in function ``sqlite3.enable_shared_cache`` is now " "deprecated, scheduled for removal in Python 3.12. Its use is strongly " "discouraged by the SQLite3 documentation. See `the SQLite3 docs :func:`threading.current_thread`" msgstr "``threading.currentThread`` => :func:`threading.current_thread`" -#: ../../whatsnew/3.10.rst:1736 +#: ../../whatsnew/3.10.rst:1723 msgid "``threading.activeCount`` => :func:`threading.active_count`" msgstr "``threading.activeCount`` => :func:`threading.active_count`" -#: ../../whatsnew/3.10.rst:1738 +#: ../../whatsnew/3.10.rst:1725 msgid "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" msgstr "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" -#: ../../whatsnew/3.10.rst:1741 +#: ../../whatsnew/3.10.rst:1728 msgid "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" msgstr "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" -#: ../../whatsnew/3.10.rst:1743 +#: ../../whatsnew/3.10.rst:1730 msgid "``threading.Thread.setName`` => :attr:`threading.Thread.name`" msgstr "``threading.Thread.setName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1745 +#: ../../whatsnew/3.10.rst:1732 msgid "``threading.thread.getName`` => :attr:`threading.Thread.name`" msgstr "``threading.thread.getName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1747 +#: ../../whatsnew/3.10.rst:1734 msgid "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1749 +#: ../../whatsnew/3.10.rst:1736 msgid "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1751 +#: ../../whatsnew/3.10.rst:1738 msgid "(Contributed by Jelle Zijlstra in :gh:`87889`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1753 +#: ../../whatsnew/3.10.rst:1740 msgid "" ":meth:`pathlib.Path.link_to` is deprecated and slated for removal in Python " "3.12. Use :meth:`pathlib.Path.hardlink_to` instead. (Contributed by Barney " "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1757 +#: ../../whatsnew/3.10.rst:1744 msgid "" "``cgi.log()`` is deprecated and slated for removal in Python 3.12. " "(Contributed by Inada Naoki in :issue:`41139`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1760 +#: ../../whatsnew/3.10.rst:1747 msgid "" "The following :mod:`ssl` features have been deprecated since Python 3.6, " "Python 3.7, or OpenSSL 1.1.0 and will be removed in 3.11:" msgstr "" -#: ../../whatsnew/3.10.rst:1763 +#: ../../whatsnew/3.10.rst:1750 msgid "" ":data:`~ssl.OP_NO_SSLv2`, :data:`~ssl.OP_NO_SSLv3`, :data:`~ssl." "OP_NO_TLSv1`, :data:`~ssl.OP_NO_TLSv1_1`, :data:`~ssl.OP_NO_TLSv1_2`, and :" @@ -2211,7 +2197,7 @@ msgid "" "minimum_version` and :attr:`sslSSLContext.maximum_version`." msgstr "" -#: ../../whatsnew/3.10.rst:1769 +#: ../../whatsnew/3.10.rst:1756 msgid "" ":data:`~ssl.PROTOCOL_SSLv2`, :data:`~ssl.PROTOCOL_SSLv3`, :data:`~ssl." "PROTOCOL_SSLv23`, :data:`~ssl.PROTOCOL_TLSv1`, :data:`~ssl." @@ -2220,26 +2206,26 @@ msgid "" "and :data:`~ssl.PROTOCOL_TLS_SERVER`" msgstr "" -#: ../../whatsnew/3.10.rst:1775 +#: ../../whatsnew/3.10.rst:1762 msgid "" ":func:`~ssl.wrap_socket` is replaced by :meth:`ssl.SSLContext.wrap_socket`" msgstr "" -#: ../../whatsnew/3.10.rst:1777 +#: ../../whatsnew/3.10.rst:1764 msgid ":func:`~ssl.match_hostname`" msgstr ":func:`~ssl.match_hostname`" -#: ../../whatsnew/3.10.rst:1779 +#: ../../whatsnew/3.10.rst:1766 msgid ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" msgstr ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" -#: ../../whatsnew/3.10.rst:1781 +#: ../../whatsnew/3.10.rst:1768 msgid "" "NPN features like :meth:`ssl.SSLSocket.selected_npn_protocol` and :meth:`ssl." "SSLContext.set_npn_protocols` are replaced by ALPN." msgstr "" -#: ../../whatsnew/3.10.rst:1784 +#: ../../whatsnew/3.10.rst:1771 msgid "" "The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is " "deprecated in Python 3.10 and will be removed in Python 3.12. This feature " @@ -2247,7 +2233,7 @@ msgid "" "Victor Stinner in :issue:`44584`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1789 +#: ../../whatsnew/3.10.rst:1776 msgid "" "Importing from the ``typing.io`` and ``typing.re`` submodules will now emit :" "exc:`DeprecationWarning`. These submodules will be removed in a future " @@ -2256,11 +2242,11 @@ msgid "" "Rittau in :issue:`38291`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1798 ../../whatsnew/3.10.rst:2221 +#: ../../whatsnew/3.10.rst:1785 ../../whatsnew/3.10.rst:2208 msgid "Removed" msgstr "" -#: ../../whatsnew/3.10.rst:1800 +#: ../../whatsnew/3.10.rst:1787 msgid "" "Removed special methods ``__int__``, ``__float__``, ``__floordiv__``, " "``__mod__``, ``__divmod__``, ``__rfloordiv__``, ``__rmod__`` and " @@ -2268,7 +2254,7 @@ msgid "" "`TypeError`. (Contributed by Serhiy Storchaka in :issue:`41974`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1806 +#: ../../whatsnew/3.10.rst:1793 msgid "" "The ``ParserBase.error()`` method from the private and undocumented " "``_markupbase`` module has been removed. :class:`html.parser.HTMLParser` is " @@ -2277,7 +2263,7 @@ msgid "" "`31844`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1812 +#: ../../whatsnew/3.10.rst:1799 msgid "" "Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal " "PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was " @@ -2285,7 +2271,7 @@ msgid "" "`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1817 +#: ../../whatsnew/3.10.rst:1804 msgid "" "Removed the ``parser`` module, which was deprecated in 3.9 due to the switch " "to the new PEG parser, as well as all the C source and header files that " @@ -2293,7 +2279,7 @@ msgid "" "``graminit.h`` and ``grammar.h``." msgstr "" -#: ../../whatsnew/3.10.rst:1822 +#: ../../whatsnew/3.10.rst:1809 msgid "" "Removed the Public C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2301,7 +2287,7 @@ msgid "" "deprecated in 3.9 due to the switch to the new PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1827 +#: ../../whatsnew/3.10.rst:1814 msgid "" "Removed the ``formatter`` module, which was deprecated in Python 3.4. It is " "somewhat obsolete, little used, and not tested. It was originally scheduled " @@ -2311,71 +2297,71 @@ msgid "" "`42299`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1834 +#: ../../whatsnew/3.10.rst:1821 msgid "" "Removed the :c:func:`PyModule_GetWarningsModule` function that was useless " "now due to the _warnings module was converted to a builtin module in 2.6. " "(Contributed by Hai Shi in :issue:`42599`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1838 +#: ../../whatsnew/3.10.rst:1825 msgid "" "Remove deprecated aliases to :ref:`collections-abstract-base-classes` from " "the :mod:`collections` module. (Contributed by Victor Stinner in :issue:" "`37324`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1842 +#: ../../whatsnew/3.10.rst:1829 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8. The motivation behind this change is multifold:" msgstr "" -#: ../../whatsnew/3.10.rst:1846 +#: ../../whatsnew/3.10.rst:1833 msgid "This simplifies the high-level API." msgstr "" -#: ../../whatsnew/3.10.rst:1847 +#: ../../whatsnew/3.10.rst:1834 msgid "" "The functions in the high-level API have been implicitly getting the current " "thread's running event loop since Python 3.7. There isn't a need to pass " "the event loop to the API in most normal use cases." msgstr "" -#: ../../whatsnew/3.10.rst:1850 +#: ../../whatsnew/3.10.rst:1837 msgid "" "Event loop passing is error-prone especially when dealing with loops running " "in different threads." msgstr "" -#: ../../whatsnew/3.10.rst:1853 +#: ../../whatsnew/3.10.rst:1840 msgid "" "Note that the low-level API will still accept ``loop``. See :ref:`changes-" "python-api` for examples of how to replace existing code." msgstr "" -#: ../../whatsnew/3.10.rst:1856 ../../whatsnew/3.10.rst:1928 +#: ../../whatsnew/3.10.rst:1843 ../../whatsnew/3.10.rst:1915 msgid "" "(Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle " "Stanley in :issue:`42392`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1861 ../../whatsnew/3.10.rst:2148 +#: ../../whatsnew/3.10.rst:1848 ../../whatsnew/3.10.rst:2135 msgid "Porting to Python 3.10" msgstr "" -#: ../../whatsnew/3.10.rst:1863 +#: ../../whatsnew/3.10.rst:1850 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.10.rst:1868 +#: ../../whatsnew/3.10.rst:1855 msgid "Changes in the Python syntax" msgstr "" -#: ../../whatsnew/3.10.rst:1870 +#: ../../whatsnew/3.10.rst:1857 msgid "" "Deprecation warning is now emitted when compiling previously valid syntax if " "the numeric literal is immediately followed by a keyword (like in ``0in " @@ -2385,11 +2371,11 @@ msgid "" "following keyword. (Contributed by Serhiy Storchaka in :issue:`43833`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1881 +#: ../../whatsnew/3.10.rst:1868 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.10.rst:1883 +#: ../../whatsnew/3.10.rst:1870 msgid "" "The *etype* parameters of the :func:`~traceback.format_exception`, :func:" "`~traceback.format_exception_only`, and :func:`~traceback.print_exception` " @@ -2397,7 +2383,7 @@ msgid "" "(Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1889 +#: ../../whatsnew/3.10.rst:1876 msgid "" ":mod:`atexit`: At Python exit, if a callback registered with :func:`atexit." "register` fails, its exception is now logged. Previously, only some " @@ -2405,7 +2391,7 @@ msgid "" "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1895 +#: ../../whatsnew/3.10.rst:1882 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2418,7 +2404,7 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1905 +#: ../../whatsnew/3.10.rst:1892 msgid "" ":meth:`socket.htons` and :meth:`socket.ntohs` now raise :exc:`OverflowError` " "instead of :exc:`DeprecationWarning` if the given parameter will not fit in " @@ -2426,29 +2412,29 @@ msgid "" "`42393`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1910 +#: ../../whatsnew/3.10.rst:1897 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8." msgstr "" -#: ../../whatsnew/3.10.rst:1914 +#: ../../whatsnew/3.10.rst:1901 msgid "A coroutine that currently looks like this::" msgstr "" -#: ../../whatsnew/3.10.rst:1919 +#: ../../whatsnew/3.10.rst:1906 msgid "Should be replaced with this::" msgstr "" -#: ../../whatsnew/3.10.rst:1924 +#: ../../whatsnew/3.10.rst:1911 msgid "" "If ``foo()`` was specifically designed *not* to run in the current thread's " "running event loop (e.g. running in another thread's event loop), consider " "using :func:`asyncio.run_coroutine_threadsafe` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1931 +#: ../../whatsnew/3.10.rst:1918 msgid "" "The :data:`types.FunctionType` constructor now inherits the current builtins " "if the *globals* dictionary has no ``\"__builtins__\"`` key, rather than " @@ -2459,11 +2445,11 @@ msgid "" "`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1940 +#: ../../whatsnew/3.10.rst:1927 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.10.rst:1942 +#: ../../whatsnew/3.10.rst:1929 msgid "" "The C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2472,31 +2458,31 @@ msgid "" "PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1948 +#: ../../whatsnew/3.10.rst:1935 msgid "" "Source should be now be compiled directly to a code object using, for " "example, :c:func:`Py_CompileString`. The resulting code object can then be " "evaluated using, for example, :c:func:`PyEval_EvalCode`." msgstr "" -#: ../../whatsnew/3.10.rst:1952 +#: ../../whatsnew/3.10.rst:1939 msgid "Specifically:" msgstr "" -#: ../../whatsnew/3.10.rst:1954 +#: ../../whatsnew/3.10.rst:1941 msgid "" "A call to ``PyParser_SimpleParseStringFlags`` followed by ``PyNode_Compile`` " "can be replaced by calling :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1957 +#: ../../whatsnew/3.10.rst:1944 msgid "" "There is no direct replacement for ``PyParser_SimpleParseFileFlags``. To " "compile code from a ``FILE *`` argument, you will need to read the file in C " "and pass the resulting buffer to :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1961 +#: ../../whatsnew/3.10.rst:1948 msgid "" "To compile a file given a ``char *`` filename, explicitly open the file, " "read it and compile the result. One way to do this is using the :py:mod:`io` " @@ -2505,7 +2491,7 @@ msgid "" "(Declarations and error handling are omitted.) ::" msgstr "" -#: ../../whatsnew/3.10.rst:1974 +#: ../../whatsnew/3.10.rst:1961 msgid "" "For ``FrameObject`` objects, the ``f_lasti`` member now represents a " "wordcode offset instead of a simple offset into the bytecode string. This " @@ -2515,53 +2501,53 @@ msgid "" "considered stable: please use :c:func:`PyFrame_GetLineNumber` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1982 +#: ../../whatsnew/3.10.rst:1969 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.10.rst:1984 +#: ../../whatsnew/3.10.rst:1971 msgid "" "The ``MAKE_FUNCTION`` instruction now accepts either a dict or a tuple of " "strings as the function's annotations. (Contributed by Yurii Karabas and " "Inada Naoki in :issue:`42202`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1989 +#: ../../whatsnew/3.10.rst:1976 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.10.rst:1991 +#: ../../whatsnew/3.10.rst:1978 msgid "" ":pep:`644`: Python now requires OpenSSL 1.1.1 or newer. OpenSSL 1.0.2 is no " "longer supported. (Contributed by Christian Heimes in :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1995 +#: ../../whatsnew/3.10.rst:1982 msgid "" "The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now " "required to build Python. (Contributed by Victor Stinner in :issue:`36020`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1999 +#: ../../whatsnew/3.10.rst:1986 msgid "" ":mod:`sqlite3` requires SQLite 3.7.15 or higher. (Contributed by Sergey " "Fedoseev and Erlend E. Aasland in :issue:`40744` and :issue:`40810`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2002 +#: ../../whatsnew/3.10.rst:1989 msgid "" "The :mod:`atexit` module must now always be built as a built-in module. " "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2005 +#: ../../whatsnew/3.10.rst:1992 msgid "" "Add :option:`--disable-test-modules` option to the ``configure`` script: " "don't build nor install test modules. (Contributed by Xavier de Gaye, Thomas " "Petazzoni and Peixing Xin in :issue:`27640`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2009 +#: ../../whatsnew/3.10.rst:1996 msgid "" "Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>` to the " "``./configure`` script. If specified, the :mod:`ensurepip` module looks for " @@ -2570,7 +2556,7 @@ msgid "" "packages." msgstr "" -#: ../../whatsnew/3.10.rst:2015 +#: ../../whatsnew/3.10.rst:2002 msgid "" "Some Linux distribution packaging policies recommend against bundling " "dependencies. For example, Fedora installs wheel packages in the ``/usr/" @@ -2578,22 +2564,22 @@ msgid "" "_bundled`` package." msgstr "" -#: ../../whatsnew/3.10.rst:2020 +#: ../../whatsnew/3.10.rst:2007 msgid "(Contributed by Victor Stinner in :issue:`42856`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2022 +#: ../../whatsnew/3.10.rst:2009 msgid "" "Add a new :option:`configure --without-static-libpython option <--without-" "static-libpython>` to not build the ``libpythonMAJOR.MINOR.a`` static " "library and not install the ``python.o`` object file." msgstr "" -#: ../../whatsnew/3.10.rst:2026 +#: ../../whatsnew/3.10.rst:2013 msgid "(Contributed by Victor Stinner in :issue:`43103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2028 +#: ../../whatsnew/3.10.rst:2015 msgid "" "The ``configure`` script now uses the ``pkg-config`` utility, if available, " "to detect the location of Tcl/Tk headers and libraries. As before, those " @@ -2602,7 +2588,7 @@ msgid "" "Stamatogiannakis in :issue:`42603`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2034 +#: ../../whatsnew/3.10.rst:2021 msgid "" "Add :option:`--with-openssl-rpath` option to ``configure`` script. The " "option simplifies building Python with a custom OpenSSL installation, e.g. " @@ -2610,15 +2596,15 @@ msgid "" "(Contributed by Christian Heimes in :issue:`43466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2041 +#: ../../whatsnew/3.10.rst:2028 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.10.rst:2044 +#: ../../whatsnew/3.10.rst:2031 msgid "PEP 652: Maintaining the Stable ABI" msgstr "" -#: ../../whatsnew/3.10.rst:2046 +#: ../../whatsnew/3.10.rst:2033 msgid "" "The Stable ABI (Application Binary Interface) for extension modules or " "embedding Python is now explicitly defined. :ref:`stable` describes C API " @@ -2626,25 +2612,25 @@ msgid "" "ABI." msgstr "" -#: ../../whatsnew/3.10.rst:2051 +#: ../../whatsnew/3.10.rst:2038 msgid "(Contributed by Petr Viktorin in :pep:`652` and :issue:`43795`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2056 +#: ../../whatsnew/3.10.rst:2043 msgid "" "The result of :c:func:`PyNumber_Index` now always has exact type :class:" "`int`. Previously, the result could have been an instance of a subclass of " "``int``. (Contributed by Serhiy Storchaka in :issue:`40792`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2060 +#: ../../whatsnew/3.10.rst:2047 msgid "" "Add a new :c:member:`~PyConfig.orig_argv` member to the :c:type:`PyConfig` " "structure: the list of the original command line arguments passed to the " "Python executable. (Contributed by Victor Stinner in :issue:`23427`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2065 +#: ../../whatsnew/3.10.rst:2052 msgid "" "The :c:func:`PyDateTime_DATE_GET_TZINFO` and :c:func:" "`PyDateTime_TIME_GET_TZINFO` macros have been added for accessing the " @@ -2652,72 +2638,72 @@ msgid "" "time` objects. (Contributed by Zackery Spytz in :issue:`30155`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2071 +#: ../../whatsnew/3.10.rst:2058 msgid "" "Add a :c:func:`PyCodec_Unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2075 +#: ../../whatsnew/3.10.rst:2062 msgid "" "The :c:func:`PyIter_Send` function was added to allow sending value into " "iterator without raising ``StopIteration`` exception. (Contributed by " "Vladimir Matveev in :issue:`41756`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2079 +#: ../../whatsnew/3.10.rst:2066 msgid "" "Add :c:func:`PyUnicode_AsUTF8AndSize` to the limited C API. (Contributed by " "Alex Gaynor in :issue:`41784`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2082 +#: ../../whatsnew/3.10.rst:2069 msgid "" "Add :c:func:`PyModule_AddObjectRef` function: similar to :c:func:" "`PyModule_AddObject` but don't steal a reference to the value on success. " "(Contributed by Victor Stinner in :issue:`1635741`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2087 +#: ../../whatsnew/3.10.rst:2074 msgid "" "Add :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to increment the " "reference count of an object and return the object. (Contributed by Victor " "Stinner in :issue:`42262`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2091 +#: ../../whatsnew/3.10.rst:2078 msgid "" "The :c:func:`PyType_FromSpecWithBases` and :c:func:" "`PyType_FromModuleAndSpec` functions now accept a single class as the " "*bases* argument. (Contributed by Serhiy Storchaka in :issue:`42423`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2095 +#: ../../whatsnew/3.10.rst:2082 msgid "" "The :c:func:`PyType_FromModuleAndSpec` function now accepts NULL ``tp_doc`` " "slot. (Contributed by Hai Shi in :issue:`41832`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2099 +#: ../../whatsnew/3.10.rst:2086 msgid "" "The :c:func:`PyType_GetSlot` function can accept :ref:`static types `. (Contributed by Hai Shi and Petr Viktorin in :issue:`41073`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2103 +#: ../../whatsnew/3.10.rst:2090 msgid "" "Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an " "object is an instance of :class:`set` but not an instance of a subtype. " "(Contributed by Pablo Galindo in :issue:`43277`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2107 +#: ../../whatsnew/3.10.rst:2094 msgid "" "Add :c:func:`PyErr_SetInterruptEx` which allows passing a signal number to " "simulate. (Contributed by Antoine Pitrou in :issue:`43356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2111 +#: ../../whatsnew/3.10.rst:2098 msgid "" "The limited C API is now supported if :ref:`Python is built in debug mode " "` (if the ``Py_DEBUG`` macro is defined). In the limited C API, " @@ -2730,14 +2716,14 @@ msgid "" "`36465`)." msgstr "" -#: ../../whatsnew/3.10.rst:2121 +#: ../../whatsnew/3.10.rst:2108 msgid "" "The limited C API is still not supported in the :option:`--with-trace-refs` " "special build (``Py_TRACE_REFS`` macro). (Contributed by Victor Stinner in :" "issue:`43688`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2125 +#: ../../whatsnew/3.10.rst:2112 msgid "" "Add the :c:func:`Py_Is(x, y) ` function to test if the *x* object is " "the *y* object, the same as ``x is y`` in Python. Add also the :c:func:" @@ -2747,7 +2733,7 @@ msgid "" "`43753`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2132 +#: ../../whatsnew/3.10.rst:2119 msgid "" "Add new functions to control the garbage collector from C code: :c:func:" "`PyGC_Enable()`, :c:func:`PyGC_Disable()`, :c:func:`PyGC_IsEnabled()`. These " @@ -2755,20 +2741,20 @@ msgid "" "collector from C code without having to import the :mod:`gc` module." msgstr "" -#: ../../whatsnew/3.10.rst:2139 +#: ../../whatsnew/3.10.rst:2126 msgid "" "Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " "creating type instances. (Contributed by Victor Stinner in :issue:`43916`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2143 +#: ../../whatsnew/3.10.rst:2130 msgid "" "Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " "immutable type objects: type attributes cannot be set nor deleted. " "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2150 +#: ../../whatsnew/3.10.rst:2137 msgid "" "The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use :c:func:" "`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use ``#``: " @@ -2777,7 +2763,7 @@ msgid "" "`40943`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2156 +#: ../../whatsnew/3.10.rst:2143 msgid "" "Since :c:func:`Py_REFCNT()` is changed to the inline static function, " "``Py_REFCNT(obj) = new_refcnt`` must be replaced with ``Py_SET_REFCNT(obj, " @@ -2785,18 +2771,18 @@ msgid "" "For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.10.rst:2165 +#: ../../whatsnew/3.10.rst:2152 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2167 +#: ../../whatsnew/3.10.rst:2154 msgid "" "Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed " "for historical reason. It is no longer allowed. (Contributed by Victor " "Stinner in :issue:`40839`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2171 +#: ../../whatsnew/3.10.rst:2158 msgid "" "``PyUnicode_FromUnicode(NULL, size)`` and " "``PyUnicode_FromStringAndSize(NULL, size)`` raise ``DeprecationWarning`` " @@ -2804,14 +2790,14 @@ msgid "" "data. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2176 +#: ../../whatsnew/3.10.rst:2163 msgid "" "The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API " "``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. " "(Contributed by Victor Stinner in :issue:`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2180 +#: ../../whatsnew/3.10.rst:2167 msgid "" ":c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:" "func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and :c:func:" @@ -2821,7 +2807,7 @@ msgid "" "Stinner in :issue:`42260`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2187 +#: ../../whatsnew/3.10.rst:2174 msgid "" ":c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and :c:func:" "`PyCell_SET` macros can no longer be used as l-value or r-value. For " @@ -2831,7 +2817,7 @@ msgid "" "and Victor Stinner in :issue:`30459`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2194 +#: ../../whatsnew/3.10.rst:2181 msgid "" "The non-limited API files ``odictobject.h``, ``parser_interface.h``, " "``picklebufobject.h``, ``pyarena.h``, ``pyctype.h``, ``pydebug.h``, ``pyfpe." @@ -2842,7 +2828,7 @@ msgid "" "issue:`35134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2202 +#: ../../whatsnew/3.10.rst:2189 msgid "" "Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " "type objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a " @@ -2851,85 +2837,85 @@ msgid "" "issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2208 +#: ../../whatsnew/3.10.rst:2195 msgid "" "The undocumented function ``Py_FrozenMain`` has been removed from the " "limited API. The function is mainly useful for custom builds of Python. " "(Contributed by Petr Viktorin in :issue:`26241`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2215 +#: ../../whatsnew/3.10.rst:2202 msgid "" "The ``PyUnicode_InternImmortal()`` function is now deprecated and will be " "removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. " "(Contributed by Victor Stinner in :issue:`41692`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2223 +#: ../../whatsnew/3.10.rst:2210 msgid "" "Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. " "(Contributed by Inada Naoki in :issue:`41123`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2226 +#: ../../whatsnew/3.10.rst:2213 msgid "" "``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or :c:macro:" "`PyUnicode_GET_LENGTH`" msgstr "" -#: ../../whatsnew/3.10.rst:2228 +#: ../../whatsnew/3.10.rst:2215 msgid "" "``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or :c:func:" "`PyUnicode_FromFormat`" msgstr "" -#: ../../whatsnew/3.10.rst:2230 +#: ../../whatsnew/3.10.rst:2217 msgid "" "``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use :c:func:" "`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`" msgstr "" -#: ../../whatsnew/3.10.rst:2232 +#: ../../whatsnew/3.10.rst:2219 msgid "``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`" msgstr "" -#: ../../whatsnew/3.10.rst:2233 +#: ../../whatsnew/3.10.rst:2220 msgid "``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`" msgstr "" -#: ../../whatsnew/3.10.rst:2234 +#: ../../whatsnew/3.10.rst:2221 msgid "" "``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use :c:func:" "`PyUnicode_FindChar`" msgstr "" -#: ../../whatsnew/3.10.rst:2237 +#: ../../whatsnew/3.10.rst:2224 msgid "" "Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. " "(Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2240 +#: ../../whatsnew/3.10.rst:2227 msgid "" "Removed ``PyLong_FromUnicode()``. Please migrate to :c:func:" "`PyLong_FromUnicodeObject`. (Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2243 +#: ../../whatsnew/3.10.rst:2230 msgid "" "Removed ``PyUnicode_AsUnicodeCopy()``. Please use :c:func:" "`PyUnicode_AsUCS4Copy` or :c:func:`PyUnicode_AsWideCharString` (Contributed " "by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2247 +#: ../../whatsnew/3.10.rst:2234 msgid "" "Removed ``_Py_CheckRecursionLimit`` variable: it has been replaced by " "``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. " "(Contributed by Victor Stinner in :issue:`41834`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2251 +#: ../../whatsnew/3.10.rst:2238 msgid "" "Removed undocumented macros ``Py_ALLOW_RECURSION`` and " "``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the :c:" @@ -2937,14 +2923,14 @@ msgid "" "issue:`41936`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2256 +#: ../../whatsnew/3.10.rst:2243 msgid "" "Removed the undocumented ``PyOS_InitInterrupts()`` function. Initializing " "Python already implicitly installs signal handlers: see :c:member:`PyConfig." "install_signal_handlers`. (Contributed by Victor Stinner in :issue:`41713`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2261 +#: ../../whatsnew/3.10.rst:2248 msgid "" "Remove the ``PyAST_Validate()`` function. It is no longer possible to build " "a AST object (``mod_ty`` type) with the public C API. The function was " @@ -2952,48 +2938,48 @@ msgid "" "Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2266 +#: ../../whatsnew/3.10.rst:2253 msgid "Remove the ``symtable.h`` header file and the undocumented functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2268 +#: ../../whatsnew/3.10.rst:2255 msgid "``PyST_GetScope()``" msgstr "``PyST_GetScope()``" -#: ../../whatsnew/3.10.rst:2269 +#: ../../whatsnew/3.10.rst:2256 msgid "``PySymtable_Build()``" msgstr "``PySymtable_Build()``" -#: ../../whatsnew/3.10.rst:2270 +#: ../../whatsnew/3.10.rst:2257 msgid "``PySymtable_BuildObject()``" msgstr "``PySymtable_BuildObject()``" -#: ../../whatsnew/3.10.rst:2271 +#: ../../whatsnew/3.10.rst:2258 msgid "``PySymtable_Free()``" msgstr "``PySymtable_Free()``" -#: ../../whatsnew/3.10.rst:2272 +#: ../../whatsnew/3.10.rst:2259 msgid "``Py_SymtableString()``" msgstr "``Py_SymtableString()``" -#: ../../whatsnew/3.10.rst:2273 +#: ../../whatsnew/3.10.rst:2260 msgid "``Py_SymtableStringObject()``" msgstr "``Py_SymtableStringObject()``" -#: ../../whatsnew/3.10.rst:2275 +#: ../../whatsnew/3.10.rst:2262 msgid "" "The ``Py_SymtableString()`` function was part the stable ABI by mistake but " "it could not be used, because the ``symtable.h`` header file was excluded " "from the limited C API." msgstr "" -#: ../../whatsnew/3.10.rst:2279 +#: ../../whatsnew/3.10.rst:2266 msgid "" "Use Python :mod:`symtable` module instead. (Contributed by Victor Stinner " "in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2282 +#: ../../whatsnew/3.10.rst:2269 msgid "" "Remove :c:func:`PyOS_ReadlineFunctionPointer` from the limited C API headers " "and from ``python3.dll``, the library that provides the stable ABI on " @@ -3001,7 +2987,7 @@ msgid "" "cannot be guaranteed. (Contributed by Petr Viktorin in :issue:`43868`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2288 +#: ../../whatsnew/3.10.rst:2275 msgid "" "Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header files. These " "functions were undocumented and excluded from the limited C API. Most names " @@ -3012,86 +2998,86 @@ msgid "" "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2296 +#: ../../whatsnew/3.10.rst:2283 msgid "" "Remove the compiler and parser functions using ``struct _mod`` type, because " "the public AST C API was removed:" msgstr "" -#: ../../whatsnew/3.10.rst:2299 +#: ../../whatsnew/3.10.rst:2286 msgid "``PyAST_Compile()``" msgstr "``PyAST_Compile()``" -#: ../../whatsnew/3.10.rst:2300 +#: ../../whatsnew/3.10.rst:2287 msgid "``PyAST_CompileEx()``" msgstr "``PyAST_CompileEx()``" -#: ../../whatsnew/3.10.rst:2301 +#: ../../whatsnew/3.10.rst:2288 msgid "``PyAST_CompileObject()``" msgstr "``PyAST_CompileObject()``" -#: ../../whatsnew/3.10.rst:2302 +#: ../../whatsnew/3.10.rst:2289 msgid "``PyFuture_FromAST()``" msgstr "``PyFuture_FromAST()``" -#: ../../whatsnew/3.10.rst:2303 +#: ../../whatsnew/3.10.rst:2290 msgid "``PyFuture_FromASTObject()``" msgstr "``PyFuture_FromASTObject()``" -#: ../../whatsnew/3.10.rst:2304 +#: ../../whatsnew/3.10.rst:2291 msgid "``PyParser_ASTFromFile()``" msgstr "``PyParser_ASTFromFile()``" -#: ../../whatsnew/3.10.rst:2305 +#: ../../whatsnew/3.10.rst:2292 msgid "``PyParser_ASTFromFileObject()``" msgstr "``PyParser_ASTFromFileObject()``" -#: ../../whatsnew/3.10.rst:2306 +#: ../../whatsnew/3.10.rst:2293 msgid "``PyParser_ASTFromFilename()``" msgstr "``PyParser_ASTFromFilename()``" -#: ../../whatsnew/3.10.rst:2307 +#: ../../whatsnew/3.10.rst:2294 msgid "``PyParser_ASTFromString()``" msgstr "``PyParser_ASTFromString()``" -#: ../../whatsnew/3.10.rst:2308 +#: ../../whatsnew/3.10.rst:2295 msgid "``PyParser_ASTFromStringObject()``" msgstr "``PyParser_ASTFromStringObject()``" -#: ../../whatsnew/3.10.rst:2310 +#: ../../whatsnew/3.10.rst:2297 msgid "" "These functions were undocumented and excluded from the limited C API. " "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2313 +#: ../../whatsnew/3.10.rst:2300 msgid "Remove the ``pyarena.h`` header file with functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2315 +#: ../../whatsnew/3.10.rst:2302 msgid "``PyArena_New()``" msgstr "``PyArena_New()``" -#: ../../whatsnew/3.10.rst:2316 +#: ../../whatsnew/3.10.rst:2303 msgid "``PyArena_Free()``" msgstr "``PyArena_Free()``" -#: ../../whatsnew/3.10.rst:2317 +#: ../../whatsnew/3.10.rst:2304 msgid "``PyArena_Malloc()``" msgstr "``PyArena_Malloc()``" -#: ../../whatsnew/3.10.rst:2318 +#: ../../whatsnew/3.10.rst:2305 msgid "``PyArena_AddPyObject()``" msgstr "``PyArena_AddPyObject()``" -#: ../../whatsnew/3.10.rst:2320 +#: ../../whatsnew/3.10.rst:2307 msgid "" "These functions were undocumented, excluded from the limited C API, and were " "only used internally by the compiler. (Contributed by Victor Stinner in :" "issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2324 +#: ../../whatsnew/3.10.rst:2311 msgid "" "The ``PyThreadState.use_tracing`` member has been removed to optimize " "Python. (Contributed by Mark Shannon in :issue:`43760`.)" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy