From 66297c3b6ae27e0ca95ab96ebd10f13619989ce2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 9 Mar 2022 00:14:34 +0000 Subject: [PATCH 1/8] sync with cpython 26fa25a9 --- reference/import.po | 8 ++++---- tutorial/controlflow.po | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/reference/import.po b/reference/import.po index b34737e35e..54ad64c351 100644 --- a/reference/import.po +++ b/reference/import.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-03-09 00:12+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -126,9 +126,9 @@ msgstr "" msgid "" "All modules have a name. Subpackage names are separated from their parent " "package name by a dot, akin to Python's standard attribute access syntax. " -"Thus you might have a module called :mod:`sys` and a package called :mod:" -"`email`, which in turn has a subpackage called :mod:`email.mime` and a " -"module within that subpackage called :mod:`email.mime.text`." +"Thus you might have a package called :mod:`email`, which in turn has a " +"subpackage called :mod:`email.mime` and a module within that subpackage " +"called :mod:`email.mime.text`." msgstr "" #: ../../reference/import.rst:93 diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index 9e352ba2c1..46a95f3248 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-19 00:13+0000\n" +"POT-Creation-Date: 2022-03-09 00:12+0000\n" "PO-Revision-Date: 2021-06-01 22:43+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -989,8 +989,9 @@ msgstr "" "::" #: ../../tutorial/controlflow.rst:887 +#, fuzzy msgid "" -"Normally, these ``variadic`` arguments will be last in the list of formal " +"Normally, these *variadic* arguments will be last in the list of formal " "parameters, because they scoop up all remaining input arguments that are " "passed to the function. Any formal parameters which occur after the " "``*args`` parameter are 'keyword-only' arguments, meaning that they can only " From 21d247e902257db7c8b27f47cc7309fb9a8dc583 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 10 Mar 2022 00:13:55 +0000 Subject: [PATCH 2/8] sync with cpython 5dfe9817 --- library/sqlite3.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/sqlite3.po b/library/sqlite3.po index 7ffdea90b6..75550b245b 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-19 00:09+0000\n" +"POT-Creation-Date: 2022-03-10 00:12+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -840,7 +840,7 @@ msgid "" msgstr "" #: ../../library/sqlite3.rst:760 ../../library/sqlite3.rst:764 -msgid "Required by the DB-API. Is a no-op in :mod:`sqlite3`." +msgid "Required by the DB-API. Does nothing in :mod:`sqlite3`." msgstr "" #: ../../library/sqlite3.rst:768 From 59fa0856ca6185431f985fb72d0e442c68162377 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 11 Mar 2022 00:16:41 +0000 Subject: [PATCH 3/8] sync with cpython 4199b7ff --- library/queue.po | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/library/queue.po b/library/queue.po index b3c883505e..4f2c40e151 100644 --- a/library/queue.po +++ b/library/queue.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-03-11 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -189,7 +189,7 @@ msgid "" "`KeyboardInterrupt`." msgstr "" -#: ../../library/queue.rst:161 ../../library/queue.rst:268 +#: ../../library/queue.rst:161 ../../library/queue.rst:267 msgid "Equivalent to ``get(False)``." msgstr "" @@ -236,29 +236,29 @@ msgstr "" msgid "Example of how to wait for enqueued tasks to be completed::" msgstr "" -#: ../../library/queue.rst:218 +#: ../../library/queue.rst:217 msgid "SimpleQueue Objects" msgstr "SimpleQueue 物件" -#: ../../library/queue.rst:220 +#: ../../library/queue.rst:219 msgid "" ":class:`SimpleQueue` objects provide the public methods described below." msgstr "" -#: ../../library/queue.rst:224 +#: ../../library/queue.rst:223 msgid "" "Return the approximate size of the queue. Note, qsize() > 0 doesn't " "guarantee that a subsequent get() will not block." msgstr "" -#: ../../library/queue.rst:230 +#: ../../library/queue.rst:229 msgid "" "Return ``True`` if the queue is empty, ``False`` otherwise. If empty() " "returns ``False`` it doesn't guarantee that a subsequent call to get() will " "not block." msgstr "" -#: ../../library/queue.rst:237 +#: ../../library/queue.rst:236 msgid "" "Put *item* into the queue. The method never blocks and always succeeds " "(except for potential low-level errors such as failure to allocate memory). " @@ -266,13 +266,13 @@ msgid "" "compatibility with :meth:`Queue.put`." msgstr "" -#: ../../library/queue.rst:252 +#: ../../library/queue.rst:251 msgid "" "Equivalent to ``put(item)``, provided for compatibility with :meth:`Queue." "put_nowait`." msgstr "" -#: ../../library/queue.rst:258 +#: ../../library/queue.rst:257 msgid "" "Remove and return an item from the queue. If optional args *block* is true " "and *timeout* is ``None`` (the default), block if necessary until an item is " @@ -283,17 +283,17 @@ msgid "" "ignored in that case)." msgstr "" -#: ../../library/queue.rst:275 +#: ../../library/queue.rst:274 msgid "Class :class:`multiprocessing.Queue`" msgstr ":class:`multiprocessing.Queue` 類型" -#: ../../library/queue.rst:274 +#: ../../library/queue.rst:273 msgid "" "A queue class for use in a multi-processing (rather than multi-threading) " "context." msgstr "" -#: ../../library/queue.rst:277 +#: ../../library/queue.rst:276 msgid "" ":class:`collections.deque` is an alternative implementation of unbounded " "queues with fast atomic :meth:`~collections.deque.append` and :meth:" From 74016c9824e34eb7ef12b8af8aa2d381f7529ab0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 12 Mar 2022 00:14:37 +0000 Subject: [PATCH 4/8] sync with cpython 393e2bf6 --- library/time.po | 387 +++++++++++++++++++++++++----------------------- 1 file changed, 198 insertions(+), 189 deletions(-) diff --git a/library/time.po b/library/time.po index c885c06df7..b19dedf414 100644 --- a/library/time.po +++ b/library/time.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-15 00:10+0000\n" +"POT-Creation-Date: 2022-03-12 00:12+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -231,9 +231,9 @@ msgstr "" #: ../../library/time.rst:160 ../../library/time.rst:173 #: ../../library/time.rst:182 ../../library/time.rst:195 -#: ../../library/time.rst:204 ../../library/time.rst:658 -#: ../../library/time.rst:775 ../../library/time.rst:794 -#: ../../library/time.rst:822 ../../library/time.rst:857 +#: ../../library/time.rst:204 ../../library/time.rst:664 +#: ../../library/time.rst:781 ../../library/time.rst:800 +#: ../../library/time.rst:828 ../../library/time.rst:863 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" @@ -353,7 +353,16 @@ msgid "" "The dst flag is set to ``1`` when DST applies to the given time." msgstr "" -#: ../../library/time.rst:265 +#: ../../library/time.rst:262 +msgid "" +":func:`localtime` may raise :exc:`OverflowError`, if the timestamp is " +"outside the range of values supported by the platform C :c:func:`localtime` " +"or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` or :" +"c:func:`gmtime` failure. It's common for this to be restricted to years " +"between 1970 and 2038." +msgstr "" + +#: ../../library/time.rst:271 msgid "" "This is the inverse function of :func:`localtime`. Its argument is the :" "class:`struct_time` or full 9-tuple (since the dst flag is needed; use " @@ -366,7 +375,7 @@ msgid "" "dependent." msgstr "" -#: ../../library/time.rst:277 +#: ../../library/time.rst:283 msgid "" "Return the value (in fractional seconds) of a monotonic clock, i.e. a clock " "that cannot go backwards. The clock is not affected by system clock " @@ -374,25 +383,25 @@ msgid "" "only the difference between the results of two calls is valid." msgstr "" -#: ../../library/time.rst:282 +#: ../../library/time.rst:288 msgid "" "Use :func:`monotonic_ns` to avoid the precision loss caused by the :class:" "`float` type." msgstr "" -#: ../../library/time.rst:287 +#: ../../library/time.rst:293 msgid "The function is now always available and always system-wide." msgstr "" -#: ../../library/time.rst:290 +#: ../../library/time.rst:296 msgid "On macOS, the function is now system-wide." msgstr "" -#: ../../library/time.rst:296 +#: ../../library/time.rst:302 msgid "Similar to :func:`monotonic`, but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:305 +#: ../../library/time.rst:311 msgid "" "Return the value (in fractional seconds) of a performance counter, i.e. a " "clock with the highest available resolution to measure a short duration. It " @@ -401,21 +410,21 @@ msgid "" "between the results of two calls is valid." msgstr "" -#: ../../library/time.rst:311 +#: ../../library/time.rst:317 msgid "" "Use :func:`perf_counter_ns` to avoid the precision loss caused by the :class:" "`float` type." msgstr "" -#: ../../library/time.rst:316 +#: ../../library/time.rst:322 msgid "On Windows, the function is now system-wide." msgstr "" -#: ../../library/time.rst:321 +#: ../../library/time.rst:327 msgid "Similar to :func:`perf_counter`, but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:333 +#: ../../library/time.rst:339 msgid "" "Return the value (in fractional seconds) of the sum of the system and user " "CPU time of the current process. It does not include time elapsed during " @@ -424,17 +433,17 @@ msgid "" "of two calls is valid." msgstr "" -#: ../../library/time.rst:339 +#: ../../library/time.rst:345 msgid "" "Use :func:`process_time_ns` to avoid the precision loss caused by the :class:" "`float` type." msgstr "" -#: ../../library/time.rst:346 +#: ../../library/time.rst:352 msgid "Similar to :func:`process_time` but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:352 +#: ../../library/time.rst:358 msgid "" "Suspend execution of the calling thread for the given number of seconds. The " "argument may be a floating point number to indicate a more precise sleep " @@ -445,14 +454,14 @@ msgid "" "in the system." msgstr "" -#: ../../library/time.rst:360 +#: ../../library/time.rst:366 msgid "" "The function now sleeps at least *secs* even if the sleep is interrupted by " "a signal, except if the signal handler raises an exception (see :pep:`475` " "for the rationale)." msgstr "" -#: ../../library/time.rst:371 +#: ../../library/time.rst:377 msgid "" "Convert a tuple or :class:`struct_time` representing a time as returned by :" "func:`gmtime` or :func:`localtime` to a string as specified by the *format* " @@ -461,267 +470,267 @@ msgid "" "raised if any field in *t* is outside of the allowed range." msgstr "" -#: ../../library/time.rst:377 +#: ../../library/time.rst:383 msgid "" "0 is a legal argument for any position in the time tuple; if it is normally " "illegal the value is forced to a correct one." msgstr "" -#: ../../library/time.rst:380 +#: ../../library/time.rst:386 msgid "" "The following directives can be embedded in the *format* string. They are " "shown without the optional field width and precision specification, and are " "replaced by the indicated characters in the :func:`strftime` result:" msgstr "" -#: ../../library/time.rst:385 +#: ../../library/time.rst:391 msgid "Directive" msgstr "" -#: ../../library/time.rst:385 +#: ../../library/time.rst:391 msgid "Meaning" msgstr "" -#: ../../library/time.rst:385 +#: ../../library/time.rst:391 msgid "Notes" msgstr "註解" -#: ../../library/time.rst:387 +#: ../../library/time.rst:393 msgid "``%a``" msgstr "``%a``" -#: ../../library/time.rst:387 +#: ../../library/time.rst:393 msgid "Locale's abbreviated weekday name." msgstr "" -#: ../../library/time.rst:390 +#: ../../library/time.rst:396 msgid "``%A``" msgstr "``%A``" -#: ../../library/time.rst:390 +#: ../../library/time.rst:396 msgid "Locale's full weekday name." msgstr "" -#: ../../library/time.rst:392 +#: ../../library/time.rst:398 msgid "``%b``" msgstr "``%b``" -#: ../../library/time.rst:392 +#: ../../library/time.rst:398 msgid "Locale's abbreviated month name." msgstr "" -#: ../../library/time.rst:395 +#: ../../library/time.rst:401 msgid "``%B``" msgstr "``%B``" -#: ../../library/time.rst:395 +#: ../../library/time.rst:401 msgid "Locale's full month name." msgstr "" -#: ../../library/time.rst:397 +#: ../../library/time.rst:403 msgid "``%c``" msgstr "``%c``" -#: ../../library/time.rst:397 +#: ../../library/time.rst:403 msgid "Locale's appropriate date and time representation." msgstr "" -#: ../../library/time.rst:400 +#: ../../library/time.rst:406 msgid "``%d``" msgstr "``%d``" -#: ../../library/time.rst:400 +#: ../../library/time.rst:406 msgid "Day of the month as a decimal number [01,31]." msgstr "" -#: ../../library/time.rst:403 +#: ../../library/time.rst:409 msgid "``%H``" msgstr "``%H``" -#: ../../library/time.rst:403 +#: ../../library/time.rst:409 msgid "Hour (24-hour clock) as a decimal number [00,23]." msgstr "" -#: ../../library/time.rst:406 +#: ../../library/time.rst:412 msgid "``%I``" msgstr "``%I``" -#: ../../library/time.rst:406 +#: ../../library/time.rst:412 msgid "Hour (12-hour clock) as a decimal number [01,12]." msgstr "" -#: ../../library/time.rst:409 +#: ../../library/time.rst:415 msgid "``%j``" msgstr "``%j``" -#: ../../library/time.rst:409 +#: ../../library/time.rst:415 msgid "Day of the year as a decimal number [001,366]." msgstr "" -#: ../../library/time.rst:412 +#: ../../library/time.rst:418 msgid "``%m``" msgstr "``%m``" -#: ../../library/time.rst:412 +#: ../../library/time.rst:418 msgid "Month as a decimal number [01,12]." msgstr "" -#: ../../library/time.rst:415 +#: ../../library/time.rst:421 msgid "``%M``" msgstr "``%M``" -#: ../../library/time.rst:415 +#: ../../library/time.rst:421 msgid "Minute as a decimal number [00,59]." msgstr "" -#: ../../library/time.rst:418 +#: ../../library/time.rst:424 msgid "``%p``" msgstr "``%p``" -#: ../../library/time.rst:418 +#: ../../library/time.rst:424 msgid "Locale's equivalent of either AM or PM." msgstr "" -#: ../../library/time.rst:418 +#: ../../library/time.rst:424 msgid "\\(1)" msgstr "\\(1)" -#: ../../library/time.rst:421 +#: ../../library/time.rst:427 msgid "``%S``" msgstr "``%S``" -#: ../../library/time.rst:421 +#: ../../library/time.rst:427 msgid "Second as a decimal number [00,61]." msgstr "" -#: ../../library/time.rst:421 +#: ../../library/time.rst:427 msgid "\\(2)" msgstr "\\(2)" -#: ../../library/time.rst:424 +#: ../../library/time.rst:430 msgid "``%U``" msgstr "``%U``" -#: ../../library/time.rst:424 +#: ../../library/time.rst:430 msgid "" "Week number of the year (Sunday as the first day of the week) as a decimal " "number [00,53]. All days in a new year preceding the first Sunday are " "considered to be in week 0." msgstr "" -#: ../../library/time.rst:424 ../../library/time.rst:435 +#: ../../library/time.rst:430 ../../library/time.rst:441 msgid "\\(3)" msgstr "\\(3)" -#: ../../library/time.rst:432 +#: ../../library/time.rst:438 msgid "``%w``" msgstr "``%w``" -#: ../../library/time.rst:432 +#: ../../library/time.rst:438 msgid "Weekday as a decimal number [0(Sunday),6]." msgstr "" -#: ../../library/time.rst:435 +#: ../../library/time.rst:441 msgid "``%W``" msgstr "``%W``" -#: ../../library/time.rst:435 +#: ../../library/time.rst:441 msgid "" "Week number of the year (Monday as the first day of the week) as a decimal " "number [00,53]. All days in a new year preceding the first Monday are " "considered to be in week 0." msgstr "" -#: ../../library/time.rst:443 +#: ../../library/time.rst:449 msgid "``%x``" msgstr "``%x``" -#: ../../library/time.rst:443 +#: ../../library/time.rst:449 msgid "Locale's appropriate date representation." msgstr "" -#: ../../library/time.rst:446 +#: ../../library/time.rst:452 msgid "``%X``" msgstr "``%X``" -#: ../../library/time.rst:446 +#: ../../library/time.rst:452 msgid "Locale's appropriate time representation." msgstr "" -#: ../../library/time.rst:449 +#: ../../library/time.rst:455 msgid "``%y``" msgstr "``%y``" -#: ../../library/time.rst:449 +#: ../../library/time.rst:455 msgid "Year without century as a decimal number [00,99]." msgstr "" -#: ../../library/time.rst:452 +#: ../../library/time.rst:458 msgid "``%Y``" msgstr "``%Y``" -#: ../../library/time.rst:452 +#: ../../library/time.rst:458 msgid "Year with century as a decimal number." msgstr "" -#: ../../library/time.rst:455 +#: ../../library/time.rst:461 msgid "``%z``" msgstr "``%z``" -#: ../../library/time.rst:455 +#: ../../library/time.rst:461 msgid "" "Time zone offset indicating a positive or negative time difference from UTC/" "GMT of the form +HHMM or -HHMM, where H represents decimal hour digits and M " "represents decimal minute digits [-23:59, +23:59]. [1]_" msgstr "" -#: ../../library/time.rst:461 +#: ../../library/time.rst:467 msgid "``%Z``" msgstr "``%Z``" -#: ../../library/time.rst:461 +#: ../../library/time.rst:467 msgid "Time zone name (no characters if no time zone exists). Deprecated. [1]_" msgstr "" -#: ../../library/time.rst:464 +#: ../../library/time.rst:470 msgid "``%%``" msgstr "``%%``" -#: ../../library/time.rst:464 +#: ../../library/time.rst:470 msgid "A literal ``'%'`` character." msgstr "" -#: ../../library/time.rst:467 +#: ../../library/time.rst:473 msgid "Notes:" msgstr "註解:" -#: ../../library/time.rst:470 +#: ../../library/time.rst:476 msgid "" "When used with the :func:`strptime` function, the ``%p`` directive only " "affects the output hour field if the ``%I`` directive is used to parse the " "hour." msgstr "" -#: ../../library/time.rst:474 +#: ../../library/time.rst:480 msgid "" "The range really is ``0`` to ``61``; value ``60`` is valid in timestamps " "representing `leap seconds`_ and value ``61`` is supported for historical " "reasons." msgstr "" -#: ../../library/time.rst:479 +#: ../../library/time.rst:485 msgid "" "When used with the :func:`strptime` function, ``%U`` and ``%W`` are only " "used in calculations when the day of the week and the year are specified." msgstr "" -#: ../../library/time.rst:482 +#: ../../library/time.rst:488 msgid "" "Here is an example, a format for dates compatible with that specified in " "the :rfc:`2822` Internet email standard. [1]_ ::" msgstr "" -#: ../../library/time.rst:489 +#: ../../library/time.rst:495 msgid "" "Additional directives may be supported on certain platforms, but only the " "ones listed here have a meaning standardized by ANSI C. To see the full set " @@ -729,7 +738,7 @@ msgid "" "`strftime(3)` documentation." msgstr "" -#: ../../library/time.rst:494 +#: ../../library/time.rst:500 msgid "" "On some platforms, an optional field width and precision specification can " "immediately follow the initial ``'%'`` of a directive in the following " @@ -737,13 +746,13 @@ msgid "" "%j`` where it is 3." msgstr "" -#: ../../library/time.rst:505 +#: ../../library/time.rst:511 msgid "" "Parse a string representing a time according to a format. The return value " "is a :class:`struct_time` as returned by :func:`gmtime` or :func:`localtime`." msgstr "" -#: ../../library/time.rst:509 +#: ../../library/time.rst:515 msgid "" "The *format* parameter uses the same directives as those used by :func:" "`strftime`; it defaults to ``\"%a %b %d %H:%M:%S %Y\"`` which matches the " @@ -754,11 +763,11 @@ msgid "" "Both *string* and *format* must be strings." msgstr "" -#: ../../library/time.rst:517 +#: ../../library/time.rst:523 msgid "For example:" msgstr "" -#: ../../library/time.rst:524 +#: ../../library/time.rst:530 msgid "" "Support for the ``%Z`` directive is based on the values contained in " "``tzname`` and whether ``daylight`` is true. Because of this, it is " @@ -766,7 +775,7 @@ msgid "" "(and are considered to be non-daylight savings timezones)." msgstr "" -#: ../../library/time.rst:529 +#: ../../library/time.rst:535 msgid "" "Only the directives specified in the documentation are supported. Because " "``strftime()`` is implemented per platform it can sometimes offer more " @@ -775,7 +784,7 @@ msgid "" "are not documented as supported." msgstr "" -#: ../../library/time.rst:538 +#: ../../library/time.rst:544 msgid "" "The type of the time value sequence returned by :func:`gmtime`, :func:" "`localtime`, and :func:`strptime`. It is an object with a :term:`named " @@ -783,153 +792,153 @@ msgid "" "The following values are present:" msgstr "" -#: ../../library/time.rst:544 +#: ../../library/time.rst:550 msgid "Index" msgstr "" -#: ../../library/time.rst:544 +#: ../../library/time.rst:550 msgid "Attribute" msgstr "屬性" -#: ../../library/time.rst:544 +#: ../../library/time.rst:550 msgid "Values" msgstr "" -#: ../../library/time.rst:546 +#: ../../library/time.rst:552 msgid "0" msgstr "0" -#: ../../library/time.rst:546 +#: ../../library/time.rst:552 msgid ":attr:`tm_year`" msgstr ":attr:`tm_year`" -#: ../../library/time.rst:546 +#: ../../library/time.rst:552 msgid "(for example, 1993)" msgstr "" -#: ../../library/time.rst:548 +#: ../../library/time.rst:554 msgid "1" msgstr "1" -#: ../../library/time.rst:548 +#: ../../library/time.rst:554 msgid ":attr:`tm_mon`" msgstr ":attr:`tm_mon`" -#: ../../library/time.rst:548 +#: ../../library/time.rst:554 msgid "range [1, 12]" msgstr "" -#: ../../library/time.rst:550 +#: ../../library/time.rst:556 msgid "2" msgstr "2" -#: ../../library/time.rst:550 +#: ../../library/time.rst:556 msgid ":attr:`tm_mday`" msgstr ":attr:`tm_mday`" -#: ../../library/time.rst:550 +#: ../../library/time.rst:556 msgid "range [1, 31]" msgstr "" -#: ../../library/time.rst:552 +#: ../../library/time.rst:558 msgid "3" msgstr "3" -#: ../../library/time.rst:552 +#: ../../library/time.rst:558 msgid ":attr:`tm_hour`" msgstr ":attr:`tm_hour`" -#: ../../library/time.rst:552 +#: ../../library/time.rst:558 msgid "range [0, 23]" msgstr "" -#: ../../library/time.rst:554 +#: ../../library/time.rst:560 msgid "4" msgstr "4" -#: ../../library/time.rst:554 +#: ../../library/time.rst:560 msgid ":attr:`tm_min`" msgstr ":attr:`tm_min`" -#: ../../library/time.rst:554 +#: ../../library/time.rst:560 msgid "range [0, 59]" msgstr "" -#: ../../library/time.rst:556 +#: ../../library/time.rst:562 msgid "5" msgstr "5" -#: ../../library/time.rst:556 +#: ../../library/time.rst:562 msgid ":attr:`tm_sec`" msgstr ":attr:`tm_sec`" -#: ../../library/time.rst:556 +#: ../../library/time.rst:562 msgid "range [0, 61]; see **(2)** in :func:`strftime` description" msgstr "" -#: ../../library/time.rst:559 +#: ../../library/time.rst:565 msgid "6" msgstr "6" -#: ../../library/time.rst:559 +#: ../../library/time.rst:565 msgid ":attr:`tm_wday`" msgstr ":attr:`tm_wday`" -#: ../../library/time.rst:559 +#: ../../library/time.rst:565 msgid "range [0, 6], Monday is 0" msgstr "" -#: ../../library/time.rst:561 +#: ../../library/time.rst:567 msgid "7" msgstr "7" -#: ../../library/time.rst:561 +#: ../../library/time.rst:567 msgid ":attr:`tm_yday`" msgstr ":attr:`tm_yday`" -#: ../../library/time.rst:561 +#: ../../library/time.rst:567 msgid "range [1, 366]" msgstr "" -#: ../../library/time.rst:563 +#: ../../library/time.rst:569 msgid "8" msgstr "8" -#: ../../library/time.rst:563 +#: ../../library/time.rst:569 msgid ":attr:`tm_isdst`" msgstr ":attr:`tm_isdst`" -#: ../../library/time.rst:563 +#: ../../library/time.rst:569 msgid "0, 1 or -1; see below" msgstr "" -#: ../../library/time.rst:565 ../../library/time.rst:567 +#: ../../library/time.rst:571 ../../library/time.rst:573 msgid "N/A" msgstr "N/A" -#: ../../library/time.rst:565 +#: ../../library/time.rst:571 msgid ":attr:`tm_zone`" msgstr ":attr:`tm_zone`" -#: ../../library/time.rst:565 +#: ../../library/time.rst:571 msgid "abbreviation of timezone name" msgstr "" -#: ../../library/time.rst:567 +#: ../../library/time.rst:573 msgid ":attr:`tm_gmtoff`" msgstr ":attr:`tm_gmtoff`" -#: ../../library/time.rst:567 +#: ../../library/time.rst:573 msgid "offset east of UTC in seconds" msgstr "" -#: ../../library/time.rst:570 +#: ../../library/time.rst:576 msgid "" "Note that unlike the C structure, the month value is a range of [1, 12], not " "[0, 11]." msgstr "" -#: ../../library/time.rst:573 +#: ../../library/time.rst:579 msgid "" "In calls to :func:`mktime`, :attr:`tm_isdst` may be set to 1 when daylight " "savings time is in effect, and 0 when it is not. A value of -1 indicates " @@ -937,14 +946,14 @@ msgid "" "filled in." msgstr "" -#: ../../library/time.rst:577 +#: ../../library/time.rst:583 msgid "" "When a tuple with an incorrect length is passed to a function expecting a :" "class:`struct_time`, or having elements of the wrong type, a :exc:" "`TypeError` is raised." msgstr "" -#: ../../library/time.rst:583 +#: ../../library/time.rst:589 msgid "" "Return the time in seconds since the epoch_ as a floating point number. The " "specific date of the epoch and the handling of `leap seconds`_ is platform " @@ -955,7 +964,7 @@ msgid "" "platform, look at ``gmtime(0)``." msgstr "" -#: ../../library/time.rst:593 +#: ../../library/time.rst:599 msgid "" "Note that even though the time is always returned as a floating point " "number, not all systems provide time with a better precision than 1 second. " @@ -964,7 +973,7 @@ msgid "" "between the two calls." msgstr "" -#: ../../library/time.rst:599 +#: ../../library/time.rst:605 msgid "" "The number returned by :func:`.time` may be converted into a more common " "time format (i.e. year, month, day, hour, etc...) in UTC by passing it to :" @@ -974,19 +983,19 @@ msgid "" "attributes." msgstr "" -#: ../../library/time.rst:606 +#: ../../library/time.rst:612 msgid "" "Use :func:`time_ns` to avoid the precision loss caused by the :class:`float` " "type." msgstr "" -#: ../../library/time.rst:612 +#: ../../library/time.rst:618 msgid "" "Similar to :func:`~time.time` but returns time as an integer number of " "nanoseconds since the epoch_." msgstr "" -#: ../../library/time.rst:625 +#: ../../library/time.rst:631 msgid "" "Return the value (in fractional seconds) of the sum of the system and user " "CPU time of the current thread. It does not include time elapsed during " @@ -995,23 +1004,23 @@ msgid "" "of two calls in the same thread is valid." msgstr "" -#: ../../library/time.rst:631 +#: ../../library/time.rst:637 msgid "" "Use :func:`thread_time_ns` to avoid the precision loss caused by the :class:" "`float` type." msgstr "" -#: ../../library/time.rst:636 +#: ../../library/time.rst:642 msgid "" ":ref:`Availability `: Windows, Linux, Unix systems supporting " "``CLOCK_THREAD_CPUTIME_ID``." msgstr "" -#: ../../library/time.rst:642 +#: ../../library/time.rst:648 msgid "Similar to :func:`thread_time` but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:649 +#: ../../library/time.rst:655 msgid "" "Reset the time conversion rules used by the library routines. The " "environment variable :envvar:`TZ` specifies how this is done. It will also " @@ -1022,42 +1031,42 @@ msgid "" "when daylight saving time applies)." msgstr "" -#: ../../library/time.rst:661 +#: ../../library/time.rst:667 msgid "" "Although in many cases, changing the :envvar:`TZ` environment variable may " "affect the output of functions like :func:`localtime` without calling :func:" "`tzset`, this behavior should not be relied on." msgstr "" -#: ../../library/time.rst:665 +#: ../../library/time.rst:671 msgid "The :envvar:`TZ` environment variable should contain no whitespace." msgstr "" -#: ../../library/time.rst:667 +#: ../../library/time.rst:673 msgid "" "The standard format of the :envvar:`TZ` environment variable is (whitespace " "added for clarity)::" msgstr "" -#: ../../library/time.rst:672 +#: ../../library/time.rst:678 msgid "Where the components are:" msgstr "" -#: ../../library/time.rst:676 +#: ../../library/time.rst:682 msgid "``std`` and ``dst``" msgstr "``std`` 和 ``dst``" -#: ../../library/time.rst:675 +#: ../../library/time.rst:681 msgid "" "Three or more alphanumerics giving the timezone abbreviations. These will be " "propagated into time.tzname" msgstr "" -#: ../../library/time.rst:682 +#: ../../library/time.rst:688 msgid "``offset``" msgstr "``offset``" -#: ../../library/time.rst:679 +#: ../../library/time.rst:685 msgid "" "The offset has the form: ``± hh[:mm[:ss]]``. This indicates the value added " "the local time to arrive at UTC. If preceded by a '-', the timezone is east " @@ -1065,41 +1074,41 @@ msgid "" "summer time is assumed to be one hour ahead of standard time." msgstr "" -#: ../../library/time.rst:704 +#: ../../library/time.rst:710 msgid "``start[/time], end[/time]``" msgstr "``start[/time], end[/time]``" -#: ../../library/time.rst:685 +#: ../../library/time.rst:691 msgid "" "Indicates when to change to and back from DST. The format of the start and " "end dates are one of the following:" msgstr "" -#: ../../library/time.rst:690 +#: ../../library/time.rst:696 msgid ":samp:`J{n}`" msgstr ":samp:`J{n}`" -#: ../../library/time.rst:689 +#: ../../library/time.rst:695 msgid "" "The Julian day *n* (1 <= *n* <= 365). Leap days are not counted, so in all " "years February 28 is day 59 and March 1 is day 60." msgstr "" -#: ../../library/time.rst:694 +#: ../../library/time.rst:700 msgid ":samp:`{n}`" msgstr ":samp:`{n}`" -#: ../../library/time.rst:693 +#: ../../library/time.rst:699 msgid "" "The zero-based Julian day (0 <= *n* <= 365). Leap days are counted, and it " "is possible to refer to February 29." msgstr "" -#: ../../library/time.rst:701 +#: ../../library/time.rst:707 msgid ":samp:`M{m}.{n}.{d}`" msgstr ":samp:`M{m}.{n}.{d}`" -#: ../../library/time.rst:697 +#: ../../library/time.rst:703 msgid "" "The *d*'th day (0 <= *d* <= 6) of week *n* of month *m* of the year (1 <= " "*n* <= 5, 1 <= *m* <= 12, where week 5 means \"the last *d* day in month *m*" @@ -1107,13 +1116,13 @@ msgid "" "first week in which the *d*'th day occurs. Day zero is a Sunday." msgstr "" -#: ../../library/time.rst:703 +#: ../../library/time.rst:709 msgid "" "``time`` has the same format as ``offset`` except that no leading sign ('-' " "or '+') is allowed. The default, if time is not given, is 02:00:00." msgstr "" -#: ../../library/time.rst:717 +#: ../../library/time.rst:723 msgid "" "On many Unix systems (including \\*BSD, Linux, Solaris, and Darwin), it is " "more convenient to use the system's zoneinfo (:manpage:`tzfile(5)`) " @@ -1124,23 +1133,23 @@ msgid "" "``'Australia/Melbourne'``, ``'Egypt'`` or ``'Europe/Amsterdam'``. ::" msgstr "" -#: ../../library/time.rst:738 +#: ../../library/time.rst:744 msgid "Clock ID Constants" msgstr "" -#: ../../library/time.rst:740 +#: ../../library/time.rst:746 msgid "" "These constants are used as parameters for :func:`clock_getres` and :func:" "`clock_gettime`." msgstr "" -#: ../../library/time.rst:745 +#: ../../library/time.rst:751 msgid "" "Identical to :data:`CLOCK_MONOTONIC`, except it also includes any time that " "the system is suspended." msgstr "" -#: ../../library/time.rst:748 +#: ../../library/time.rst:754 msgid "" "This allows applications to get a suspend-aware monotonic clock without " "having to deal with the complications of :data:`CLOCK_REALTIME`, which may " @@ -1148,106 +1157,106 @@ msgid "" "similar." msgstr "" -#: ../../library/time.rst:754 +#: ../../library/time.rst:760 msgid ":ref:`Availability `: Linux 2.6.39 or later." msgstr ":ref:`適用 `:Linux 2.6.39 以上。" -#: ../../library/time.rst:760 +#: ../../library/time.rst:766 msgid "" "The Solaris OS has a ``CLOCK_HIGHRES`` timer that attempts to use an optimal " "hardware source, and may give close to nanosecond resolution. " "``CLOCK_HIGHRES`` is the nonadjustable, high-resolution clock." msgstr "" -#: ../../library/time.rst:765 +#: ../../library/time.rst:771 msgid ":ref:`Availability `: Solaris." msgstr ":ref:`適用 `:Solaris。" -#: ../../library/time.rst:771 +#: ../../library/time.rst:777 msgid "" "Clock that cannot be set and represents monotonic time since some " "unspecified starting point." msgstr "" -#: ../../library/time.rst:781 +#: ../../library/time.rst:787 msgid "" "Similar to :data:`CLOCK_MONOTONIC`, but provides access to a raw hardware-" "based time that is not subject to NTP adjustments." msgstr "" -#: ../../library/time.rst:785 +#: ../../library/time.rst:791 msgid "" ":ref:`Availability `: Linux 2.6.28 and newer, macOS 10.12 and " "newer." msgstr "" -#: ../../library/time.rst:791 ../../library/time.rst:800 +#: ../../library/time.rst:797 ../../library/time.rst:806 msgid "High-resolution per-process timer from the CPU." msgstr "" -#: ../../library/time.rst:803 +#: ../../library/time.rst:809 msgid "" ":ref:`Availability `: FreeBSD, NetBSD 7 or later, OpenBSD." msgstr "" -#: ../../library/time.rst:808 +#: ../../library/time.rst:814 msgid "" "`International Atomic Time `_" msgstr "" -#: ../../library/time.rst:810 +#: ../../library/time.rst:816 msgid "" "The system must have a current leap second table in order for this to give " "the correct answer. PTP or NTP software can maintain a leap second table." msgstr "" -#: ../../library/time.rst:814 +#: ../../library/time.rst:820 msgid ":ref:`Availability `: Linux." msgstr ":ref:`適用 `:Linux。" -#: ../../library/time.rst:819 +#: ../../library/time.rst:825 msgid "Thread-specific CPU-time clock." msgstr "" -#: ../../library/time.rst:828 +#: ../../library/time.rst:834 msgid "" "Time whose absolute value is the time the system has been running and not " "suspended, providing accurate uptime measurement, both absolute and interval." msgstr "" -#: ../../library/time.rst:833 +#: ../../library/time.rst:839 msgid ":ref:`Availability `: FreeBSD, OpenBSD 5.5 or later." msgstr ":ref:`適用 `:FreeBSD、OpenBSD 5.5 以上。" -#: ../../library/time.rst:839 +#: ../../library/time.rst:845 msgid "" "Clock that increments monotonically, tracking the time since an arbitrary " "point, unaffected by frequency or time adjustments and not incremented while " "the system is asleep." msgstr "" -#: ../../library/time.rst:844 +#: ../../library/time.rst:850 msgid ":ref:`Availability `: macOS 10.12 and newer." msgstr ":ref:`適用 `:macOS 10.12 以上。" -#: ../../library/time.rst:847 +#: ../../library/time.rst:853 msgid "" "The following constant is the only parameter that can be sent to :func:" "`clock_settime`." msgstr "" -#: ../../library/time.rst:853 +#: ../../library/time.rst:859 msgid "" "System-wide real-time clock. Setting this clock requires appropriate " "privileges." msgstr "" -#: ../../library/time.rst:864 +#: ../../library/time.rst:870 msgid "Timezone Constants" msgstr "" -#: ../../library/time.rst:868 +#: ../../library/time.rst:874 msgid "" "The offset of the local DST timezone, in seconds west of UTC, if one is " "defined. This is negative if the local DST timezone is east of UTC (as in " @@ -1255,25 +1264,25 @@ msgid "" "nonzero. See note below." msgstr "" -#: ../../library/time.rst:874 +#: ../../library/time.rst:880 msgid "Nonzero if a DST timezone is defined. See note below." msgstr "" -#: ../../library/time.rst:878 +#: ../../library/time.rst:884 msgid "" "The offset of the local (non-DST) timezone, in seconds west of UTC (negative " "in most of Western Europe, positive in the US, zero in the UK). See note " "below." msgstr "" -#: ../../library/time.rst:883 +#: ../../library/time.rst:889 msgid "" "A tuple of two strings: the first is the name of the local non-DST timezone, " "the second is the name of the local DST timezone. If no DST timezone is " "defined, the second string should not be used. See note below." msgstr "" -#: ../../library/time.rst:889 +#: ../../library/time.rst:895 msgid "" "For the above Timezone constants (:data:`altzone`, :data:`daylight`, :data:" "`timezone`, and :data:`tzname`), the value is determined by the timezone " @@ -1283,40 +1292,40 @@ msgid "" "obtain timezone information." msgstr "" -#: ../../library/time.rst:899 +#: ../../library/time.rst:905 msgid "Module :mod:`datetime`" msgstr ":mod:`datetime` 模組" -#: ../../library/time.rst:899 +#: ../../library/time.rst:905 msgid "More object-oriented interface to dates and times." msgstr "" -#: ../../library/time.rst:903 +#: ../../library/time.rst:909 msgid "Module :mod:`locale`" msgstr ":mod:`locale` 模組" -#: ../../library/time.rst:902 +#: ../../library/time.rst:908 msgid "" "Internationalization services. The locale setting affects the " "interpretation of many format specifiers in :func:`strftime` and :func:" "`strptime`." msgstr "" -#: ../../library/time.rst:906 +#: ../../library/time.rst:912 msgid "Module :mod:`calendar`" msgstr ":mod:`calendar` 模組" -#: ../../library/time.rst:906 +#: ../../library/time.rst:912 msgid "" "General calendar-related functions. :func:`~calendar.timegm` is the " "inverse of :func:`gmtime` from this module." msgstr "" -#: ../../library/time.rst:910 +#: ../../library/time.rst:916 msgid "Footnotes" msgstr "註解" -#: ../../library/time.rst:911 +#: ../../library/time.rst:917 msgid "" "The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands to " "the preferred hour/minute offset is not supported by all ANSI C libraries. " From 360287601fdbc6b91bedf6bb79d4c898809964c1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 13 Mar 2022 00:15:08 +0000 Subject: [PATCH 5/8] sync with cpython d8ba5c10 --- library/sqlite3.po | 12 +- library/typing.po | 333 +++++++++++++++++++++++++-------------------- 2 files changed, 195 insertions(+), 150 deletions(-) diff --git a/library/sqlite3.po b/library/sqlite3.po index 75550b245b..2879b1babf 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-10 00:12+0000\n" +"POT-Creation-Date: 2022-03-13 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -38,7 +38,7 @@ msgstr "" #: ../../library/sqlite3.rst:20 msgid "" -"The sqlite3 module was written by Gerhard Häring. It provides a SQL " +"The sqlite3 module was written by Gerhard Häring. It provides an SQL " "interface compliant with the DB-API 2.0 specification described by :pep:" "`249`, and requires SQLite 3.7.15 or newer." msgstr "" @@ -382,7 +382,7 @@ msgid "Connection Objects" msgstr "" #: ../../library/sqlite3.rst:340 -msgid "A SQLite database connection has the following attributes and methods:" +msgid "An SQLite database connection has the following attributes and methods:" msgstr "" #: ../../library/sqlite3.rst:344 @@ -627,7 +627,7 @@ msgstr "" #: ../../library/sqlite3.rst:547 msgid "" -"This routine loads a SQLite extension from a shared library. You have to " +"This routine loads an SQLite extension from a shared library. You have to " "enable extension loading with :meth:`enable_load_extension` before you can " "use this routine." msgstr "" @@ -701,7 +701,7 @@ msgstr "" #: ../../library/sqlite3.rst:623 msgid "" -"This method makes a backup of a SQLite database even while it's being " +"This method makes a backup of an SQLite database even while it's being " "accessed by other clients, or concurrently by the same connection. The copy " "will be written into the mandatory argument *target*, that must be another :" "class:`Connection` instance." @@ -1075,7 +1075,7 @@ msgstr "" #: ../../library/sqlite3.rst:977 msgid "" "The type system of the :mod:`sqlite3` module is extensible in two ways: you " -"can store additional Python types in a SQLite database via object " +"can store additional Python types in an SQLite database via object " "adaptation, and you can let the :mod:`sqlite3` module convert SQLite types " "to different Python types via converters." msgstr "" diff --git a/library/typing.po b/library/typing.po index 873eae31c5..ac589f4f24 100644 --- a/library/typing.po +++ b/library/typing.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-08 14:58+0000\n" +"POT-Creation-Date: 2022-03-13 00:13+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-" @@ -281,7 +281,7 @@ msgid "" msgstr "" #: ../../library/typing.rst:203 ../../library/typing.rst:1015 -#: ../../library/typing.rst:2092 +#: ../../library/typing.rst:2177 msgid "For example::" msgstr "" "舉例來說:\n" @@ -871,7 +871,7 @@ msgid "" "be re-assigned or overridden in a subclass. For example::" msgstr "" -#: ../../library/typing.rst:893 ../../library/typing.rst:1987 +#: ../../library/typing.rst:893 ../../library/typing.rst:2072 msgid "" "There is no runtime checking of these properties. See :pep:`591` for more " "details." @@ -1349,20 +1349,25 @@ msgstr "" #: ../../library/typing.rst:1391 msgid "" -"The type info for introspection can be accessed via ``Point2D." -"__annotations__``, ``Point2D.__total__``, ``Point2D.__required_keys__``, and " -"``Point2D.__optional_keys__``. To allow using this feature with older " -"versions of Python that do not support :pep:`526`, ``TypedDict`` supports " -"two additional equivalent syntactic forms::" +"To allow using this feature with older versions of Python that do not " +"support :pep:`526`, ``TypedDict`` supports two additional equivalent " +"syntactic forms::" msgstr "" -#: ../../library/typing.rst:1401 +#: ../../library/typing.rst:1398 +msgid "" +"The functional syntax should also be used when any of the keys are not " +"valid :ref:`identifiers`, for example because they are keywords or contain " +"hyphens. Example::" +msgstr "" + +#: ../../library/typing.rst:1410 msgid "" "By default, all keys must be present in a ``TypedDict``. It is possible to " "override this by specifying totality. Usage::" msgstr "" -#: ../../library/typing.rst:1409 +#: ../../library/typing.rst:1418 msgid "" "This means that a ``Point2D`` ``TypedDict`` can have any of the keys " "omitted. A type checker is only expected to support a literal ``False`` or " @@ -1370,152 +1375,192 @@ msgid "" "and makes all items defined in the class body required." msgstr "" -#: ../../library/typing.rst:1414 +#: ../../library/typing.rst:1423 +msgid "" +"It is possible for a ``TypedDict`` type to inherit from one or more other " +"``TypedDict`` types using the class-based syntax. Usage::" +msgstr "" + +#: ../../library/typing.rst:1430 +msgid "" +"``Point3D`` has three items: ``x``, ``y`` and ``z``. It is equivalent to " +"this definition::" +msgstr "" + +#: ../../library/typing.rst:1438 +msgid "" +"A ``TypedDict`` cannot inherit from a non-TypedDict class, notably " +"including :class:`Generic`. For example::" +msgstr "" + +#: ../../library/typing.rst:1456 +msgid "" +"A ``TypedDict`` can be introspected via annotations dicts (see :ref:" +"`annotations-howto` for more information on annotations best practices), :" +"attr:`__total__`, :attr:`__required_keys__`, and :attr:`__optional_keys__`." +msgstr "" + +#: ../../library/typing.rst:1462 +msgid "" +"``Point2D.__total__`` gives the value of the ``total`` argument. Example::" +msgstr "" + +#: ../../library/typing.rst:1479 +msgid "" +"``Point2D.__required_keys__`` and ``Point2D.__optional_keys__`` return :" +"class:`frozenset` objects containing required and non-required keys, " +"respectively. Currently the only way to declare both required and non-" +"required keys in the same ``TypedDict`` is mixed inheritance, declaring a " +"``TypedDict`` with one value for the ``total`` argument and then inheriting " +"it from another ``TypedDict`` with a different value for ``total``. Usage::" +msgstr "" + +#: ../../library/typing.rst:1499 msgid "" "See :pep:`589` for more examples and detailed rules of using ``TypedDict``." msgstr "" -#: ../../library/typing.rst:1419 +#: ../../library/typing.rst:1504 msgid "Generic concrete collections" msgstr "" -#: ../../library/typing.rst:1422 +#: ../../library/typing.rst:1507 msgid "Corresponding to built-in types" msgstr "" -#: ../../library/typing.rst:1426 +#: ../../library/typing.rst:1511 msgid "" "A generic version of :class:`dict`. Useful for annotating return types. To " "annotate arguments it is preferred to use an abstract collection type such " "as :class:`Mapping`." msgstr "" -#: ../../library/typing.rst:1430 +#: ../../library/typing.rst:1515 msgid "This type can be used as follows::" msgstr "" -#: ../../library/typing.rst:1435 +#: ../../library/typing.rst:1520 msgid "" ":class:`builtins.dict ` now supports ``[]``. See :pep:`585` and :ref:" "`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1441 +#: ../../library/typing.rst:1526 msgid "" "Generic version of :class:`list`. Useful for annotating return types. To " "annotate arguments it is preferred to use an abstract collection type such " "as :class:`Sequence` or :class:`Iterable`." msgstr "" -#: ../../library/typing.rst:1446 +#: ../../library/typing.rst:1531 msgid "This type may be used as follows::" msgstr "" -#: ../../library/typing.rst:1456 +#: ../../library/typing.rst:1541 msgid "" ":class:`builtins.list ` now supports ``[]``. See :pep:`585` and :ref:" "`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1462 +#: ../../library/typing.rst:1547 msgid "" "A generic version of :class:`builtins.set `. Useful for annotating " "return types. To annotate arguments it is preferred to use an abstract " "collection type such as :class:`AbstractSet`." msgstr "" -#: ../../library/typing.rst:1466 +#: ../../library/typing.rst:1551 msgid "" ":class:`builtins.set ` now supports ``[]``. See :pep:`585` and :ref:" "`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1472 +#: ../../library/typing.rst:1557 msgid "A generic version of :class:`builtins.frozenset `." msgstr "" -#: ../../library/typing.rst:1474 +#: ../../library/typing.rst:1559 msgid "" ":class:`builtins.frozenset ` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1478 +#: ../../library/typing.rst:1563 msgid ":data:`Tuple` is a special form." msgstr "" -#: ../../library/typing.rst:1481 +#: ../../library/typing.rst:1566 msgid "Corresponding to types in :mod:`collections`" msgstr "" -#: ../../library/typing.rst:1485 +#: ../../library/typing.rst:1570 msgid "A generic version of :class:`collections.defaultdict`." msgstr "" -#: ../../library/typing.rst:1489 +#: ../../library/typing.rst:1574 msgid "" ":class:`collections.defaultdict` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1495 +#: ../../library/typing.rst:1580 msgid "A generic version of :class:`collections.OrderedDict`." msgstr "" -#: ../../library/typing.rst:1499 +#: ../../library/typing.rst:1584 msgid "" ":class:`collections.OrderedDict` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1505 +#: ../../library/typing.rst:1590 msgid "A generic version of :class:`collections.ChainMap`." msgstr "" -#: ../../library/typing.rst:1510 +#: ../../library/typing.rst:1595 msgid "" ":class:`collections.ChainMap` now supports ``[]``. See :pep:`585` and :ref:" "`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1516 +#: ../../library/typing.rst:1601 msgid "A generic version of :class:`collections.Counter`." msgstr "" -#: ../../library/typing.rst:1521 +#: ../../library/typing.rst:1606 msgid "" ":class:`collections.Counter` now supports ``[]``. See :pep:`585` and :ref:" "`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1527 +#: ../../library/typing.rst:1612 msgid "A generic version of :class:`collections.deque`." msgstr "" -#: ../../library/typing.rst:1532 +#: ../../library/typing.rst:1617 msgid "" ":class:`collections.deque` now supports ``[]``. See :pep:`585` and :ref:" "`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1537 +#: ../../library/typing.rst:1622 msgid "Other concrete types" msgstr "" -#: ../../library/typing.rst:1543 +#: ../../library/typing.rst:1628 msgid "" "Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])`` and " "``BinaryIO(IO[bytes])`` represent the types of I/O streams such as returned " "by :func:`open`." msgstr "" -#: ../../library/typing.rst:1550 +#: ../../library/typing.rst:1635 msgid "" "The ``typing.io`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:1555 +#: ../../library/typing.rst:1640 msgid "" "These type aliases correspond to the return types from :func:`re.compile` " "and :func:`re.match`. These types (and the corresponding functions) are " @@ -1523,413 +1568,413 @@ msgid "" "``Pattern[bytes]``, ``Match[str]``, or ``Match[bytes]``." msgstr "" -#: ../../library/typing.rst:1565 +#: ../../library/typing.rst:1650 msgid "" "The ``typing.re`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:1566 +#: ../../library/typing.rst:1651 msgid "" "Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1572 +#: ../../library/typing.rst:1657 msgid "" "``Text`` is an alias for ``str``. It is provided to supply a forward " "compatible path for Python 2 code: in Python 2, ``Text`` is an alias for " "``unicode``." msgstr "" -#: ../../library/typing.rst:1576 +#: ../../library/typing.rst:1661 msgid "" "Use ``Text`` to indicate that a value must contain a unicode string in a " "manner that is compatible with both Python 2 and Python 3::" msgstr "" -#: ../../library/typing.rst:1585 +#: ../../library/typing.rst:1670 msgid "Abstract Base Classes" msgstr "" -#: ../../library/typing.rst:1588 +#: ../../library/typing.rst:1673 msgid "Corresponding to collections in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:1592 +#: ../../library/typing.rst:1677 msgid "A generic version of :class:`collections.abc.Set`." msgstr "" -#: ../../library/typing.rst:1594 +#: ../../library/typing.rst:1679 msgid "" ":class:`collections.abc.Set` now supports ``[]``. See :pep:`585` and :ref:" "`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1600 +#: ../../library/typing.rst:1685 msgid "A generic version of :class:`collections.abc.ByteString`." msgstr "" -#: ../../library/typing.rst:1602 +#: ../../library/typing.rst:1687 msgid "" "This type represents the types :class:`bytes`, :class:`bytearray`, and :" "class:`memoryview` of byte sequences." msgstr "" -#: ../../library/typing.rst:1605 +#: ../../library/typing.rst:1690 msgid "" "As a shorthand for this type, :class:`bytes` can be used to annotate " "arguments of any of the types mentioned above." msgstr "" -#: ../../library/typing.rst:1608 +#: ../../library/typing.rst:1693 msgid "" ":class:`collections.abc.ByteString` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1614 +#: ../../library/typing.rst:1699 msgid "A generic version of :class:`collections.abc.Collection`" msgstr "" -#: ../../library/typing.rst:1618 +#: ../../library/typing.rst:1703 msgid "" ":class:`collections.abc.Collection` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1624 +#: ../../library/typing.rst:1709 msgid "A generic version of :class:`collections.abc.Container`." msgstr "" -#: ../../library/typing.rst:1626 +#: ../../library/typing.rst:1711 msgid "" ":class:`collections.abc.Container` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1632 +#: ../../library/typing.rst:1717 msgid "A generic version of :class:`collections.abc.ItemsView`." msgstr "" -#: ../../library/typing.rst:1634 +#: ../../library/typing.rst:1719 msgid "" ":class:`collections.abc.ItemsView` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1640 +#: ../../library/typing.rst:1725 msgid "A generic version of :class:`collections.abc.KeysView`." msgstr "" -#: ../../library/typing.rst:1642 +#: ../../library/typing.rst:1727 msgid "" ":class:`collections.abc.KeysView` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1648 +#: ../../library/typing.rst:1733 msgid "" "A generic version of :class:`collections.abc.Mapping`. This type can be used " "as follows::" msgstr "" -#: ../../library/typing.rst:1654 +#: ../../library/typing.rst:1739 msgid "" ":class:`collections.abc.Mapping` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1660 +#: ../../library/typing.rst:1745 msgid "A generic version of :class:`collections.abc.MappingView`." msgstr "" -#: ../../library/typing.rst:1662 +#: ../../library/typing.rst:1747 msgid "" ":class:`collections.abc.MappingView` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1668 +#: ../../library/typing.rst:1753 msgid "A generic version of :class:`collections.abc.MutableMapping`." msgstr "" -#: ../../library/typing.rst:1670 +#: ../../library/typing.rst:1755 msgid "" ":class:`collections.abc.MutableMapping` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1676 +#: ../../library/typing.rst:1761 msgid "A generic version of :class:`collections.abc.MutableSequence`." msgstr "" -#: ../../library/typing.rst:1678 +#: ../../library/typing.rst:1763 msgid "" ":class:`collections.abc.MutableSequence` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1684 +#: ../../library/typing.rst:1769 msgid "A generic version of :class:`collections.abc.MutableSet`." msgstr "" -#: ../../library/typing.rst:1686 +#: ../../library/typing.rst:1771 msgid "" ":class:`collections.abc.MutableSet` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1692 +#: ../../library/typing.rst:1777 msgid "A generic version of :class:`collections.abc.Sequence`." msgstr "" -#: ../../library/typing.rst:1694 +#: ../../library/typing.rst:1779 msgid "" ":class:`collections.abc.Sequence` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1700 +#: ../../library/typing.rst:1785 msgid "A generic version of :class:`collections.abc.ValuesView`." msgstr "" -#: ../../library/typing.rst:1702 +#: ../../library/typing.rst:1787 msgid "" ":class:`collections.abc.ValuesView` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1707 +#: ../../library/typing.rst:1792 msgid "Corresponding to other types in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:1711 +#: ../../library/typing.rst:1796 msgid "A generic version of :class:`collections.abc.Iterable`." msgstr "" -#: ../../library/typing.rst:1713 +#: ../../library/typing.rst:1798 msgid "" ":class:`collections.abc.Iterable` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1719 +#: ../../library/typing.rst:1804 msgid "A generic version of :class:`collections.abc.Iterator`." msgstr "" -#: ../../library/typing.rst:1721 +#: ../../library/typing.rst:1806 msgid "" ":class:`collections.abc.Iterator` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1727 +#: ../../library/typing.rst:1812 msgid "" "A generator can be annotated by the generic type ``Generator[YieldType, " "SendType, ReturnType]``. For example::" msgstr "" -#: ../../library/typing.rst:1736 +#: ../../library/typing.rst:1821 msgid "" "Note that unlike many other generics in the typing module, the ``SendType`` " "of :class:`Generator` behaves contravariantly, not covariantly or " "invariantly." msgstr "" -#: ../../library/typing.rst:1740 +#: ../../library/typing.rst:1825 msgid "" "If your generator will only yield values, set the ``SendType`` and " "``ReturnType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:1748 +#: ../../library/typing.rst:1833 msgid "" "Alternatively, annotate your generator as having a return type of either " "``Iterable[YieldType]`` or ``Iterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:1756 +#: ../../library/typing.rst:1841 msgid "" ":class:`collections.abc.Generator` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1762 +#: ../../library/typing.rst:1847 msgid "An alias to :class:`collections.abc.Hashable`" msgstr "" -#: ../../library/typing.rst:1766 +#: ../../library/typing.rst:1851 msgid "A generic version of :class:`collections.abc.Reversible`." msgstr "" -#: ../../library/typing.rst:1768 +#: ../../library/typing.rst:1853 msgid "" ":class:`collections.abc.Reversible` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1774 +#: ../../library/typing.rst:1859 msgid "An alias to :class:`collections.abc.Sized`" msgstr "" -#: ../../library/typing.rst:1777 +#: ../../library/typing.rst:1862 msgid "Asynchronous programming" msgstr "" -#: ../../library/typing.rst:1781 +#: ../../library/typing.rst:1866 msgid "" "A generic version of :class:`collections.abc.Coroutine`. The variance and " "order of type variables correspond to those of :class:`Generator`, for " "example::" msgstr "" -#: ../../library/typing.rst:1793 +#: ../../library/typing.rst:1878 msgid "" ":class:`collections.abc.Coroutine` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1799 +#: ../../library/typing.rst:1884 msgid "" "An async generator can be annotated by the generic type " "``AsyncGenerator[YieldType, SendType]``. For example::" msgstr "" -#: ../../library/typing.rst:1808 +#: ../../library/typing.rst:1893 msgid "" "Unlike normal generators, async generators cannot return a value, so there " "is no ``ReturnType`` type parameter. As with :class:`Generator`, the " "``SendType`` behaves contravariantly." msgstr "" -#: ../../library/typing.rst:1812 +#: ../../library/typing.rst:1897 msgid "" "If your generator will only yield values, set the ``SendType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:1820 +#: ../../library/typing.rst:1905 msgid "" "Alternatively, annotate your generator as having a return type of either " "``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:1830 +#: ../../library/typing.rst:1915 msgid "" ":class:`collections.abc.AsyncGenerator` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1836 +#: ../../library/typing.rst:1921 msgid "A generic version of :class:`collections.abc.AsyncIterable`." msgstr "" -#: ../../library/typing.rst:1840 +#: ../../library/typing.rst:1925 msgid "" ":class:`collections.abc.AsyncIterable` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1846 +#: ../../library/typing.rst:1931 msgid "A generic version of :class:`collections.abc.AsyncIterator`." msgstr "" -#: ../../library/typing.rst:1850 +#: ../../library/typing.rst:1935 msgid "" ":class:`collections.abc.AsyncIterator` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1856 +#: ../../library/typing.rst:1941 msgid "A generic version of :class:`collections.abc.Awaitable`." msgstr "" -#: ../../library/typing.rst:1860 +#: ../../library/typing.rst:1945 msgid "" ":class:`collections.abc.Awaitable` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1866 +#: ../../library/typing.rst:1951 msgid "Context manager types" msgstr "" -#: ../../library/typing.rst:1870 +#: ../../library/typing.rst:1955 msgid "A generic version of :class:`contextlib.AbstractContextManager`." msgstr "" -#: ../../library/typing.rst:1875 +#: ../../library/typing.rst:1960 msgid "" ":class:`contextlib.AbstractContextManager` now supports ``[]``. See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1881 +#: ../../library/typing.rst:1966 msgid "A generic version of :class:`contextlib.AbstractAsyncContextManager`." msgstr "" -#: ../../library/typing.rst:1886 +#: ../../library/typing.rst:1971 msgid "" ":class:`contextlib.AbstractAsyncContextManager` now supports ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1891 +#: ../../library/typing.rst:1976 msgid "Protocols" msgstr "" -#: ../../library/typing.rst:1893 +#: ../../library/typing.rst:1978 msgid "These protocols are decorated with :func:`runtime_checkable`." msgstr "" -#: ../../library/typing.rst:1897 +#: ../../library/typing.rst:1982 msgid "" "An ABC with one abstract method ``__abs__`` that is covariant in its return " "type." msgstr "" -#: ../../library/typing.rst:1902 +#: ../../library/typing.rst:1987 msgid "An ABC with one abstract method ``__bytes__``." msgstr "" -#: ../../library/typing.rst:1906 +#: ../../library/typing.rst:1991 msgid "An ABC with one abstract method ``__complex__``." msgstr "" -#: ../../library/typing.rst:1910 +#: ../../library/typing.rst:1995 msgid "An ABC with one abstract method ``__float__``." msgstr "" -#: ../../library/typing.rst:1914 +#: ../../library/typing.rst:1999 msgid "An ABC with one abstract method ``__index__``." msgstr "" -#: ../../library/typing.rst:1920 +#: ../../library/typing.rst:2005 msgid "An ABC with one abstract method ``__int__``." msgstr "" -#: ../../library/typing.rst:1924 +#: ../../library/typing.rst:2009 msgid "" "An ABC with one abstract method ``__round__`` that is covariant in its " "return type." msgstr "" -#: ../../library/typing.rst:1928 +#: ../../library/typing.rst:2013 msgid "Functions and decorators" msgstr "函式與裝飾器" -#: ../../library/typing.rst:1932 +#: ../../library/typing.rst:2017 msgid "Cast a value to a type." msgstr "" -#: ../../library/typing.rst:1934 +#: ../../library/typing.rst:2019 msgid "" "This returns the value unchanged. To the type checker this signals that the " "return value has the designated type, but at runtime we intentionally don't " "check anything (we want this to be as fast as possible)." msgstr "" -#: ../../library/typing.rst:1941 +#: ../../library/typing.rst:2026 msgid "" "The ``@overload`` decorator allows describing functions and methods that " "support multiple different combinations of argument types. A series of " @@ -1944,69 +1989,69 @@ msgid "" "variable::" msgstr "" -#: ../../library/typing.rst:1965 +#: ../../library/typing.rst:2050 msgid "See :pep:`484` for details and comparison with other typing semantics." msgstr "" -#: ../../library/typing.rst:1969 +#: ../../library/typing.rst:2054 msgid "" "A decorator to indicate to type checkers that the decorated method cannot be " "overridden, and the decorated class cannot be subclassed. For example::" msgstr "" -#: ../../library/typing.rst:1994 +#: ../../library/typing.rst:2079 msgid "Decorator to indicate that annotations are not type hints." msgstr "" -#: ../../library/typing.rst:1996 +#: ../../library/typing.rst:2081 msgid "" "This works as class or function :term:`decorator`. With a class, it applies " "recursively to all methods defined in that class (but not to methods defined " "in its superclasses or subclasses)." msgstr "" -#: ../../library/typing.rst:2000 +#: ../../library/typing.rst:2085 msgid "This mutates the function(s) in place." msgstr "" -#: ../../library/typing.rst:2004 +#: ../../library/typing.rst:2089 msgid "Decorator to give another decorator the :func:`no_type_check` effect." msgstr "" -#: ../../library/typing.rst:2006 +#: ../../library/typing.rst:2091 msgid "" "This wraps the decorator with something that wraps the decorated function " "in :func:`no_type_check`." msgstr "" -#: ../../library/typing.rst:2011 +#: ../../library/typing.rst:2096 msgid "Decorator to mark a class or function to be unavailable at runtime." msgstr "" -#: ../../library/typing.rst:2013 +#: ../../library/typing.rst:2098 msgid "" "This decorator is itself not available at runtime. It is mainly intended to " "mark classes that are defined in type stub files if an implementation " "returns an instance of a private class::" msgstr "" -#: ../../library/typing.rst:2024 +#: ../../library/typing.rst:2109 msgid "" "Note that returning instances of private classes is not recommended. It is " "usually preferable to make such classes public." msgstr "" -#: ../../library/typing.rst:2028 +#: ../../library/typing.rst:2113 msgid "Introspection helpers" msgstr "" -#: ../../library/typing.rst:2032 +#: ../../library/typing.rst:2117 msgid "" "Return a dictionary containing type hints for a function, method, module or " "class object." msgstr "" -#: ../../library/typing.rst:2035 +#: ../../library/typing.rst:2120 msgid "" "This is often the same as ``obj.__annotations__``. In addition, forward " "references encoded as string literals are handled by evaluating them in " @@ -2016,29 +2061,29 @@ msgid "" "merging all the ``__annotations__`` along ``C.__mro__`` in reverse order." msgstr "" -#: ../../library/typing.rst:2043 +#: ../../library/typing.rst:2128 msgid "" "The function recursively replaces all ``Annotated[T, ...]`` with ``T``, " "unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for " "more information). For example::" msgstr "" -#: ../../library/typing.rst:2058 +#: ../../library/typing.rst:2143 msgid "" ":func:`get_type_hints` does not work with imported :ref:`type aliases ` that include forward references. Enabling postponed evaluation of " "annotations (:pep:`563`) may remove the need for most forward references." msgstr "" -#: ../../library/typing.rst:2063 +#: ../../library/typing.rst:2148 msgid "Added ``include_extras`` parameter as part of :pep:`593`." msgstr "新增 ``include_extras`` 參數(如 :pep:`593` 中所述)。" -#: ../../library/typing.rst:2069 +#: ../../library/typing.rst:2154 msgid "Provide basic introspection for generic types and special typing forms." msgstr "" -#: ../../library/typing.rst:2071 +#: ../../library/typing.rst:2156 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:" @@ -2049,11 +2094,11 @@ msgid "" "and ``()`` correspondingly. Examples::" msgstr "" -#: ../../library/typing.rst:2090 +#: ../../library/typing.rst:2175 msgid "Check if a type is a :class:`TypedDict`." msgstr "" -#: ../../library/typing.rst:2105 +#: ../../library/typing.rst:2190 msgid "" "A class used for internal typing representation of string forward " "references. For example, ``List[\"SomeClass\"]`` is implicitly transformed " @@ -2061,24 +2106,24 @@ msgid "" "instantiated by a user, but may be used by introspection tools." msgstr "" -#: ../../library/typing.rst:2111 +#: ../../library/typing.rst:2196 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:2118 +#: ../../library/typing.rst:2203 msgid "Constant" msgstr "常數" -#: ../../library/typing.rst:2122 +#: ../../library/typing.rst:2207 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:2131 +#: ../../library/typing.rst:2216 msgid "" "The first type annotation must be enclosed in quotes, making it a \"forward " "reference\", to hide the ``expensive_mod`` reference from the interpreter " @@ -2086,7 +2131,7 @@ msgid "" "second annotation does not need to be enclosed in quotes." msgstr "" -#: ../../library/typing.rst:2138 +#: ../../library/typing.rst:2223 msgid "" "If ``from __future__ import annotations`` is used in Python 3.7 or later, " "annotations are not evaluated at function definition time. Instead, they are " From 69396316258e75eb718048a4a877fac3d30b36a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 14 Mar 2022 00:16:21 +0000 Subject: [PATCH 6/8] sync with cpython d929aa70 --- library/importlib.metadata.po | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/library/importlib.metadata.po b/library/importlib.metadata.po index bbd3388ab1..ba287a407d 100644 --- a/library/importlib.metadata.po +++ b/library/importlib.metadata.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-08 14:58+0000\n" +"POT-Creation-Date: 2022-03-14 00:14+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -263,11 +263,11 @@ msgid "" "case of a namespace package) for top-level Python packages or modules::" msgstr "" -#: ../../library/importlib.metadata.rst:269 +#: ../../library/importlib.metadata.rst:270 msgid "Distributions" msgstr "" -#: ../../library/importlib.metadata.rst:271 +#: ../../library/importlib.metadata.rst:272 msgid "" "While the above API is the most common and convenient usage, you can get all " "of that information from the ``Distribution`` class. A ``Distribution`` is " @@ -275,29 +275,29 @@ msgid "" "can get the ``Distribution`` instance::" msgstr "" -#: ../../library/importlib.metadata.rst:279 +#: ../../library/importlib.metadata.rst:280 msgid "" "Thus, an alternative way to get the version number is through the " "``Distribution`` instance::" msgstr "" -#: ../../library/importlib.metadata.rst:285 +#: ../../library/importlib.metadata.rst:286 msgid "" "There are all kinds of additional metadata available on the ``Distribution`` " "instance::" msgstr "" -#: ../../library/importlib.metadata.rst:293 +#: ../../library/importlib.metadata.rst:294 msgid "" "The full set of available metadata is not described here. See :pep:`566` " "for additional details." msgstr "" -#: ../../library/importlib.metadata.rst:298 +#: ../../library/importlib.metadata.rst:299 msgid "Extending the search algorithm" msgstr "" -#: ../../library/importlib.metadata.rst:300 +#: ../../library/importlib.metadata.rst:301 msgid "" "Because package metadata is not available through :data:`sys.path` searches, " "or package loaders directly, the metadata for a package is found through " @@ -306,14 +306,14 @@ msgid "" "path finders ` on :data:`sys.meta_path`." msgstr "" -#: ../../library/importlib.metadata.rst:306 +#: ../../library/importlib.metadata.rst:307 msgid "" "The default ``PathFinder`` for Python includes a hook that calls into " "``importlib.metadata.MetadataPathFinder`` for finding distributions loaded " "from typical file-system-based paths." msgstr "" -#: ../../library/importlib.metadata.rst:310 +#: ../../library/importlib.metadata.rst:311 msgid "" "The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the " "interface expected of finders by Python's import system. ``importlib." @@ -323,14 +323,14 @@ msgid "" "base class, which defines this abstract method::" msgstr "" -#: ../../library/importlib.metadata.rst:324 +#: ../../library/importlib.metadata.rst:325 msgid "" "The ``DistributionFinder.Context`` object provides ``.path`` and ``.name`` " "properties indicating the path to search and name to match and may supply " "other relevant context." msgstr "" -#: ../../library/importlib.metadata.rst:328 +#: ../../library/importlib.metadata.rst:329 msgid "" "What this means in practice is that to support finding distribution package " "metadata in locations other than the file system, subclass ``Distribution`` " From 499a4292c9fbc24ce1bcb32469be224014ae40b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 15 Mar 2022 00:15:40 +0000 Subject: [PATCH 7/8] sync with cpython cebdc325 --- library/asyncio-stream.po | 144 ++--- library/os.po | 1091 +++++++++++++++++++------------------ whatsnew/3.7.po | 5 +- 3 files changed, 623 insertions(+), 617 deletions(-) diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 3c08c3679f..405eb6486e 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-19 00:13+0000\n" +"POT-Creation-Date: 2022-03-15 00:13+0000\n" "PO-Revision-Date: 2022-02-20 12:39+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -52,44 +52,48 @@ msgid "" "with streams:" msgstr "" -#: ../../library/asyncio-stream.rst:56 +#: ../../library/asyncio-stream.rst:57 msgid "" "Establish a network connection and return a pair of ``(reader, writer)`` " "objects." msgstr "" -#: ../../library/asyncio-stream.rst:59 +#: ../../library/asyncio-stream.rst:60 msgid "" "The returned *reader* and *writer* objects are instances of :class:" "`StreamReader` and :class:`StreamWriter` classes." msgstr "" -#: ../../library/asyncio-stream.rst:62 ../../library/asyncio-stream.rst:95 +#: ../../library/asyncio-stream.rst:63 ../../library/asyncio-stream.rst:99 msgid "" "*limit* determines the buffer size limit used by the returned :class:" "`StreamReader` instance. By default the *limit* is set to 64 KiB." msgstr "" -#: ../../library/asyncio-stream.rst:66 +#: ../../library/asyncio-stream.rst:67 msgid "" "The rest of the arguments are passed directly to :meth:`loop." "create_connection`." msgstr "" -#: ../../library/asyncio-stream.rst:69 +#: ../../library/asyncio-stream.rst:70 msgid "Added the *ssl_handshake_timeout* parameter." msgstr "新增 *ssl_handshake_timeout* 參數。" -#: ../../library/asyncio-stream.rst:72 ../../library/asyncio-stream.rst:105 -#: ../../library/asyncio-stream.rst:128 ../../library/asyncio-stream.rst:148 +#: ../../library/asyncio-stream.rst:73 +msgid "Added *happy_eyeballs_delay* and *interleave* parameters." +msgstr "" + +#: ../../library/asyncio-stream.rst:76 ../../library/asyncio-stream.rst:109 +#: ../../library/asyncio-stream.rst:132 ../../library/asyncio-stream.rst:152 msgid "Removed the *loop* parameter." msgstr "" -#: ../../library/asyncio-stream.rst:84 +#: ../../library/asyncio-stream.rst:88 msgid "Start a socket server." msgstr "" -#: ../../library/asyncio-stream.rst:86 +#: ../../library/asyncio-stream.rst:90 msgid "" "The *client_connected_cb* callback is called whenever a new client " "connection is established. It receives a ``(reader, writer)`` pair as two " @@ -97,44 +101,44 @@ msgid "" "classes." msgstr "" -#: ../../library/asyncio-stream.rst:91 +#: ../../library/asyncio-stream.rst:95 msgid "" "*client_connected_cb* can be a plain callable or a :ref:`coroutine function " "`; if it is a coroutine function, it will be automatically " "scheduled as a :class:`Task`." msgstr "" -#: ../../library/asyncio-stream.rst:99 +#: ../../library/asyncio-stream.rst:103 msgid "" "The rest of the arguments are passed directly to :meth:`loop.create_server`." msgstr "" -#: ../../library/asyncio-stream.rst:102 +#: ../../library/asyncio-stream.rst:106 msgid "Added the *ssl_handshake_timeout* and *start_serving* parameters." msgstr "新增 *ssl_handshake_timeout* 與 *start_serving* 參數。" -#: ../../library/asyncio-stream.rst:110 +#: ../../library/asyncio-stream.rst:114 msgid "Unix Sockets" msgstr "" -#: ../../library/asyncio-stream.rst:115 +#: ../../library/asyncio-stream.rst:119 msgid "" "Establish a Unix socket connection and return a pair of ``(reader, writer)``." msgstr "" -#: ../../library/asyncio-stream.rst:118 +#: ../../library/asyncio-stream.rst:122 msgid "Similar to :func:`open_connection` but operates on Unix sockets." msgstr "" -#: ../../library/asyncio-stream.rst:120 +#: ../../library/asyncio-stream.rst:124 msgid "See also the documentation of :meth:`loop.create_unix_connection`." msgstr "另請參閱 :meth:`loop.create_unix_connection` 文件。" -#: ../../library/asyncio-stream.rst:123 ../../library/asyncio-stream.rst:143 +#: ../../library/asyncio-stream.rst:127 ../../library/asyncio-stream.rst:147 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/asyncio-stream.rst:124 +#: ../../library/asyncio-stream.rst:128 msgid "" "Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " "a :term:`path-like object`" @@ -142,19 +146,19 @@ msgstr "" "新增 *ssl_handshake_timeout* 參數。\\ *path* 參數現在可以是個\\ :term:`path-" "like object`" -#: ../../library/asyncio-stream.rst:136 +#: ../../library/asyncio-stream.rst:140 msgid "Start a Unix socket server." msgstr "" -#: ../../library/asyncio-stream.rst:138 +#: ../../library/asyncio-stream.rst:142 msgid "Similar to :func:`start_server` but works with Unix sockets." msgstr "" -#: ../../library/asyncio-stream.rst:140 +#: ../../library/asyncio-stream.rst:144 msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "另請參閱 :meth:`loop.create_unix_server` 文件。" -#: ../../library/asyncio-stream.rst:144 +#: ../../library/asyncio-stream.rst:148 msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :term:`path-like object`." @@ -162,80 +166,80 @@ msgstr "" "新增 *ssl_handshake_timeout* 與 *start_serving* 參數。\\ *path* 參數現在可以" "是個 :term:`path-like object`\\ 。" -#: ../../library/asyncio-stream.rst:153 +#: ../../library/asyncio-stream.rst:157 msgid "StreamReader" msgstr "StreamReader" -#: ../../library/asyncio-stream.rst:157 +#: ../../library/asyncio-stream.rst:161 msgid "" "Represents a reader object that provides APIs to read data from the IO " "stream." msgstr "" -#: ../../library/asyncio-stream.rst:160 +#: ../../library/asyncio-stream.rst:164 msgid "" "It is not recommended to instantiate *StreamReader* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: ../../library/asyncio-stream.rst:166 +#: ../../library/asyncio-stream.rst:170 msgid "" "Read up to *n* bytes. If *n* is not provided, or set to ``-1``, read until " "EOF and return all read bytes." msgstr "" -#: ../../library/asyncio-stream.rst:169 +#: ../../library/asyncio-stream.rst:173 msgid "" "If EOF was received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" -#: ../../library/asyncio-stream.rst:174 +#: ../../library/asyncio-stream.rst:178 msgid "" "Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." msgstr "" -#: ../../library/asyncio-stream.rst:177 +#: ../../library/asyncio-stream.rst:181 msgid "" "If EOF is received and ``\\n`` was not found, the method returns partially " "read data." msgstr "" -#: ../../library/asyncio-stream.rst:180 +#: ../../library/asyncio-stream.rst:184 msgid "" "If EOF is received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" -#: ../../library/asyncio-stream.rst:185 +#: ../../library/asyncio-stream.rst:189 msgid "Read exactly *n* bytes." msgstr "" -#: ../../library/asyncio-stream.rst:187 +#: ../../library/asyncio-stream.rst:191 msgid "" "Raise an :exc:`IncompleteReadError` if EOF is reached before *n* can be " "read. Use the :attr:`IncompleteReadError.partial` attribute to get the " "partially read data." msgstr "" -#: ../../library/asyncio-stream.rst:193 +#: ../../library/asyncio-stream.rst:197 msgid "Read data from the stream until *separator* is found." msgstr "" -#: ../../library/asyncio-stream.rst:195 +#: ../../library/asyncio-stream.rst:199 msgid "" "On success, the data and separator will be removed from the internal buffer " "(consumed). Returned data will include the separator at the end." msgstr "" -#: ../../library/asyncio-stream.rst:199 +#: ../../library/asyncio-stream.rst:203 msgid "" "If the amount of data read exceeds the configured stream limit, a :exc:" "`LimitOverrunError` exception is raised, and the data is left in the " "internal buffer and can be read again." msgstr "" -#: ../../library/asyncio-stream.rst:203 +#: ../../library/asyncio-stream.rst:207 msgid "" "If EOF is reached before the complete separator is found, an :exc:" "`IncompleteReadError` exception is raised, and the internal buffer is " @@ -243,77 +247,77 @@ msgid "" "portion of the separator." msgstr "" -#: ../../library/asyncio-stream.rst:212 +#: ../../library/asyncio-stream.rst:216 msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." msgstr "" -#: ../../library/asyncio-stream.rst:217 +#: ../../library/asyncio-stream.rst:221 msgid "StreamWriter" msgstr "StreamWriter" -#: ../../library/asyncio-stream.rst:221 +#: ../../library/asyncio-stream.rst:225 msgid "" "Represents a writer object that provides APIs to write data to the IO stream." msgstr "" -#: ../../library/asyncio-stream.rst:224 +#: ../../library/asyncio-stream.rst:228 msgid "" "It is not recommended to instantiate *StreamWriter* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: ../../library/asyncio-stream.rst:230 +#: ../../library/asyncio-stream.rst:234 msgid "" "The method attempts to write the *data* to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: ../../library/asyncio-stream.rst:234 ../../library/asyncio-stream.rst:246 +#: ../../library/asyncio-stream.rst:238 ../../library/asyncio-stream.rst:250 msgid "The method should be used along with the ``drain()`` method::" msgstr "" -#: ../../library/asyncio-stream.rst:241 +#: ../../library/asyncio-stream.rst:245 msgid "" "The method writes a list (or any iterable) of bytes to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: ../../library/asyncio-stream.rst:253 +#: ../../library/asyncio-stream.rst:257 msgid "The method closes the stream and the underlying socket." msgstr "" -#: ../../library/asyncio-stream.rst:255 +#: ../../library/asyncio-stream.rst:259 msgid "The method should be used along with the ``wait_closed()`` method::" msgstr "" -#: ../../library/asyncio-stream.rst:262 +#: ../../library/asyncio-stream.rst:266 msgid "" "Return ``True`` if the underlying transport supports the :meth:`write_eof` " "method, ``False`` otherwise." msgstr "" -#: ../../library/asyncio-stream.rst:267 +#: ../../library/asyncio-stream.rst:271 msgid "" "Close the write end of the stream after the buffered write data is flushed." msgstr "" -#: ../../library/asyncio-stream.rst:272 +#: ../../library/asyncio-stream.rst:276 msgid "Return the underlying asyncio transport." msgstr "" -#: ../../library/asyncio-stream.rst:276 +#: ../../library/asyncio-stream.rst:280 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "" -#: ../../library/asyncio-stream.rst:281 +#: ../../library/asyncio-stream.rst:285 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" -#: ../../library/asyncio-stream.rst:287 +#: ../../library/asyncio-stream.rst:291 msgid "" "This is a flow control method that interacts with the underlying IO write " "buffer. When the size of the buffer reaches the high watermark, *drain()* " @@ -322,93 +326,93 @@ msgid "" "`drain` returns immediately." msgstr "" -#: ../../library/asyncio-stream.rst:296 +#: ../../library/asyncio-stream.rst:300 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "" -#: ../../library/asyncio-stream.rst:303 +#: ../../library/asyncio-stream.rst:307 msgid "Wait until the stream is closed." msgstr "" -#: ../../library/asyncio-stream.rst:305 +#: ../../library/asyncio-stream.rst:309 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed." msgstr "" -#: ../../library/asyncio-stream.rst:312 +#: ../../library/asyncio-stream.rst:316 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-stream.rst:317 +#: ../../library/asyncio-stream.rst:321 msgid "TCP echo client using streams" msgstr "" -#: ../../library/asyncio-stream.rst:319 +#: ../../library/asyncio-stream.rst:323 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" -#: ../../library/asyncio-stream.rst:341 +#: ../../library/asyncio-stream.rst:345 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" "`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-stream.rst:348 +#: ../../library/asyncio-stream.rst:352 msgid "TCP echo server using streams" msgstr "" -#: ../../library/asyncio-stream.rst:350 +#: ../../library/asyncio-stream.rst:354 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" -#: ../../library/asyncio-stream.rst:383 +#: ../../library/asyncio-stream.rst:387 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." "create_server` method." msgstr "" -#: ../../library/asyncio-stream.rst:388 +#: ../../library/asyncio-stream.rst:392 msgid "Get HTTP headers" msgstr "" -#: ../../library/asyncio-stream.rst:390 +#: ../../library/asyncio-stream.rst:394 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" -#: ../../library/asyncio-stream.rst:428 +#: ../../library/asyncio-stream.rst:432 msgid "Usage::" msgstr "" "用法:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:432 +#: ../../library/asyncio-stream.rst:436 msgid "or with HTTPS::" msgstr "" -#: ../../library/asyncio-stream.rst:440 +#: ../../library/asyncio-stream.rst:444 msgid "Register an open socket to wait for data using streams" msgstr "" -#: ../../library/asyncio-stream.rst:442 +#: ../../library/asyncio-stream.rst:446 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" msgstr "" -#: ../../library/asyncio-stream.rst:476 +#: ../../library/asyncio-stream.rst:480 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " "the :meth:`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-stream.rst:480 +#: ../../library/asyncio-stream.rst:484 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/os.po b/library/os.po index 1a86648ffd..0e7703ff36 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-20 00:10+0000\n" +"POT-Creation-Date: 2022-03-15 00:13+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-" @@ -288,32 +288,32 @@ msgstr "" #: ../../library/os.rst:1859 ../../library/os.rst:1873 #: ../../library/os.rst:1886 ../../library/os.rst:1913 #: ../../library/os.rst:1928 ../../library/os.rst:1941 -#: ../../library/os.rst:2129 ../../library/os.rst:2151 -#: ../../library/os.rst:2195 ../../library/os.rst:2206 -#: ../../library/os.rst:2883 ../../library/os.rst:3037 -#: ../../library/os.rst:3269 ../../library/os.rst:3662 -#: ../../library/os.rst:3670 ../../library/os.rst:3677 -#: ../../library/os.rst:3684 ../../library/os.rst:3691 -#: ../../library/os.rst:3698 ../../library/os.rst:3705 -#: ../../library/os.rst:3712 ../../library/os.rst:3720 -#: ../../library/os.rst:3728 ../../library/os.rst:3735 -#: ../../library/os.rst:3742 ../../library/os.rst:3751 -#: ../../library/os.rst:3759 ../../library/os.rst:3767 -#: ../../library/os.rst:3774 ../../library/os.rst:3781 -#: ../../library/os.rst:3802 ../../library/os.rst:3857 -#: ../../library/os.rst:3864 ../../library/os.rst:3885 -#: ../../library/os.rst:4001 ../../library/os.rst:4049 -#: ../../library/os.rst:4281 ../../library/os.rst:4302 -#: ../../library/os.rst:4313 ../../library/os.rst:4333 -#: ../../library/os.rst:4348 ../../library/os.rst:4403 -#: ../../library/os.rst:4417 ../../library/os.rst:4455 -#: ../../library/os.rst:4471 ../../library/os.rst:4485 -#: ../../library/os.rst:4496 ../../library/os.rst:4508 -#: ../../library/os.rst:4515 ../../library/os.rst:4524 -#: ../../library/os.rst:4533 ../../library/os.rst:4542 -#: ../../library/os.rst:4551 ../../library/os.rst:4697 -#: ../../library/os.rst:4706 ../../library/os.rst:4727 -#: ../../library/os.rst:4737 ../../library/os.rst:4746 +#: ../../library/os.rst:2130 ../../library/os.rst:2152 +#: ../../library/os.rst:2196 ../../library/os.rst:2207 +#: ../../library/os.rst:2884 ../../library/os.rst:3038 +#: ../../library/os.rst:3270 ../../library/os.rst:3663 +#: ../../library/os.rst:3671 ../../library/os.rst:3678 +#: ../../library/os.rst:3685 ../../library/os.rst:3692 +#: ../../library/os.rst:3699 ../../library/os.rst:3706 +#: ../../library/os.rst:3713 ../../library/os.rst:3721 +#: ../../library/os.rst:3729 ../../library/os.rst:3736 +#: ../../library/os.rst:3743 ../../library/os.rst:3752 +#: ../../library/os.rst:3760 ../../library/os.rst:3768 +#: ../../library/os.rst:3775 ../../library/os.rst:3782 +#: ../../library/os.rst:3803 ../../library/os.rst:3858 +#: ../../library/os.rst:3865 ../../library/os.rst:3886 +#: ../../library/os.rst:4002 ../../library/os.rst:4050 +#: ../../library/os.rst:4282 ../../library/os.rst:4303 +#: ../../library/os.rst:4314 ../../library/os.rst:4334 +#: ../../library/os.rst:4349 ../../library/os.rst:4404 +#: ../../library/os.rst:4418 ../../library/os.rst:4456 +#: ../../library/os.rst:4472 ../../library/os.rst:4486 +#: ../../library/os.rst:4497 ../../library/os.rst:4509 +#: ../../library/os.rst:4516 ../../library/os.rst:4525 +#: ../../library/os.rst:4534 ../../library/os.rst:4543 +#: ../../library/os.rst:4552 ../../library/os.rst:4698 +#: ../../library/os.rst:4707 ../../library/os.rst:4728 +#: ../../library/os.rst:4738 ../../library/os.rst:4747 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" @@ -539,11 +539,11 @@ msgstr "" #: ../../library/os.rst:397 ../../library/os.rst:432 ../../library/os.rst:932 #: ../../library/os.rst:944 ../../library/os.rst:1146 ../../library/os.rst:1568 -#: ../../library/os.rst:1957 ../../library/os.rst:2229 -#: ../../library/os.rst:3017 ../../library/os.rst:3051 -#: ../../library/os.rst:3629 ../../library/os.rst:4134 -#: ../../library/os.rst:4145 ../../library/os.rst:4239 -#: ../../library/os.rst:4263 +#: ../../library/os.rst:1957 ../../library/os.rst:2230 +#: ../../library/os.rst:3018 ../../library/os.rst:3052 +#: ../../library/os.rst:3630 ../../library/os.rst:4135 +#: ../../library/os.rst:4146 ../../library/os.rst:4240 +#: ../../library/os.rst:4264 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" @@ -790,7 +790,7 @@ msgstr "" msgid ":ref:`Availability `: recent flavors of Unix." msgstr ":ref:`適用 `:近期的 Unix。" -#: ../../library/os.rst:702 ../../library/os.rst:4264 +#: ../../library/os.rst:702 ../../library/os.rst:4265 msgid "" "Return type changed from a tuple to a tuple-like object with named " "attributes." @@ -1008,7 +1008,7 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:892 ../../library/os.rst:2186 +#: ../../library/os.rst:892 ../../library/os.rst:2187 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 " @@ -1068,7 +1068,7 @@ msgid "" "``fd``, ``length``." msgstr "" -#: ../../library/os.rst:945 ../../library/os.rst:3054 +#: ../../library/os.rst:945 ../../library/os.rst:3055 msgid "Added support for Windows" msgstr "新增對 Windows 的支援" @@ -1165,14 +1165,14 @@ msgid "" "a file descriptor in a file object, use :func:`fdopen`." msgstr "" -#: ../../library/os.rst:1042 ../../library/os.rst:2062 -#: ../../library/os.rst:2130 ../../library/os.rst:2152 -#: ../../library/os.rst:2233 ../../library/os.rst:2264 +#: ../../library/os.rst:1042 ../../library/os.rst:2063 +#: ../../library/os.rst:2131 ../../library/os.rst:2153 +#: ../../library/os.rst:2234 ../../library/os.rst:2265 msgid "The *dir_fd* argument." msgstr "*dir_fd* 引數。" #: ../../library/os.rst:1045 ../../library/os.rst:1364 -#: ../../library/os.rst:1523 ../../library/os.rst:4385 +#: ../../library/os.rst:1523 ../../library/os.rst:4386 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 :" @@ -1184,16 +1184,16 @@ msgstr "" #: ../../library/os.rst:1840 ../../library/os.rst:1874 #: ../../library/os.rst:1914 ../../library/os.rst:1929 #: ../../library/os.rst:1942 ../../library/os.rst:2001 -#: ../../library/os.rst:2030 ../../library/os.rst:2065 -#: ../../library/os.rst:2106 ../../library/os.rst:2133 -#: ../../library/os.rst:2155 ../../library/os.rst:2196 -#: ../../library/os.rst:2267 ../../library/os.rst:2286 -#: ../../library/os.rst:2372 ../../library/os.rst:2645 -#: ../../library/os.rst:2896 ../../library/os.rst:3057 -#: ../../library/os.rst:3073 ../../library/os.rst:3113 -#: ../../library/os.rst:3211 ../../library/os.rst:3272 -#: ../../library/os.rst:3455 ../../library/os.rst:3634 -#: ../../library/os.rst:4122 +#: ../../library/os.rst:2030 ../../library/os.rst:2066 +#: ../../library/os.rst:2107 ../../library/os.rst:2134 +#: ../../library/os.rst:2156 ../../library/os.rst:2197 +#: ../../library/os.rst:2268 ../../library/os.rst:2287 +#: ../../library/os.rst:2373 ../../library/os.rst:2646 +#: ../../library/os.rst:2897 ../../library/os.rst:3058 +#: ../../library/os.rst:3074 ../../library/os.rst:3114 +#: ../../library/os.rst:3212 ../../library/os.rst:3273 +#: ../../library/os.rst:3456 ../../library/os.rst:3635 +#: ../../library/os.rst:4123 msgid "Accepts a :term:`path-like object`." msgstr "" @@ -1254,7 +1254,7 @@ msgid "" msgstr "" #: ../../library/os.rst:1134 ../../library/os.rst:1160 -#: ../../library/os.rst:3819 +#: ../../library/os.rst:3820 msgid ":ref:`Availability `: some flavors of Unix." msgstr ":ref:`適用 `:部分的 Unix。" @@ -1715,8 +1715,8 @@ msgid "Get the \"inheritable\" flag of the specified handle (a boolean)." msgstr "" #: ../../library/os.rst:1617 ../../library/os.rst:1623 -#: ../../library/os.rst:3561 ../../library/os.rst:4157 -#: ../../library/os.rst:4203 +#: ../../library/os.rst:3562 ../../library/os.rst:4158 +#: ../../library/os.rst:4204 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" @@ -2032,7 +2032,7 @@ msgid ":data:`stat.S_IXOTH`" msgstr ":data:`stat.S_IXOTH`" #: ../../library/os.rst:1824 ../../library/os.rst:1849 -#: ../../library/os.rst:3103 +#: ../../library/os.rst:3104 msgid "" "This function can support :ref:`specifying a file descriptor `, :" "ref:`paths relative to directory descriptors ` and :ref:`not " @@ -2141,8 +2141,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:1964 ../../library/os.rst:2316 -#: ../../library/os.rst:2353 ../../library/os.rst:3025 +#: ../../library/os.rst:1964 ../../library/os.rst:2317 +#: ../../library/os.rst:2354 ../../library/os.rst:3026 msgid "Accepts a :term:`path-like object` for *src* and *dst*." msgstr "" @@ -2163,7 +2163,7 @@ msgid "" "circumstances, they will be of type ``str``." msgstr "" -#: ../../library/os.rst:1981 ../../library/os.rst:2401 +#: ../../library/os.rst:1981 ../../library/os.rst:2402 msgid "" "This function can also support :ref:`specifying a file descriptor " "`; the file descriptor must refer to a directory." @@ -2189,7 +2189,7 @@ msgstr "" msgid "The *path* parameter became optional." msgstr "" -#: ../../library/os.rst:1998 ../../library/os.rst:2887 +#: ../../library/os.rst:1998 ../../library/os.rst:2888 msgid "Added support for specifying *path* as an open file descriptor." msgstr "" @@ -2212,16 +2212,16 @@ msgid "" "follow_symlinks=False)``." msgstr "" -#: ../../library/os.rst:2017 ../../library/os.rst:2054 -#: ../../library/os.rst:2119 ../../library/os.rst:2147 -#: ../../library/os.rst:2221 +#: ../../library/os.rst:2017 ../../library/os.rst:2055 +#: ../../library/os.rst:2120 ../../library/os.rst:2148 +#: ../../library/os.rst:2222 msgid "" "This function can also support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../library/os.rst:2024 ../../library/os.rst:2230 -#: ../../library/os.rst:3018 +#: ../../library/os.rst:2024 ../../library/os.rst:2231 +#: ../../library/os.rst:3019 msgid "Added support for Windows 6.0 (Vista) symbolic links." msgstr "" @@ -2242,10 +2242,13 @@ msgid "Create a directory named *path* with numeric mode *mode*." msgstr "" #: ../../library/os.rst:2044 -msgid "If the directory already exists, :exc:`FileExistsError` is raised." +msgid "" +"If the directory already exists, :exc:`FileExistsError` is raised. If a " +"parent directory in the path does not exist, :exc:`FileNotFoundError` is " +"raised." msgstr "" -#: ../../library/os.rst:2048 +#: ../../library/os.rst:2049 msgid "" "On some systems, *mode* is ignored. Where it is used, the current umask " "value is first masked out. If bits other than the last 9 (i.e. the last 3 " @@ -2254,25 +2257,25 @@ msgid "" "call :func:`chmod` explicitly to set them." msgstr "" -#: ../../library/os.rst:2057 +#: ../../library/os.rst:2058 msgid "" "It is also possible to create temporary directories; see the :mod:`tempfile` " "module's :func:`tempfile.mkdtemp` function." msgstr "" -#: ../../library/os.rst:2060 ../../library/os.rst:2094 +#: ../../library/os.rst:2061 ../../library/os.rst:2095 msgid "" "Raises an :ref:`auditing event ` ``os.mkdir`` with arguments " "``path``, ``mode``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:2075 +#: ../../library/os.rst:2076 msgid "" "Recursive directory creation function. Like :func:`mkdir`, but makes all " "intermediate-level directories needed to contain the leaf directory." msgstr "" -#: ../../library/os.rst:2078 +#: ../../library/os.rst:2079 msgid "" "The *mode* parameter is passed to :func:`mkdir` for creating the leaf " "directory; see :ref:`the mkdir() description ` for how it is " @@ -2281,27 +2284,27 @@ msgid "" "file permission bits of existing parent directories are not changed." msgstr "" -#: ../../library/os.rst:2084 +#: ../../library/os.rst:2085 msgid "" "If *exist_ok* is ``False`` (the default), an :exc:`FileExistsError` is " "raised if the target directory already exists." msgstr "" -#: ../../library/os.rst:2089 +#: ../../library/os.rst:2090 msgid "" ":func:`makedirs` will become confused if the path elements to create " "include :data:`pardir` (eg. \"..\" on UNIX systems)." msgstr "" -#: ../../library/os.rst:2092 +#: ../../library/os.rst:2093 msgid "This function handles UNC paths correctly." msgstr "" -#: ../../library/os.rst:2096 +#: ../../library/os.rst:2097 msgid "The *exist_ok* parameter." msgstr "*exist_ok* 參數。" -#: ../../library/os.rst:2101 +#: ../../library/os.rst:2102 msgid "" "Before Python 3.4.1, if *exist_ok* was ``True`` and the directory existed, :" "func:`makedirs` would still raise an error if *mode* did not match the mode " @@ -2309,19 +2312,19 @@ msgid "" "safely, it was removed in Python 3.4.1. See :issue:`21082`." msgstr "" -#: ../../library/os.rst:2109 +#: ../../library/os.rst:2110 msgid "" "The *mode* argument no longer affects the file permission bits of newly-" "created intermediate-level directories." msgstr "" -#: ../../library/os.rst:2116 +#: ../../library/os.rst:2117 msgid "" "Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The " "current umask value is first masked out from the mode." msgstr "" -#: ../../library/os.rst:2122 +#: ../../library/os.rst:2123 msgid "" "FIFOs are pipes that can be accessed like regular files. FIFOs exist until " "they are deleted (for example with :func:`os.unlink`). Generally, FIFOs are " @@ -2331,7 +2334,7 @@ msgid "" "rendezvous point." msgstr "" -#: ../../library/os.rst:2139 +#: ../../library/os.rst:2140 msgid "" "Create a filesystem node (file, device special file or named pipe) named " "*path*. *mode* specifies both the permissions to use and the type of node to " @@ -2342,23 +2345,23 @@ msgid "" "`os.makedev`), otherwise it is ignored." msgstr "" -#: ../../library/os.rst:2161 +#: ../../library/os.rst:2162 msgid "" "Extract the device major number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:type:`stat`)." msgstr "" -#: ../../library/os.rst:2167 +#: ../../library/os.rst:2168 msgid "" "Extract the device minor number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:type:`stat`)." msgstr "" -#: ../../library/os.rst:2173 +#: ../../library/os.rst:2174 msgid "Compose a raw device number from the major and minor device numbers." msgstr "" -#: ../../library/os.rst:2178 +#: ../../library/os.rst:2179 msgid "" "Return system configuration information relevant to a named file. *name* " "specifies the configuration value to retrieve; it may be a string which is " @@ -2369,20 +2372,20 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:2191 ../../library/os.rst:2880 -#: ../../library/os.rst:3046 +#: ../../library/os.rst:2192 ../../library/os.rst:2881 +#: ../../library/os.rst:3047 msgid "" "This function can support :ref:`specifying a file descriptor `." msgstr "" -#: ../../library/os.rst:2202 +#: ../../library/os.rst:2203 msgid "" "Dictionary mapping names accepted by :func:`pathconf` and :func:`fpathconf` " "to the integer values defined for those names by the host operating system. " "This can be used to determine the set of names known to the system." msgstr "" -#: ../../library/os.rst:2211 +#: ../../library/os.rst:2212 msgid "" "Return a string representing the path to which the symbolic link points. " "The result may be either an absolute or relative pathname; if it is " @@ -2390,7 +2393,7 @@ msgid "" "join(os.path.dirname(path), result)``." msgstr "" -#: ../../library/os.rst:2216 +#: ../../library/os.rst:2217 msgid "" "If the *path* is a string object (directly or indirectly through a :class:" "`PathLike` interface), the result will also be a string object, and the call " @@ -2398,42 +2401,42 @@ msgid "" "indirectly), the result will be a bytes object." msgstr "" -#: ../../library/os.rst:2224 +#: ../../library/os.rst:2225 msgid "" "When trying to resolve a path that may contain links, use :func:`~os.path." "realpath` to properly handle recursion and platform differences." msgstr "" -#: ../../library/os.rst:2236 +#: ../../library/os.rst:2237 msgid "Accepts a :term:`path-like object` on Unix." msgstr "" -#: ../../library/os.rst:2239 +#: ../../library/os.rst:2240 msgid "Accepts a :term:`path-like object` and a bytes object on Windows." msgstr "" -#: ../../library/os.rst:2242 +#: ../../library/os.rst:2243 msgid "" "Added support for directory junctions, and changed to return the " "substitution path (which typically includes ``\\\\?\\`` prefix) rather than " "the optional \"print name\" field that was previously returned." msgstr "" -#: ../../library/os.rst:2249 +#: ../../library/os.rst:2250 msgid "" "Remove (delete) the file *path*. If *path* is a directory, an :exc:" "`IsADirectoryError` is raised. Use :func:`rmdir` to remove directories. If " "the file does not exist, a :exc:`FileNotFoundError` is raised." msgstr "" -#: ../../library/os.rst:2253 ../../library/os.rst:2364 -#: ../../library/os.rst:3000 +#: ../../library/os.rst:2254 ../../library/os.rst:2365 +#: ../../library/os.rst:3001 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../library/os.rst:2256 +#: ../../library/os.rst:2257 msgid "" "On Windows, attempting to remove a file that is in use causes an exception " "to be raised; on Unix, the directory entry is removed but the storage " @@ -2441,18 +2444,18 @@ msgid "" "longer in use." msgstr "" -#: ../../library/os.rst:2260 +#: ../../library/os.rst:2261 msgid "This function is semantically identical to :func:`unlink`." msgstr "" -#: ../../library/os.rst:2262 ../../library/os.rst:2284 -#: ../../library/os.rst:3068 +#: ../../library/os.rst:2263 ../../library/os.rst:2285 +#: ../../library/os.rst:3069 msgid "" "Raises an :ref:`auditing event ` ``os.remove`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:2275 +#: ../../library/os.rst:2276 msgid "" "Remove directories recursively. Works like :func:`rmdir` except that, if " "the leaf directory is successfully removed, :func:`removedirs` tries to " @@ -2464,17 +2467,17 @@ msgid "" "could not be successfully removed." msgstr "" -#: ../../library/os.rst:2292 +#: ../../library/os.rst:2293 msgid "" "Rename the file or directory *src* to *dst*. If *dst* exists, the operation " "will fail with an :exc:`OSError` subclass in a number of cases:" msgstr "" -#: ../../library/os.rst:2295 +#: ../../library/os.rst:2296 msgid "On Windows, if *dst* exists a :exc:`FileExistsError` is always raised." msgstr "" -#: ../../library/os.rst:2297 +#: ../../library/os.rst:2298 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 " @@ -2486,30 +2489,30 @@ msgid "" "atomic operation (this is a POSIX requirement)." msgstr "" -#: ../../library/os.rst:2306 ../../library/os.rst:2346 +#: ../../library/os.rst:2307 ../../library/os.rst:2347 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:2309 +#: ../../library/os.rst:2310 msgid "" "If you want cross-platform overwriting of the destination, use :func:" "`replace`." msgstr "" -#: ../../library/os.rst:2311 ../../library/os.rst:2332 -#: ../../library/os.rst:2349 +#: ../../library/os.rst:2312 ../../library/os.rst:2333 +#: ../../library/os.rst:2350 msgid "" "Raises an :ref:`auditing event ` ``os.rename`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: ../../library/os.rst:2313 +#: ../../library/os.rst:2314 msgid "The *src_dir_fd* and *dst_dir_fd* arguments." msgstr "" -#: ../../library/os.rst:2322 +#: ../../library/os.rst:2323 msgid "" "Recursive directory or file renaming function. Works like :func:`rename`, " "except creation of any intermediate directories needed to make the new " @@ -2518,17 +2521,17 @@ msgid "" "using :func:`removedirs`." msgstr "" -#: ../../library/os.rst:2329 +#: ../../library/os.rst:2330 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:2334 +#: ../../library/os.rst:2335 msgid "Accepts a :term:`path-like object` for *old* and *new*." msgstr "" -#: ../../library/os.rst:2340 +#: ../../library/os.rst:2341 msgid "" "Rename the file or directory *src* to *dst*. If *dst* is a directory, :exc:" "`OSError` will be raised. If *dst* exists and is a file, it will be " @@ -2537,7 +2540,7 @@ msgid "" "will be an atomic operation (this is a POSIX requirement)." msgstr "" -#: ../../library/os.rst:2359 +#: ../../library/os.rst:2360 msgid "" "Remove (delete) the directory *path*. If the directory does not exist or is " "not empty, an :exc:`FileNotFoundError` or an :exc:`OSError` is raised " @@ -2545,17 +2548,17 @@ msgid "" "rmtree` can be used." msgstr "" -#: ../../library/os.rst:2367 +#: ../../library/os.rst:2368 msgid "" "Raises an :ref:`auditing event ` ``os.rmdir`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:2369 ../../library/os.rst:3070 +#: ../../library/os.rst:2370 ../../library/os.rst:3071 msgid "The *dir_fd* parameter." msgstr "*dir_fd* 參數。" -#: ../../library/os.rst:2378 +#: ../../library/os.rst:2379 msgid "" "Return an iterator of :class:`os.DirEntry` objects corresponding to the " "entries in the directory given by *path*. The entries are yielded in " @@ -2565,7 +2568,7 @@ msgid "" "unspecified." msgstr "" -#: ../../library/os.rst:2385 +#: ../../library/os.rst:2386 msgid "" "Using :func:`scandir` instead of :func:`listdir` can significantly increase " "the performance of code that also needs file type or file attribute " @@ -2577,7 +2580,7 @@ msgid "" "Unix but only requires one for symbolic links on Windows." msgstr "" -#: ../../library/os.rst:2395 +#: ../../library/os.rst:2396 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 " @@ -2586,30 +2589,30 @@ msgid "" "they will be of type ``str``." msgstr "" -#: ../../library/os.rst:2404 +#: ../../library/os.rst:2405 msgid "" "Raises an :ref:`auditing event ` ``os.scandir`` with argument " "``path``." msgstr "" -#: ../../library/os.rst:2406 +#: ../../library/os.rst:2407 msgid "" "The :func:`scandir` iterator supports the :term:`context manager` protocol " "and has the following method:" msgstr "" -#: ../../library/os.rst:2411 +#: ../../library/os.rst:2412 msgid "Close the iterator and free acquired resources." msgstr "" -#: ../../library/os.rst:2413 +#: ../../library/os.rst:2414 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:2420 +#: ../../library/os.rst:2421 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 " @@ -2617,7 +2620,7 @@ msgid "" "system call::" msgstr "" -#: ../../library/os.rst:2432 +#: ../../library/os.rst:2433 msgid "" "On Unix-based systems, :func:`scandir` uses the system's `opendir() `_ and " @@ -2628,7 +2631,7 @@ msgid "" "desktop/aa364428(v=vs.85).aspx>`_ functions." msgstr "" -#: ../../library/os.rst:2444 +#: ../../library/os.rst:2445 msgid "" "Added support for the :term:`context manager` protocol and the :func:" "`~scandir.close()` method. If a :func:`scandir` iterator is neither " @@ -2636,28 +2639,28 @@ msgid "" "its destructor." msgstr "" -#: ../../library/os.rst:2450 +#: ../../library/os.rst:2451 msgid "The function accepts a :term:`path-like object`." msgstr "" -#: ../../library/os.rst:2452 +#: ../../library/os.rst:2453 msgid "Added support for :ref:`file descriptors ` on Unix." msgstr "" -#: ../../library/os.rst:2458 +#: ../../library/os.rst:2459 msgid "" "Object yielded by :func:`scandir` to expose the file path and other file " "attributes of a directory entry." msgstr "" -#: ../../library/os.rst:2461 +#: ../../library/os.rst:2462 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:2465 +#: ../../library/os.rst:2466 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 " @@ -2665,7 +2668,7 @@ msgid "" "up-to-date information." msgstr "" -#: ../../library/os.rst:2470 +#: ../../library/os.rst:2471 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 " @@ -2673,29 +2676,29 @@ msgid "" "methods and handle as appropriate." msgstr "" -#: ../../library/os.rst:2475 +#: ../../library/os.rst:2476 msgid "" "To be directly usable as a :term:`path-like object`, ``os.DirEntry`` " "implements the :class:`PathLike` interface." msgstr "" -#: ../../library/os.rst:2478 +#: ../../library/os.rst:2479 msgid "Attributes and methods on a ``os.DirEntry`` instance are as follows:" msgstr "" -#: ../../library/os.rst:2482 +#: ../../library/os.rst:2483 msgid "" "The entry's base filename, relative to the :func:`scandir` *path* argument." msgstr "" -#: ../../library/os.rst:2485 +#: ../../library/os.rst:2486 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:2491 +#: ../../library/os.rst:2492 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 " @@ -2705,51 +2708,51 @@ msgid "" "attribute." msgstr "" -#: ../../library/os.rst:2498 +#: ../../library/os.rst:2499 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:2504 +#: ../../library/os.rst:2505 msgid "Return the inode number of the entry." msgstr "" -#: ../../library/os.rst:2506 +#: ../../library/os.rst:2507 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:2510 +#: ../../library/os.rst:2511 msgid "" "On the first, uncached call, a system call is required on Windows but not on " "Unix." msgstr "" -#: ../../library/os.rst:2515 +#: ../../library/os.rst:2516 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:2519 +#: ../../library/os.rst:2520 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:2523 +#: ../../library/os.rst:2524 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:2527 +#: ../../library/os.rst:2528 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 " @@ -2759,46 +2762,46 @@ msgid "" "is ``False``." msgstr "" -#: ../../library/os.rst:2534 ../../library/os.rst:2564 +#: ../../library/os.rst:2535 ../../library/os.rst:2565 msgid "" "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :" "exc:`FileNotFoundError` is caught and not raised." msgstr "" -#: ../../library/os.rst:2539 +#: ../../library/os.rst:2540 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:2543 +#: ../../library/os.rst:2544 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:2547 +#: ../../library/os.rst:2548 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:2552 +#: ../../library/os.rst:2553 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:2556 +#: ../../library/os.rst:2557 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:2559 +#: ../../library/os.rst:2560 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 " @@ -2806,35 +2809,35 @@ msgid "" "``dirent.d_type == DT_UNKNOWN``." msgstr "" -#: ../../library/os.rst:2569 +#: ../../library/os.rst:2570 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:2573 +#: ../../library/os.rst:2574 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:2578 +#: ../../library/os.rst:2579 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:2582 +#: ../../library/os.rst:2583 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:2586 +#: ../../library/os.rst:2587 msgid "" "Note that there is a nice correspondence between several attributes and " "methods of ``os.DirEntry`` and of :class:`pathlib.Path`. In particular, the " @@ -2842,13 +2845,13 @@ msgid "" "``is_file()``, ``is_symlink()`` and ``stat()`` methods." msgstr "" -#: ../../library/os.rst:2594 +#: ../../library/os.rst:2595 msgid "" "Added support for the :class:`~os.PathLike` interface. Added support for :" "class:`bytes` paths on Windows." msgstr "" -#: ../../library/os.rst:2601 +#: ../../library/os.rst:2602 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 " @@ -2857,21 +2860,21 @@ msgid "" "`stat_result` object." msgstr "" -#: ../../library/os.rst:2607 +#: ../../library/os.rst:2608 msgid "" "This function normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :func:`lstat`." msgstr "" -#: ../../library/os.rst:2610 ../../library/os.rst:3434 -#: ../../library/os.rst:3450 ../../library/os.rst:3466 -#: ../../library/os.rst:3486 +#: ../../library/os.rst:2611 ../../library/os.rst:3435 +#: ../../library/os.rst:3451 ../../library/os.rst:3467 +#: ../../library/os.rst:3487 msgid "" "This function can support :ref:`specifying a file descriptor ` and :" "ref:`not following symlinks `." msgstr "" -#: ../../library/os.rst:2613 +#: ../../library/os.rst:2614 msgid "" "On Windows, passing ``follow_symlinks=False`` will disable following all " "name-surrogate reparse points, which includes symlinks and directory " @@ -2885,24 +2888,24 @@ msgid "" "junction points, which will raise the usual exceptions." msgstr "" -#: ../../library/os.rst:2626 ../../library/os.rst:3354 +#: ../../library/os.rst:2627 ../../library/os.rst:3355 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/os.rst:2639 +#: ../../library/os.rst:2640 msgid ":func:`fstat` and :func:`lstat` functions." msgstr ":func:`fstat` 和 :func:`lstat` 函式。" -#: ../../library/os.rst:2641 +#: ../../library/os.rst:2642 msgid "" "Added the *dir_fd* and *follow_symlinks* arguments, specifying a file " "descriptor instead of a path." msgstr "" -#: ../../library/os.rst:2648 +#: ../../library/os.rst:2649 msgid "" "On Windows, all reparse points that can be resolved by the operating system " "are now followed, and passing ``follow_symlinks=False`` disables following " @@ -2912,100 +2915,100 @@ msgid "" "of raising an error." msgstr "" -#: ../../library/os.rst:2659 +#: ../../library/os.rst:2660 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:2663 +#: ../../library/os.rst:2664 msgid "Attributes:" msgstr "" -#: ../../library/os.rst:2667 +#: ../../library/os.rst:2668 msgid "File mode: file type and file mode bits (permissions)." msgstr "" -#: ../../library/os.rst:2671 +#: ../../library/os.rst:2672 msgid "" "Platform dependent, but if non-zero, uniquely identifies the file for a " "given value of ``st_dev``. Typically:" msgstr "" -#: ../../library/os.rst:2674 +#: ../../library/os.rst:2675 msgid "the inode number on Unix," msgstr "" -#: ../../library/os.rst:2675 +#: ../../library/os.rst:2676 msgid "" "the `file index `_ on " "Windows" msgstr "" -#: ../../library/os.rst:2681 +#: ../../library/os.rst:2682 msgid "Identifier of the device on which this file resides." msgstr "" -#: ../../library/os.rst:2685 +#: ../../library/os.rst:2686 msgid "Number of hard links." msgstr "" -#: ../../library/os.rst:2689 +#: ../../library/os.rst:2690 msgid "User identifier of the file owner." msgstr "" -#: ../../library/os.rst:2693 +#: ../../library/os.rst:2694 msgid "Group identifier of the file owner." msgstr "" -#: ../../library/os.rst:2697 +#: ../../library/os.rst:2698 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:2701 +#: ../../library/os.rst:2702 msgid "Timestamps:" msgstr "" -#: ../../library/os.rst:2705 +#: ../../library/os.rst:2706 msgid "Time of most recent access expressed in seconds." msgstr "" -#: ../../library/os.rst:2709 +#: ../../library/os.rst:2710 msgid "Time of most recent content modification expressed in seconds." msgstr "" -#: ../../library/os.rst:2713 ../../library/os.rst:2729 +#: ../../library/os.rst:2714 ../../library/os.rst:2730 msgid "Platform dependent:" msgstr "" -#: ../../library/os.rst:2715 ../../library/os.rst:2731 +#: ../../library/os.rst:2716 ../../library/os.rst:2732 msgid "the time of most recent metadata change on Unix," msgstr "" -#: ../../library/os.rst:2716 +#: ../../library/os.rst:2717 msgid "the time of creation on Windows, expressed in seconds." msgstr "" -#: ../../library/os.rst:2720 +#: ../../library/os.rst:2721 msgid "Time of most recent access expressed in nanoseconds as an integer." msgstr "" -#: ../../library/os.rst:2724 +#: ../../library/os.rst:2725 msgid "" "Time of most recent content modification expressed in nanoseconds as an " "integer." msgstr "" -#: ../../library/os.rst:2732 +#: ../../library/os.rst:2733 msgid "" "the time of creation on Windows, expressed in nanoseconds as an integer." msgstr "" -#: ../../library/os.rst:2737 +#: ../../library/os.rst:2738 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 " @@ -3014,7 +3017,7 @@ msgid "" "only 1-day resolution. See your operating system documentation for details." msgstr "" -#: ../../library/os.rst:2744 +#: ../../library/os.rst:2745 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 " @@ -3025,78 +3028,78 @@ msgid "" "attr:`st_atime_ns`, :attr:`st_mtime_ns`, and :attr:`st_ctime_ns`." msgstr "" -#: ../../library/os.rst:2753 +#: ../../library/os.rst:2754 msgid "" "On some Unix systems (such as Linux), the following attributes may also be " "available:" msgstr "" -#: ../../library/os.rst:2758 +#: ../../library/os.rst:2759 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:2763 +#: ../../library/os.rst:2764 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:2768 +#: ../../library/os.rst:2769 msgid "Type of device if an inode device." msgstr "" -#: ../../library/os.rst:2772 +#: ../../library/os.rst:2773 msgid "User defined flags for file." msgstr "" -#: ../../library/os.rst:2774 +#: ../../library/os.rst:2775 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:2779 +#: ../../library/os.rst:2780 msgid "File generation number." msgstr "" -#: ../../library/os.rst:2783 +#: ../../library/os.rst:2784 msgid "Time of file creation." msgstr "" -#: ../../library/os.rst:2785 +#: ../../library/os.rst:2786 msgid "" "On Solaris and derivatives, the following attributes may also be available:" msgstr "" -#: ../../library/os.rst:2790 +#: ../../library/os.rst:2791 msgid "" "String that uniquely identifies the type of the filesystem that contains the " "file." msgstr "" -#: ../../library/os.rst:2793 +#: ../../library/os.rst:2794 msgid "On macOS systems, the following attributes may also be available:" msgstr "" -#: ../../library/os.rst:2797 +#: ../../library/os.rst:2798 msgid "Real size of the file." msgstr "" -#: ../../library/os.rst:2801 +#: ../../library/os.rst:2802 msgid "Creator of the file." msgstr "" -#: ../../library/os.rst:2805 +#: ../../library/os.rst:2806 msgid "File type." msgstr "" -#: ../../library/os.rst:2807 +#: ../../library/os.rst:2808 msgid "On Windows systems, the following attributes are also available:" msgstr "" -#: ../../library/os.rst:2811 +#: ../../library/os.rst:2812 msgid "" "Windows file attributes: ``dwFileAttributes`` member of the " "``BY_HANDLE_FILE_INFORMATION`` structure returned by :c:func:" @@ -3104,21 +3107,21 @@ msgid "" "mod:`stat` module." msgstr "" -#: ../../library/os.rst:2818 +#: ../../library/os.rst:2819 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:2822 +#: ../../library/os.rst:2823 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:2826 +#: ../../library/os.rst:2827 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 " @@ -3130,35 +3133,35 @@ msgid "" "class:`stat_result` as a tuple always returns integers." msgstr "" -#: ../../library/os.rst:2835 +#: ../../library/os.rst:2836 msgid "" "Added the :attr:`st_atime_ns`, :attr:`st_mtime_ns`, and :attr:`st_ctime_ns` " "members." msgstr "" -#: ../../library/os.rst:2839 +#: ../../library/os.rst:2840 msgid "Added the :attr:`st_file_attributes` member on Windows." msgstr "" -#: ../../library/os.rst:2842 +#: ../../library/os.rst:2843 msgid "Windows now returns the file index as :attr:`st_ino` when available." msgstr "" -#: ../../library/os.rst:2846 +#: ../../library/os.rst:2847 msgid "Added the :attr:`st_fstype` member to Solaris/derivatives." msgstr "" -#: ../../library/os.rst:2849 +#: ../../library/os.rst:2850 msgid "Added the :attr:`st_reparse_tag` member on Windows." msgstr "" -#: ../../library/os.rst:2852 +#: ../../library/os.rst:2853 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:2859 +#: ../../library/os.rst:2860 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 " @@ -3168,7 +3171,7 @@ msgid "" "`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." msgstr "" -#: ../../library/os.rst:2866 +#: ../../library/os.rst:2867 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-" @@ -3176,7 +3179,7 @@ msgid "" "are disabled or not supported." msgstr "" -#: ../../library/os.rst:2871 +#: ../../library/os.rst:2872 msgid "" "Additional module-level constants are defined for GNU/glibc based systems. " "These are :const:`ST_NODEV` (disallow access to device special files), :" @@ -3189,11 +3192,11 @@ msgid "" "relative to mtime/ctime)." msgstr "" -#: ../../library/os.rst:2884 +#: ../../library/os.rst:2885 msgid "The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added." msgstr "新增 :const:`ST_RDONLY` 與 :const:`ST_NOSUID` 常數。" -#: ../../library/os.rst:2890 +#: ../../library/os.rst:2891 msgid "" "The :const:`ST_NODEV`, :const:`ST_NOEXEC`, :const:`ST_SYNCHRONOUS`, :const:" "`ST_MANDLOCK`, :const:`ST_WRITE`, :const:`ST_APPEND`, :const:" @@ -3201,11 +3204,11 @@ msgid "" "`ST_RELATIME` constants were added." msgstr "" -#: ../../library/os.rst:2899 +#: ../../library/os.rst:2900 msgid "Added :attr:`f_fsid`." msgstr "新增 :attr:`f_fsid`\\ 。" -#: ../../library/os.rst:2905 +#: ../../library/os.rst:2906 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept an open file descriptor for their *dir_fd* parameter. Different " @@ -3217,7 +3220,7 @@ msgid "" "(Specifying ``None`` for *dir_fd* is always supported on all platforms.)" msgstr "" -#: ../../library/os.rst:2915 +#: ../../library/os.rst:2916 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 " @@ -3225,13 +3228,13 @@ msgid "" "open file descriptors for *dir_fd* on the local platform::" msgstr "" -#: ../../library/os.rst:2922 +#: ../../library/os.rst:2923 msgid "" "Currently *dir_fd* parameters only work on Unix platforms; none of them work " "on Windows." msgstr "" -#: ../../library/os.rst:2930 +#: ../../library/os.rst:2931 msgid "" "A :class:`set` object indicating whether :func:`os.access` permits " "specifying ``True`` for its *effective_ids* parameter on the local platform. " @@ -3240,19 +3243,19 @@ msgid "" "func:`os.access`; otherwise it will be empty." msgstr "" -#: ../../library/os.rst:2936 +#: ../../library/os.rst:2937 msgid "" "This expression evaluates to ``True`` if :func:`os.access` supports " "``effective_ids=True`` on the local platform::" msgstr "" -#: ../../library/os.rst:2941 +#: ../../library/os.rst:2942 msgid "" "Currently *effective_ids* is only supported on Unix platforms; it does not " "work on Windows." msgstr "" -#: ../../library/os.rst:2949 +#: ../../library/os.rst:2950 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 " @@ -3261,7 +3264,7 @@ msgid "" "*path* arguments is not available on all platforms Python supports." msgstr "" -#: ../../library/os.rst:2956 +#: ../../library/os.rst:2957 msgid "" "To determine whether a particular function permits specifying an open file " "descriptor for its *path* parameter, use the ``in`` operator on " @@ -3270,7 +3273,7 @@ msgid "" "platform::" msgstr "" -#: ../../library/os.rst:2969 +#: ../../library/os.rst:2970 msgid "" "A :class:`set` object indicating which functions in the :mod:`os` module " "accept ``False`` for their *follow_symlinks* parameter on the local " @@ -3283,7 +3286,7 @@ msgid "" "on all platforms.)" msgstr "" -#: ../../library/os.rst:2979 +#: ../../library/os.rst:2980 msgid "" "To check whether a particular function accepts ``False`` for its " "*follow_symlinks* parameter, use the ``in`` operator on " @@ -3292,11 +3295,11 @@ msgid "" "stat` on the local platform::" msgstr "" -#: ../../library/os.rst:2992 +#: ../../library/os.rst:2993 msgid "Create a symbolic link pointing to *src* named *dst*." msgstr "" -#: ../../library/os.rst:2994 +#: ../../library/os.rst:2995 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 " @@ -3306,7 +3309,7 @@ msgid "" "ignored." msgstr "" -#: ../../library/os.rst:3005 +#: ../../library/os.rst:3006 msgid "" "On newer versions of Windows 10, unprivileged accounts can create symlinks " "if Developer Mode is enabled. When Developer Mode is not available/enabled, " @@ -3314,83 +3317,83 @@ msgid "" "must be run as an administrator." msgstr "" -#: ../../library/os.rst:3011 +#: ../../library/os.rst:3012 msgid "" ":exc:`OSError` is raised when the function is called by an unprivileged user." msgstr "" -#: ../../library/os.rst:3014 +#: ../../library/os.rst:3015 msgid "" "Raises an :ref:`auditing event ` ``os.symlink`` with arguments " "``src``, ``dst``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:3021 +#: ../../library/os.rst:3022 msgid "" "Added the *dir_fd* argument, and now allow *target_is_directory* on non-" "Windows platforms." msgstr "" -#: ../../library/os.rst:3028 +#: ../../library/os.rst:3029 msgid "Added support for unelevated symlinks on Windows with Developer Mode." msgstr "" -#: ../../library/os.rst:3034 +#: ../../library/os.rst:3035 msgid "Force write of everything to disk." msgstr "" -#: ../../library/os.rst:3043 +#: ../../library/os.rst:3044 msgid "" "Truncate the file corresponding to *path*, so that it is at most *length* " "bytes in size." msgstr "" -#: ../../library/os.rst:3048 +#: ../../library/os.rst:3049 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``path``, ``length``." msgstr "" -#: ../../library/os.rst:3063 +#: ../../library/os.rst:3064 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:3079 +#: ../../library/os.rst:3080 msgid "Set the access and modified times of the file specified by *path*." msgstr "" -#: ../../library/os.rst:3081 +#: ../../library/os.rst:3082 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:3084 +#: ../../library/os.rst:3085 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:3087 +#: ../../library/os.rst:3088 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:3090 +#: ../../library/os.rst:3091 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:3094 +#: ../../library/os.rst:3095 msgid "It is an error to specify tuples for both *times* and *ns*." msgstr "" -#: ../../library/os.rst:3096 +#: ../../library/os.rst:3097 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 " @@ -3400,19 +3403,19 @@ msgid "" "`utime`." msgstr "" -#: ../../library/os.rst:3107 +#: ../../library/os.rst:3108 msgid "" "Raises an :ref:`auditing event ` ``os.utime`` with arguments " "``path``, ``times``, ``ns``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:3109 +#: ../../library/os.rst:3110 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd*, *follow_symlinks*, and *ns* parameters." msgstr "" -#: ../../library/os.rst:3123 +#: ../../library/os.rst:3124 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* " @@ -3420,7 +3423,7 @@ msgid "" "filenames)``." msgstr "" -#: ../../library/os.rst:3128 +#: ../../library/os.rst:3129 msgid "" "*dirpath* is a string, the path to the directory. *dirnames* is a list of " "the names of the subdirectories in *dirpath* (excluding ``'.'`` and " @@ -3433,7 +3436,7 @@ msgid "" "file be included is unspecified." msgstr "" -#: ../../library/os.rst:3138 +#: ../../library/os.rst:3139 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 " @@ -3444,7 +3447,7 @@ msgid "" "its subdirectories are generated." msgstr "" -#: ../../library/os.rst:3146 +#: ../../library/os.rst:3147 msgid "" "When *topdown* is ``True``, the caller can modify the *dirnames* list in-" "place (perhaps using :keyword:`del` or slice assignment), and :func:`walk` " @@ -3457,7 +3460,7 @@ msgid "" "itself is generated." msgstr "" -#: ../../library/os.rst:3155 +#: ../../library/os.rst:3156 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 " @@ -3467,66 +3470,66 @@ msgid "" "object." msgstr "" -#: ../../library/os.rst:3161 +#: ../../library/os.rst:3162 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:3167 +#: ../../library/os.rst:3168 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:3173 +#: ../../library/os.rst:3174 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:3177 ../../library/os.rst:3238 +#: ../../library/os.rst:3178 ../../library/os.rst:3239 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:3190 +#: ../../library/os.rst:3191 msgid "" "In the next example (simple implementation of :func:`shutil.rmtree`), " "walking the tree bottom-up is essential, :func:`rmdir` doesn't allow " "deleting a directory before the directory is empty::" msgstr "" -#: ../../library/os.rst:3205 +#: ../../library/os.rst:3206 msgid "" "Raises an :ref:`auditing event ` ``os.walk`` with arguments " "``top``, ``topdown``, ``onerror``, ``followlinks``." msgstr "" -#: ../../library/os.rst:3207 +#: ../../library/os.rst:3208 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:3221 +#: ../../library/os.rst:3222 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:3224 +#: ../../library/os.rst:3225 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:3227 +#: ../../library/os.rst:3228 msgid "" "This function always supports :ref:`paths relative to directory descriptors " "` and :ref:`not following symlinks `. Note however " @@ -3534,30 +3537,30 @@ msgid "" "*follow_symlinks* is ``False``." msgstr "" -#: ../../library/os.rst:3234 +#: ../../library/os.rst:3235 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:3251 +#: ../../library/os.rst:3252 msgid "" "In the next example, walking the tree bottom-up is essential: :func:`rmdir` " "doesn't allow deleting a directory before the directory is empty::" msgstr "" -#: ../../library/os.rst:3266 +#: ../../library/os.rst:3267 msgid "" "Raises an :ref:`auditing event ` ``os.fwalk`` with arguments " "``top``, ``topdown``, ``onerror``, ``follow_symlinks``, ``dir_fd``." msgstr "" -#: ../../library/os.rst:3275 +#: ../../library/os.rst:3276 msgid "Added support for :class:`bytes` paths." msgstr "" -#: ../../library/os.rst:3281 +#: ../../library/os.rst:3282 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 " @@ -3565,7 +3568,7 @@ msgid "" "descriptor is :ref:`non-inheritable `." msgstr "" -#: ../../library/os.rst:3286 +#: ../../library/os.rst:3287 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/" @@ -3575,23 +3578,23 @@ msgid "" "side effects." msgstr "" -#: ../../library/os.rst:3294 +#: ../../library/os.rst:3295 msgid "" ":ref:`Availability `: Linux 3.17 or newer with glibc 2.27 or " "newer." msgstr "" -#: ../../library/os.rst:3316 +#: ../../library/os.rst:3317 msgid "These flags can be passed to :func:`memfd_create`." msgstr "" -#: ../../library/os.rst:3320 +#: ../../library/os.rst:3321 msgid "" ":ref:`Availability `: Linux 3.17 or newer with glibc 2.27 or " "newer. The ``MFD_HUGE*`` flags are only available since Linux 4.14." msgstr "" -#: ../../library/os.rst:3326 +#: ../../library/os.rst:3327 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." @@ -3600,7 +3603,7 @@ msgid "" "ref:`non-inheritable `." msgstr "" -#: ../../library/os.rst:3332 +#: ../../library/os.rst:3333 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 " @@ -3608,91 +3611,91 @@ msgid "" "integer with a maximum value of 2\\ :sup:`64`\\ -\\ 2." msgstr "" -#: ../../library/os.rst:3337 +#: ../../library/os.rst:3338 msgid "" "*flags* can be constructed from :const:`EFD_CLOEXEC`, :const:`EFD_NONBLOCK`, " "and :const:`EFD_SEMAPHORE`." msgstr "" -#: ../../library/os.rst:3340 +#: ../../library/os.rst:3341 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:3343 +#: ../../library/os.rst:3344 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:3347 +#: ../../library/os.rst:3348 msgid "" "If the event counter is zero and :const:`EFD_NONBLOCK` is not specified, :" "func:`eventfd_read` blocks." msgstr "" -#: ../../library/os.rst:3350 +#: ../../library/os.rst:3351 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:3372 +#: ../../library/os.rst:3373 msgid "" ":ref:`Availability `: Linux 2.6.27 or newer with glibc 2.8 or " "newer." msgstr "" -#: ../../library/os.rst:3377 +#: ../../library/os.rst:3378 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:3381 ../../library/os.rst:3390 -#: ../../library/os.rst:3398 ../../library/os.rst:3407 +#: ../../library/os.rst:3382 ../../library/os.rst:3391 +#: ../../library/os.rst:3399 ../../library/os.rst:3408 msgid ":ref:`Availability `: See :func:`eventfd`" msgstr ":ref:`適用 `:請見 :func:`eventfd`" -#: ../../library/os.rst:3386 +#: ../../library/os.rst:3387 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:3395 +#: ../../library/os.rst:3396 msgid "Set close-on-exec flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../library/os.rst:3403 +#: ../../library/os.rst:3404 msgid "" "Set :const:`O_NONBLOCK` status flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../library/os.rst:3412 +#: ../../library/os.rst:3413 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:3416 +#: ../../library/os.rst:3417 msgid "" ":ref:`Availability `: Linux 2.6.30 or newer with glibc 2.8 or " "newer." msgstr "" -#: ../../library/os.rst:3421 +#: ../../library/os.rst:3422 msgid "Linux extended attributes" msgstr "" -#: ../../library/os.rst:3425 +#: ../../library/os.rst:3426 msgid "These functions are all available on Linux only." msgstr "" -#: ../../library/os.rst:3429 +#: ../../library/os.rst:3430 msgid "" "Return the value of the extended filesystem attribute *attribute* for " "*path*. *attribute* can be bytes or str (directly or indirectly through the :" @@ -3700,18 +3703,18 @@ msgid "" "encoding." msgstr "" -#: ../../library/os.rst:3437 +#: ../../library/os.rst:3438 msgid "" "Raises an :ref:`auditing event ` ``os.getxattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: ../../library/os.rst:3439 ../../library/os.rst:3471 -#: ../../library/os.rst:3496 +#: ../../library/os.rst:3440 ../../library/os.rst:3472 +#: ../../library/os.rst:3497 msgid "Accepts a :term:`path-like object` for *path* and *attribute*." msgstr "" -#: ../../library/os.rst:3445 +#: ../../library/os.rst:3446 msgid "" "Return a list of the extended filesystem attributes on *path*. The " "attributes in the list are represented as strings decoded with the " @@ -3719,13 +3722,13 @@ msgid "" "the current directory." msgstr "" -#: ../../library/os.rst:3453 +#: ../../library/os.rst:3454 msgid "" "Raises an :ref:`auditing event ` ``os.listxattr`` with argument " "``path``." msgstr "" -#: ../../library/os.rst:3461 +#: ../../library/os.rst:3462 msgid "" "Removes the extended filesystem attribute *attribute* from *path*. " "*attribute* should be bytes or str (directly or indirectly through the :" @@ -3733,13 +3736,13 @@ msgid "" "`filesystem encoding and error handler`." msgstr "" -#: ../../library/os.rst:3469 +#: ../../library/os.rst:3470 msgid "" "Raises an :ref:`auditing event ` ``os.removexattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: ../../library/os.rst:3477 +#: ../../library/os.rst:3478 msgid "" "Set the extended filesystem attribute *attribute* on *path* to *value*. " "*attribute* must be a bytes or str with no embedded NULs (directly or " @@ -3751,45 +3754,45 @@ msgid "" "will not be created and ``EEXISTS`` will be raised." msgstr "" -#: ../../library/os.rst:3491 +#: ../../library/os.rst:3492 msgid "" "A bug in Linux kernel versions less than 2.6.39 caused the flags argument to " "be ignored on some filesystems." msgstr "" -#: ../../library/os.rst:3494 +#: ../../library/os.rst:3495 msgid "" "Raises an :ref:`auditing event ` ``os.setxattr`` with arguments " "``path``, ``attribute``, ``value``, ``flags``." msgstr "" -#: ../../library/os.rst:3502 +#: ../../library/os.rst:3503 msgid "" "The maximum size the value of an extended attribute can be. Currently, this " "is 64 KiB on Linux." msgstr "" -#: ../../library/os.rst:3508 +#: ../../library/os.rst:3509 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:3514 +#: ../../library/os.rst:3515 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:3521 +#: ../../library/os.rst:3522 msgid "Process Management" msgstr "" -#: ../../library/os.rst:3523 +#: ../../library/os.rst:3524 msgid "These functions may be used to create and manage processes." msgstr "" -#: ../../library/os.rst:3525 +#: ../../library/os.rst:3526 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 " @@ -3800,7 +3803,7 @@ msgid "" "standard output; ``foo`` will seem to be ignored." msgstr "" -#: ../../library/os.rst:3536 +#: ../../library/os.rst:3537 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 " @@ -3809,37 +3812,37 @@ msgid "" "`SIGABRT` with :func:`signal.signal`." msgstr "" -#: ../../library/os.rst:3545 +#: ../../library/os.rst:3546 msgid "Add a path to the DLL search path." msgstr "" -#: ../../library/os.rst:3547 +#: ../../library/os.rst:3548 msgid "" "This search path is used when resolving dependencies for imported extension " "modules (the module itself is resolved through sys.path), and also by :mod:" "`ctypes`." msgstr "" -#: ../../library/os.rst:3551 +#: ../../library/os.rst:3552 msgid "" "Remove the directory by calling **close()** on the returned object or using " "it in a :keyword:`with` statement." msgstr "" -#: ../../library/os.rst:3554 +#: ../../library/os.rst:3555 msgid "" "See the `Microsoft documentation `_ for more information about how " "DLLs are loaded." msgstr "" -#: ../../library/os.rst:3558 +#: ../../library/os.rst:3559 msgid "" "Raises an :ref:`auditing event ` ``os.add_dll_directory`` with " "argument ``path``." msgstr "" -#: ../../library/os.rst:3562 +#: ../../library/os.rst:3563 msgid "" "Previous versions of CPython would resolve DLLs using the default behavior " "for the current process. This led to inconsistencies, such as only sometimes " @@ -3847,14 +3850,14 @@ msgid "" "such as ``AddDllDirectory`` having no effect." msgstr "" -#: ../../library/os.rst:3569 +#: ../../library/os.rst:3570 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:3584 +#: ../../library/os.rst:3585 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 " @@ -3862,7 +3865,7 @@ msgid "" "reported as :exc:`OSError` exceptions." msgstr "" -#: ../../library/os.rst:3589 +#: ../../library/os.rst:3590 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 " @@ -3870,7 +3873,7 @@ msgid "" "fsync` before calling an :func:`exec\\* ` function." msgstr "" -#: ../../library/os.rst:3595 +#: ../../library/os.rst:3596 msgid "" "The \"l\" and \"v\" variants of the :func:`exec\\* ` functions differ " "in how command-line arguments are passed. The \"l\" variants are perhaps " @@ -3883,7 +3886,7 @@ msgid "" "enforced." msgstr "" -#: ../../library/os.rst:3604 +#: ../../library/os.rst:3605 msgid "" "The variants which include a \"p\" near the end (:func:`execlp`, :func:" "`execlpe`, :func:`execvp`, and :func:`execvpe`) will use the :envvar:`PATH` " @@ -3896,7 +3899,7 @@ msgid "" "absolute or relative path." msgstr "" -#: ../../library/os.rst:3614 +#: ../../library/os.rst:3615 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 " @@ -3906,7 +3909,7 @@ msgid "" "process to inherit the environment of the current process." msgstr "" -#: ../../library/os.rst:3621 +#: ../../library/os.rst:3622 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 " @@ -3915,31 +3918,31 @@ msgid "" "`NotImplementedError`." msgstr "" -#: ../../library/os.rst:3626 +#: ../../library/os.rst:3627 msgid "" "Raises an :ref:`auditing event ` ``os.exec`` with arguments " "``path``, ``args``, ``env``." msgstr "" -#: ../../library/os.rst:3630 +#: ../../library/os.rst:3631 msgid "" "Added support for specifying *path* as an open file descriptor for :func:" "`execve`." msgstr "" -#: ../../library/os.rst:3639 +#: ../../library/os.rst:3640 msgid "" "Exit the process with status *n*, without calling cleanup handlers, flushing " "stdio buffers, etc." msgstr "" -#: ../../library/os.rst:3644 +#: ../../library/os.rst:3645 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:3647 +#: ../../library/os.rst:3648 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 " @@ -3947,123 +3950,123 @@ msgid "" "delivery program." msgstr "" -#: ../../library/os.rst:3653 +#: ../../library/os.rst:3654 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:3660 +#: ../../library/os.rst:3661 msgid "Exit code that means no error occurred." msgstr "" -#: ../../library/os.rst:3667 +#: ../../library/os.rst:3668 msgid "" "Exit code that means the command was used incorrectly, such as when the " "wrong number of arguments are given." msgstr "" -#: ../../library/os.rst:3675 +#: ../../library/os.rst:3676 msgid "Exit code that means the input data was incorrect." msgstr "" -#: ../../library/os.rst:3682 +#: ../../library/os.rst:3683 msgid "Exit code that means an input file did not exist or was not readable." msgstr "" -#: ../../library/os.rst:3689 +#: ../../library/os.rst:3690 msgid "Exit code that means a specified user did not exist." msgstr "" -#: ../../library/os.rst:3696 +#: ../../library/os.rst:3697 msgid "Exit code that means a specified host did not exist." msgstr "" -#: ../../library/os.rst:3703 +#: ../../library/os.rst:3704 msgid "Exit code that means that a required service is unavailable." msgstr "" -#: ../../library/os.rst:3710 +#: ../../library/os.rst:3711 msgid "Exit code that means an internal software error was detected." msgstr "" -#: ../../library/os.rst:3717 +#: ../../library/os.rst:3718 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:3725 +#: ../../library/os.rst:3726 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:3733 +#: ../../library/os.rst:3734 msgid "Exit code that means a user specified output file could not be created." msgstr "" -#: ../../library/os.rst:3740 +#: ../../library/os.rst:3741 msgid "" "Exit code that means that an error occurred while doing I/O on some file." msgstr "" -#: ../../library/os.rst:3747 +#: ../../library/os.rst:3748 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:3756 +#: ../../library/os.rst:3757 msgid "" "Exit code that means that a protocol exchange was illegal, invalid, or not " "understood." msgstr "" -#: ../../library/os.rst:3764 +#: ../../library/os.rst:3765 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:3772 +#: ../../library/os.rst:3773 msgid "Exit code that means that some kind of configuration error occurred." msgstr "" -#: ../../library/os.rst:3779 +#: ../../library/os.rst:3780 msgid "Exit code that means something like \"an entry was not found\"." msgstr "" -#: ../../library/os.rst:3786 +#: ../../library/os.rst:3787 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:3789 +#: ../../library/os.rst:3790 msgid "" "Note that some platforms including FreeBSD <= 6.3 and Cygwin have known " "issues when using ``fork()`` from a thread." msgstr "" -#: ../../library/os.rst:3792 +#: ../../library/os.rst:3793 msgid "" "Raises an :ref:`auditing event ` ``os.fork`` with no arguments." msgstr "" -#: ../../library/os.rst:3794 +#: ../../library/os.rst:3795 msgid "" "Calling ``fork()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../library/os.rst:3800 +#: ../../library/os.rst:3801 msgid "See :mod:`ssl` for applications that use the SSL module with fork()." msgstr "" -#: ../../library/os.rst:3807 +#: ../../library/os.rst:3808 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, " @@ -4072,24 +4075,24 @@ msgid "" "the :mod:`pty` module. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../library/os.rst:3813 +#: ../../library/os.rst:3814 msgid "" "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr "" -#: ../../library/os.rst:3815 +#: ../../library/os.rst:3816 msgid "" "Calling ``forkpty()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../library/os.rst:3828 +#: ../../library/os.rst:3829 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:3831 +#: ../../library/os.rst:3832 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 " @@ -4099,36 +4102,36 @@ msgid "" "version of :func:`kill` additionally takes process handles to be killed." msgstr "" -#: ../../library/os.rst:3839 +#: ../../library/os.rst:3840 msgid "See also :func:`signal.pthread_kill`." msgstr "另請參閱 :func:`signal.pthread_kill`\\ 。" -#: ../../library/os.rst:3841 +#: ../../library/os.rst:3842 msgid "" "Raises an :ref:`auditing event ` ``os.kill`` with arguments " "``pid``, ``sig``." msgstr "" -#: ../../library/os.rst:3843 +#: ../../library/os.rst:3844 msgid "Windows support." msgstr "" -#: ../../library/os.rst:3853 +#: ../../library/os.rst:3854 msgid "Send the signal *sig* to the process group *pgid*." msgstr "" -#: ../../library/os.rst:3855 +#: ../../library/os.rst:3856 msgid "" "Raises an :ref:`auditing event ` ``os.killpg`` with arguments " "``pgid``, ``sig``." msgstr "" -#: ../../library/os.rst:3862 +#: ../../library/os.rst:3863 msgid "" "Add *increment* to the process's \"niceness\". Return the new niceness." msgstr "" -#: ../../library/os.rst:3869 +#: ../../library/os.rst:3870 msgid "" "Return a file descriptor referring to the process *pid*. This descriptor " "can be used to perform process management without races and signals. The " @@ -4136,21 +4139,21 @@ msgid "" "currently defined." msgstr "" -#: ../../library/os.rst:3874 +#: ../../library/os.rst:3875 msgid "See the :manpage:`pidfd_open(2)` man page for more details." msgstr "更多細節請見 :manpage:`pidfd_open(2)` 手冊頁。" -#: ../../library/os.rst:3876 +#: ../../library/os.rst:3877 msgid ":ref:`Availability `: Linux 5.3+" msgstr ":ref:`適用 `:Linux 5.3+" -#: ../../library/os.rst:3882 +#: ../../library/os.rst:3883 msgid "" "Lock program segments into memory. The value of *op* (defined in ````) determines which segments are locked." msgstr "" -#: ../../library/os.rst:3890 +#: ../../library/os.rst:3891 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 " @@ -4160,7 +4163,7 @@ msgid "" "bytes." msgstr "" -#: ../../library/os.rst:3897 +#: ../../library/os.rst:3898 msgid "" "The ``close`` method returns :const:`None` if the subprocess exited " "successfully, or the subprocess's return code if there was an error. On " @@ -4172,43 +4175,43 @@ msgid "" "contains the signed integer return code from the child process." msgstr "" -#: ../../library/os.rst:3907 +#: ../../library/os.rst:3908 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:3912 +#: ../../library/os.rst:3913 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:3921 +#: ../../library/os.rst:3922 msgid "Wraps the :c:func:`posix_spawn` C library API for use from Python." msgstr "" -#: ../../library/os.rst:3923 +#: ../../library/os.rst:3924 msgid "" "Most users should use :func:`subprocess.run` instead of :func:`posix_spawn`." msgstr "" -#: ../../library/os.rst:3925 +#: ../../library/os.rst:3926 msgid "" "The positional-only arguments *path*, *args*, and *env* are similar to :func:" "`execve`." msgstr "" -#: ../../library/os.rst:3928 +#: ../../library/os.rst:3929 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:3932 +#: ../../library/os.rst:3933 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 " @@ -4217,31 +4220,31 @@ msgid "" "describing the remaining tuple elements:" msgstr "" -#: ../../library/os.rst:3940 +#: ../../library/os.rst:3941 msgid "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" msgstr "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" -#: ../../library/os.rst:3942 +#: ../../library/os.rst:3943 msgid "Performs ``os.dup2(os.open(path, flags, mode), fd)``." msgstr "" -#: ../../library/os.rst:3946 +#: ../../library/os.rst:3947 msgid "(``os.POSIX_SPAWN_CLOSE``, *fd*)" msgstr "(``os.POSIX_SPAWN_CLOSE``, *fd*)" -#: ../../library/os.rst:3948 +#: ../../library/os.rst:3949 msgid "Performs ``os.close(fd)``." msgstr "" -#: ../../library/os.rst:3952 +#: ../../library/os.rst:3953 msgid "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" msgstr "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" -#: ../../library/os.rst:3954 +#: ../../library/os.rst:3955 msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "" -#: ../../library/os.rst:3956 +#: ../../library/os.rst:3957 msgid "" "These tuples correspond to the C library :c:func:" "`posix_spawn_file_actions_addopen`, :c:func:" @@ -4250,7 +4253,7 @@ msgid "" "`posix_spawn` call itself." msgstr "" -#: ../../library/os.rst:3962 +#: ../../library/os.rst:3963 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 " @@ -4259,7 +4262,7 @@ msgid "" "corresponds to the C library :c:data:`POSIX_SPAWN_SETPGROUP` flag." msgstr "" -#: ../../library/os.rst:3968 +#: ../../library/os.rst:3969 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 " @@ -4270,7 +4273,7 @@ msgid "" "library :c:data:`POSIX_SPAWN_RESETIDS` flag." msgstr "" -#: ../../library/os.rst:3976 +#: ../../library/os.rst:3977 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:" @@ -4278,7 +4281,7 @@ msgid "" "raised." msgstr "" -#: ../../library/os.rst:3981 +#: ../../library/os.rst:3982 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 " @@ -4286,14 +4289,14 @@ msgid "" "`POSIX_SPAWN_SETSIGMASK` flag." msgstr "" -#: ../../library/os.rst:3986 +#: ../../library/os.rst:3987 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:3990 +#: ../../library/os.rst:3991 msgid "" "The *scheduler* argument must be a tuple containing the (optional) scheduler " "policy and an instance of :class:`sched_param` with the scheduler " @@ -4303,79 +4306,79 @@ msgid "" "`POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" -#: ../../library/os.rst:3997 ../../library/os.rst:4013 +#: ../../library/os.rst:3998 ../../library/os.rst:4014 msgid "" "Raises an :ref:`auditing event ` ``os.posix_spawn`` with arguments " "``path``, ``argv``, ``env``." msgstr "" -#: ../../library/os.rst:4007 +#: ../../library/os.rst:4008 msgid "Wraps the :c:func:`posix_spawnp` C library API for use from Python." msgstr "" -#: ../../library/os.rst:4009 +#: ../../library/os.rst:4010 msgid "" "Similar to :func:`posix_spawn` except that the system searches for the " "*executable* file in the list of directories specified by the :envvar:`PATH` " "environment variable (in the same way as for ``execvp(3)``)." msgstr "" -#: ../../library/os.rst:4017 +#: ../../library/os.rst:4018 msgid "" ":ref:`Availability `: See :func:`posix_spawn` documentation." msgstr "" -#: ../../library/os.rst:4023 +#: ../../library/os.rst:4024 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:4028 +#: ../../library/os.rst:4029 msgid "*before* is a function called before forking a child process." msgstr "" -#: ../../library/os.rst:4029 +#: ../../library/os.rst:4030 msgid "" "*after_in_parent* is a function called from the parent process after forking " "a child process." msgstr "" -#: ../../library/os.rst:4031 +#: ../../library/os.rst:4032 msgid "*after_in_child* is a function called from the child process." msgstr "" -#: ../../library/os.rst:4033 +#: ../../library/os.rst:4034 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:4037 +#: ../../library/os.rst:4038 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:4042 +#: ../../library/os.rst:4043 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:4046 +#: ../../library/os.rst:4047 msgid "There is no way to unregister a function." msgstr "" -#: ../../library/os.rst:4062 +#: ../../library/os.rst:4063 msgid "Execute the program *path* in a new process." msgstr "" -#: ../../library/os.rst:4064 +#: ../../library/os.rst:4065 msgid "" "(Note that the :mod:`subprocess` module provides more powerful facilities " "for spawning new processes and retrieving their results; using that module " @@ -4383,7 +4386,7 @@ msgid "" "`subprocess-replacements` section.)" msgstr "" -#: ../../library/os.rst:4069 +#: ../../library/os.rst:4070 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 " @@ -4392,13 +4395,13 @@ msgid "" "handle, so can be used with the :func:`waitpid` function." msgstr "" -#: ../../library/os.rst:4075 +#: ../../library/os.rst:4076 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:4078 +#: ../../library/os.rst:4079 msgid "" "The \"l\" and \"v\" variants of the :func:`spawn\\* ` functions " "differ in how command-line arguments are passed. The \"l\" variants are " @@ -4410,7 +4413,7 @@ msgid "" "to the child process must start with the name of the command being run." msgstr "" -#: ../../library/os.rst:4087 +#: ../../library/os.rst:4088 msgid "" "The variants which include a second \"p\" near the end (:func:`spawnlp`, :" "func:`spawnlpe`, :func:`spawnvp`, and :func:`spawnvpe`) will use the :envvar:" @@ -4423,7 +4426,7 @@ msgid "" "appropriate absolute or relative path." msgstr "" -#: ../../library/os.rst:4097 +#: ../../library/os.rst:4098 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 " @@ -4435,19 +4438,19 @@ msgid "" "values will cause the function to fail, with a return value of ``127``." msgstr "" -#: ../../library/os.rst:4106 +#: ../../library/os.rst:4107 msgid "" "As an example, the following calls to :func:`spawnlp` and :func:`spawnvpe` " "are equivalent::" msgstr "" -#: ../../library/os.rst:4115 +#: ../../library/os.rst:4116 msgid "" "Raises an :ref:`auditing event ` ``os.spawn`` with arguments " "``mode``, ``path``, ``args``, ``env``." msgstr "" -#: ../../library/os.rst:4121 +#: ../../library/os.rst:4122 msgid "" ":ref:`Availability `: Unix, Windows. :func:`spawnlp`, :func:" "`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are not available on " @@ -4455,7 +4458,7 @@ msgid "" "Windows; we advise you to use the :mod:`subprocess` module instead." msgstr "" -#: ../../library/os.rst:4129 +#: ../../library/os.rst:4130 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If either of these values is given, the :func:`spawn" @@ -4463,7 +4466,7 @@ msgid "" "the process id as the return value." msgstr "" -#: ../../library/os.rst:4139 +#: ../../library/os.rst:4140 msgid "" "Possible value for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If this is given as *mode*, the :func:`spawn\\*` " @@ -4472,7 +4475,7 @@ msgid "" "signal`` if a signal kills the process." msgstr "" -#: ../../library/os.rst:4151 +#: ../../library/os.rst:4152 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. These are less portable than those listed above. :" @@ -4482,11 +4485,11 @@ msgid "" "function will not return." msgstr "" -#: ../../library/os.rst:4162 +#: ../../library/os.rst:4163 msgid "Start a file with its associated application." msgstr "" -#: ../../library/os.rst:4164 +#: ../../library/os.rst:4165 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 " @@ -4495,7 +4498,7 @@ msgid "" "associated." msgstr "" -#: ../../library/os.rst:4169 +#: ../../library/os.rst:4170 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 " @@ -4503,28 +4506,28 @@ msgid "" "``'explore'`` and ``'find'`` (to be used on directories)." msgstr "" -#: ../../library/os.rst:4174 +#: ../../library/os.rst:4175 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:4178 +#: ../../library/os.rst:4179 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:4182 +#: ../../library/os.rst:4183 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:4186 +#: ../../library/os.rst:4187 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 " @@ -4535,32 +4538,32 @@ msgid "" "encoded for Win32." msgstr "" -#: ../../library/os.rst:4194 +#: ../../library/os.rst:4195 msgid "" "To reduce interpreter startup overhead, the Win32 :c:func:`ShellExecute` " "function is not resolved until this function is first called. If the " "function cannot be resolved, :exc:`NotImplementedError` will be raised." msgstr "" -#: ../../library/os.rst:4198 +#: ../../library/os.rst:4199 msgid "" "Raises an :ref:`auditing event ` ``os.startfile`` with arguments " "``path``, ``operation``." msgstr "" -#: ../../library/os.rst:4200 +#: ../../library/os.rst:4201 msgid "" "Raises an :ref:`auditing event ` ``os.startfile/2`` with arguments " "``path``, ``operation``, ``arguments``, ``cwd``, ``show_cmd``." msgstr "" -#: ../../library/os.rst:4204 +#: ../../library/os.rst:4205 msgid "" "Added the *arguments*, *cwd* and *show_cmd* arguments, and the ``os." "startfile/2`` audit event." msgstr "" -#: ../../library/os.rst:4211 +#: ../../library/os.rst:4212 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 " @@ -4571,13 +4574,13 @@ msgid "" "value of the Python function is system-dependent." msgstr "" -#: ../../library/os.rst:4219 +#: ../../library/os.rst:4220 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:4222 +#: ../../library/os.rst:4223 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 :" @@ -4586,7 +4589,7 @@ msgid "" "shell documentation." msgstr "" -#: ../../library/os.rst:4228 +#: ../../library/os.rst:4229 msgid "" "The :mod:`subprocess` module provides more powerful facilities for spawning " "new processes and retrieving their results; using that module is preferable " @@ -4594,53 +4597,53 @@ msgid "" "the :mod:`subprocess` documentation for some helpful recipes." msgstr "" -#: ../../library/os.rst:4233 +#: ../../library/os.rst:4234 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the result " "(exit status) into an exit code. On Windows, the result is directly the exit " "code." msgstr "" -#: ../../library/os.rst:4237 +#: ../../library/os.rst:4238 msgid "" "Raises an :ref:`auditing event ` ``os.system`` with argument " "``command``." msgstr "" -#: ../../library/os.rst:4244 +#: ../../library/os.rst:4245 msgid "" "Returns the current global process times. The return value is an object with " "five attributes:" msgstr "" -#: ../../library/os.rst:4247 +#: ../../library/os.rst:4248 msgid ":attr:`!user` - user time" msgstr "" -#: ../../library/os.rst:4248 +#: ../../library/os.rst:4249 msgid ":attr:`!system` - system time" msgstr ":attr:`!system` - 系統時間" -#: ../../library/os.rst:4249 +#: ../../library/os.rst:4250 msgid ":attr:`!children_user` - user time of all child processes" msgstr "" -#: ../../library/os.rst:4250 +#: ../../library/os.rst:4251 msgid ":attr:`!children_system` - system time of all child processes" msgstr "" -#: ../../library/os.rst:4251 +#: ../../library/os.rst:4252 msgid ":attr:`!elapsed` - elapsed real time since a fixed point in the past" msgstr "" -#: ../../library/os.rst:4253 +#: ../../library/os.rst:4254 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:4257 +#: ../../library/os.rst:4258 msgid "" "See the Unix manual page :manpage:`times(2)` and :manpage:`times(3)` manual " "page on Unix or `the GetProcessTimes MSDN `: Linux 5.4+" msgstr ":ref:`適用 `:Linux 5.4+" -#: ../../library/os.rst:4329 +#: ../../library/os.rst:4330 msgid "" "Flags that can be used in *options* in :func:`waitid` that specify what " "child signal to wait for." msgstr "" -#: ../../library/os.rst:4344 +#: ../../library/os.rst:4345 msgid "" "These are the possible values for :attr:`si_code` in the result returned by :" "func:`waitid`." msgstr "" -#: ../../library/os.rst:4351 +#: ../../library/os.rst:4352 msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values." msgstr "" -#: ../../library/os.rst:4357 +#: ../../library/os.rst:4358 msgid "The details of this function differ on Unix and Windows." msgstr "" -#: ../../library/os.rst:4359 +#: ../../library/os.rst:4360 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 " @@ -4728,7 +4731,7 @@ msgid "" "operation." msgstr "" -#: ../../library/os.rst:4364 +#: ../../library/os.rst:4365 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 " @@ -4738,13 +4741,13 @@ msgid "" "group ``-pid`` (the absolute value of *pid*)." msgstr "" -#: ../../library/os.rst:4371 +#: ../../library/os.rst:4372 msgid "" "An :exc:`OSError` is raised with the value of errno when the syscall returns " "-1." msgstr "" -#: ../../library/os.rst:4374 +#: ../../library/os.rst:4375 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 " @@ -4756,7 +4759,7 @@ msgid "" "process handles." msgstr "" -#: ../../library/os.rst:4393 +#: ../../library/os.rst:4394 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 " @@ -4765,13 +4768,13 @@ msgid "" "argument is the same as that provided to :func:`waitpid` and :func:`wait4`." msgstr "" -#: ../../library/os.rst:4400 ../../library/os.rst:4414 +#: ../../library/os.rst:4401 ../../library/os.rst:4415 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exitcode." msgstr "" -#: ../../library/os.rst:4408 +#: ../../library/os.rst:4409 msgid "" "Similar to :func:`waitpid`, except a 3-element tuple, containing the child's " "process id, exit status indication, and resource usage information is " @@ -4780,22 +4783,22 @@ msgid "" "the same as those provided to :func:`waitpid`." msgstr "" -#: ../../library/os.rst:4422 +#: ../../library/os.rst:4423 msgid "Convert a wait status to an exit code." msgstr "" -#: ../../library/os.rst:4424 +#: ../../library/os.rst:4425 msgid "On Unix:" msgstr "" -#: ../../library/os.rst:4426 +#: ../../library/os.rst:4427 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:4429 +#: ../../library/os.rst:4430 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 " @@ -4803,15 +4806,15 @@ msgid "" "than 0." msgstr "" -#: ../../library/os.rst:4433 +#: ../../library/os.rst:4434 msgid "Otherwise, raise a :exc:`ValueError`." msgstr "" -#: ../../library/os.rst:4435 +#: ../../library/os.rst:4436 msgid "On Windows, return *status* shifted right by 8 bits." msgstr "" -#: ../../library/os.rst:4437 +#: ../../library/os.rst:4438 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 " @@ -4819,240 +4822,240 @@ msgid "" "``WIFSTOPPED(status)`` is true." msgstr "" -#: ../../library/os.rst:4444 +#: ../../library/os.rst:4445 msgid "" ":func:`WIFEXITED`, :func:`WEXITSTATUS`, :func:`WIFSIGNALED`, :func:" "`WTERMSIG`, :func:`WIFSTOPPED`, :func:`WSTOPSIG` functions." msgstr "" -#: ../../library/os.rst:4452 +#: ../../library/os.rst:4453 msgid "" "The option for :func:`waitpid` to return immediately if no child process " "status is available immediately. The function returns ``(0, 0)`` in this " "case." msgstr "" -#: ../../library/os.rst:4460 +#: ../../library/os.rst:4461 msgid "" "This option causes child processes to be reported if they have been " "continued from a job control stop since their status was last reported." msgstr "" -#: ../../library/os.rst:4463 +#: ../../library/os.rst:4464 msgid ":ref:`Availability `: some Unix systems." msgstr ":ref:`適用 `:部分 Unix 系統。" -#: ../../library/os.rst:4468 +#: ../../library/os.rst:4469 msgid "" "This option causes child processes to be reported if they have been stopped " "but their current state has not been reported since they were stopped." msgstr "" -#: ../../library/os.rst:4474 +#: ../../library/os.rst:4475 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:4480 +#: ../../library/os.rst:4481 msgid "" "Return ``True`` if a core dump was generated for the process, otherwise " "return ``False``." msgstr "" -#: ../../library/os.rst:4483 ../../library/os.rst:4549 +#: ../../library/os.rst:4484 ../../library/os.rst:4550 msgid "This function should be employed only if :func:`WIFSIGNALED` is true." msgstr "" -#: ../../library/os.rst:4490 +#: ../../library/os.rst:4491 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:4494 +#: ../../library/os.rst:4495 msgid "See :data:`WCONTINUED` option." msgstr "參閱 :data:`WCONTINUED` 選項。" -#: ../../library/os.rst:4501 +#: ../../library/os.rst:4502 msgid "" "Return ``True`` if the process was stopped by delivery of a signal, " "otherwise return ``False``." msgstr "" -#: ../../library/os.rst:4504 +#: ../../library/os.rst:4505 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:4512 +#: ../../library/os.rst:4513 msgid "" "Return ``True`` if the process was terminated by a signal, otherwise return " "``False``." msgstr "" -#: ../../library/os.rst:4520 +#: ../../library/os.rst:4521 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:4529 +#: ../../library/os.rst:4530 msgid "Return the process exit status." msgstr "" -#: ../../library/os.rst:4531 +#: ../../library/os.rst:4532 msgid "This function should be employed only if :func:`WIFEXITED` is true." msgstr "" -#: ../../library/os.rst:4538 +#: ../../library/os.rst:4539 msgid "Return the signal which caused the process to stop." msgstr "" -#: ../../library/os.rst:4540 +#: ../../library/os.rst:4541 msgid "This function should be employed only if :func:`WIFSTOPPED` is true." msgstr "" -#: ../../library/os.rst:4547 +#: ../../library/os.rst:4548 msgid "Return the number of the signal that caused the process to terminate." msgstr "" -#: ../../library/os.rst:4555 +#: ../../library/os.rst:4556 msgid "Interface to the scheduler" msgstr "" -#: ../../library/os.rst:4557 +#: ../../library/os.rst:4558 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:4563 +#: ../../library/os.rst:4564 msgid "" "The following scheduling policies are exposed if they are supported by the " "operating system." msgstr "" -#: ../../library/os.rst:4568 +#: ../../library/os.rst:4569 msgid "The default scheduling policy." msgstr "" -#: ../../library/os.rst:4572 +#: ../../library/os.rst:4573 msgid "" "Scheduling policy for CPU-intensive processes that tries to preserve " "interactivity on the rest of the computer." msgstr "" -#: ../../library/os.rst:4577 +#: ../../library/os.rst:4578 msgid "Scheduling policy for extremely low priority background tasks." msgstr "" -#: ../../library/os.rst:4581 +#: ../../library/os.rst:4582 msgid "Scheduling policy for sporadic server programs." msgstr "" -#: ../../library/os.rst:4585 +#: ../../library/os.rst:4586 msgid "A First In First Out scheduling policy." msgstr "" -#: ../../library/os.rst:4589 +#: ../../library/os.rst:4590 msgid "A round-robin scheduling policy." msgstr "" -#: ../../library/os.rst:4593 +#: ../../library/os.rst:4594 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:4600 +#: ../../library/os.rst:4601 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:4604 +#: ../../library/os.rst:4605 msgid "At the moment, there is only one possible parameter:" msgstr "" -#: ../../library/os.rst:4608 +#: ../../library/os.rst:4609 msgid "The scheduling priority for a scheduling policy." msgstr "" -#: ../../library/os.rst:4613 +#: ../../library/os.rst:4614 msgid "" "Get the minimum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../library/os.rst:4619 +#: ../../library/os.rst:4620 msgid "" "Get the maximum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../library/os.rst:4625 +#: ../../library/os.rst:4626 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:4632 +#: ../../library/os.rst:4633 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:4639 +#: ../../library/os.rst:4640 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:4645 +#: ../../library/os.rst:4646 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:4651 +#: ../../library/os.rst:4652 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:4657 +#: ../../library/os.rst:4658 msgid "Voluntarily relinquish the CPU." msgstr "" -#: ../../library/os.rst:4662 +#: ../../library/os.rst:4663 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:4669 +#: ../../library/os.rst:4670 msgid "" "Return the set of CPUs the process with PID *pid* (or the current process if " "zero) is restricted to." msgstr "" -#: ../../library/os.rst:4676 +#: ../../library/os.rst:4677 msgid "Miscellaneous System Information" msgstr "" -#: ../../library/os.rst:4681 +#: ../../library/os.rst:4682 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 " @@ -5063,13 +5066,13 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../library/os.rst:4689 +#: ../../library/os.rst:4690 msgid "" "If the configuration value specified by *name* isn't defined, ``None`` is " "returned." msgstr "" -#: ../../library/os.rst:4692 +#: ../../library/os.rst:4693 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 " @@ -5077,33 +5080,33 @@ msgid "" "`errno.EINVAL` for the error number." msgstr "" -#: ../../library/os.rst:4702 +#: ../../library/os.rst:4703 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:4711 +#: ../../library/os.rst:4712 msgid "" "Return the number of CPUs in the system. Returns ``None`` if undetermined." msgstr "" -#: ../../library/os.rst:4713 +#: ../../library/os.rst:4714 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:4723 +#: ../../library/os.rst:4724 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:4732 +#: ../../library/os.rst:4733 msgid "" "Return integer-valued system configuration values. If the configuration " "value specified by *name* isn't defined, ``-1`` is returned. The comments " @@ -5112,40 +5115,40 @@ msgid "" "``sysconf_names``." msgstr "" -#: ../../library/os.rst:4742 +#: ../../library/os.rst:4743 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:4748 +#: ../../library/os.rst:4749 msgid "" "The following data values are used to support path manipulation operations. " "These are defined for all platforms." msgstr "" -#: ../../library/os.rst:4751 +#: ../../library/os.rst:4752 msgid "" "Higher-level operations on pathnames are defined in the :mod:`os.path` " "module." msgstr "" -#: ../../library/os.rst:4757 +#: ../../library/os.rst:4758 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:4765 +#: ../../library/os.rst:4766 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:4774 +#: ../../library/os.rst:4775 msgid "" "The character used by the operating system to separate pathname components. " "This is ``'/'`` for POSIX and ``'\\\\'`` for Windows. Note that knowing " @@ -5154,7 +5157,7 @@ msgid "" "useful. Also available via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:4784 +#: ../../library/os.rst:4785 msgid "" "An alternative character used by the operating system to separate pathname " "components, or ``None`` if only one separator character exists. This is set " @@ -5162,27 +5165,27 @@ msgid "" "via :mod:`os.path`." msgstr "" -#: ../../library/os.rst:4793 +#: ../../library/os.rst:4794 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:4801 +#: ../../library/os.rst:4802 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:4808 +#: ../../library/os.rst:4809 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:4815 +#: ../../library/os.rst:4816 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 " @@ -5191,36 +5194,36 @@ msgid "" "default); use a single ``'\\n'`` instead, on all platforms." msgstr "" -#: ../../library/os.rst:4824 +#: ../../library/os.rst:4825 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:4835 +#: ../../library/os.rst:4836 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:4843 +#: ../../library/os.rst:4844 msgid "Random numbers" msgstr "" -#: ../../library/os.rst:4848 +#: ../../library/os.rst:4849 msgid "" "Get up to *size* random bytes. The function can return less bytes than " "requested." msgstr "" -#: ../../library/os.rst:4851 +#: ../../library/os.rst:4852 msgid "" "These bytes can be used to seed user-space random number generators or for " "cryptographic purposes." msgstr "" -#: ../../library/os.rst:4854 +#: ../../library/os.rst:4855 msgid "" "``getrandom()`` relies on entropy gathered from device drivers and other " "sources of environmental noise. Unnecessarily reading large quantities of " @@ -5228,36 +5231,36 @@ msgid "" "``/dev/urandom`` devices." msgstr "" -#: ../../library/os.rst:4859 +#: ../../library/os.rst:4860 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:4863 +#: ../../library/os.rst:4864 msgid "" "See also the `Linux getrandom() manual page `_." msgstr "" -#: ../../library/os.rst:4867 +#: ../../library/os.rst:4868 msgid ":ref:`Availability `: Linux 3.17 and newer." msgstr ":ref:`適用 `:Linux 3.17 以上。" -#: ../../library/os.rst:4872 +#: ../../library/os.rst:4873 msgid "" "Return a bytestring of *size* random bytes suitable for cryptographic use." msgstr "" -#: ../../library/os.rst:4874 +#: ../../library/os.rst:4875 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:4878 +#: ../../library/os.rst:4879 msgid "" "On Linux, if the ``getrandom()`` syscall is available, it is used in " "blocking mode: block until the system urandom entropy pool is initialized " @@ -5267,57 +5270,57 @@ msgid "" "to poll until the system urandom entropy pool is initialized." msgstr "" -#: ../../library/os.rst:4885 +#: ../../library/os.rst:4886 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:4889 +#: ../../library/os.rst:4890 msgid "On Windows, it will use ``CryptGenRandom()``." msgstr "" -#: ../../library/os.rst:4892 +#: ../../library/os.rst:4893 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:4896 +#: ../../library/os.rst:4897 msgid "" "On Linux, ``getrandom()`` is now used in blocking mode to increase the " "security." msgstr "" -#: ../../library/os.rst:4900 +#: ../../library/os.rst:4901 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:4904 +#: ../../library/os.rst:4905 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:4912 +#: ../../library/os.rst:4913 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:4916 +#: ../../library/os.rst:4917 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:4923 +#: ../../library/os.rst:4924 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/whatsnew/3.7.po b/whatsnew/3.7.po index 7daa0211cb..516983ece0 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-03-15 00:13+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-" @@ -765,8 +765,7 @@ msgstr "" msgid "" "The new :option:`-X` ``importtime`` option or the :envvar:" "`PYTHONPROFILEIMPORTTIME` environment variable can be used to show the " -"timing of each module import. (Contributed by Victor Stinner in :issue:" -"`31415`.)" +"timing of each module import. (Contributed by Inada Naoki in :issue:`31415`.)" msgstr "" #: ../../whatsnew/3.7.rst:545 From 6e3473f848eb2c2a8131376f8718f0011fdd2f4b Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Wed, 16 Mar 2022 23:10:51 +0800 Subject: [PATCH 8/8] fix fuzzy entry --- tutorial/controlflow.po | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index 46a95f3248..8139a258df 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -989,7 +989,6 @@ msgstr "" "::" #: ../../tutorial/controlflow.rst:887 -#, fuzzy msgid "" "Normally, these *variadic* arguments will be last in the list of formal " "parameters, because they scoop up all remaining input arguments that are " @@ -997,7 +996,7 @@ msgid "" "``*args`` parameter are 'keyword-only' arguments, meaning that they can only " "be used as keywords rather than positional arguments. ::" msgstr "" -"通常,這些 ``variadic``\\ (可變的)引數會出現在參數列表的最末端,這樣它們就" +"通常,這些 *variadic*\\ (可變的)引數會出現在參數列表的最末端,這樣它們就" "可以把所有傳遞給函式的剩餘輸入引數都撈起來。出現在 ``*args`` 參數後面的任何參" "數必須是「僅限關鍵字」引數,意即它們只能作為關鍵字引數,而不能用作位置引" "數。\n"