From becfe0f67a46ddd2f86eeb506773321566972c39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Dec 2025 00:16:32 +0000 Subject: [PATCH 1/4] sync with cpython 723ed8c5 --- library/logging.po | 353 +++++++++++++++++++++++---------------------- 1 file changed, 182 insertions(+), 171 deletions(-) diff --git a/library/logging.po b/library/logging.po index 1f9b094f1a..008d633cb5 100644 --- a/library/logging.po +++ b/library/logging.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-01 00:17+0000\n" +"POT-Creation-Date: 2025-12-26 00:15+0000\n" "PO-Revision-Date: 2024-03-28 22:40+0800\n" "Last-Translator: RockLeon \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1317,11 +1317,11 @@ msgstr "" msgid "Attribute name" msgstr "屬性名稱" -#: ../../library/logging.rst:995 ../../library/logging.rst:1370 +#: ../../library/logging.rst:995 ../../library/logging.rst:1375 msgid "Format" msgstr "格式" -#: ../../library/logging.rst:995 ../../library/logging.rst:1370 +#: ../../library/logging.rst:995 ../../library/logging.rst:1375 msgid "Description" msgstr "描述" @@ -1330,7 +1330,8 @@ msgid "args" msgstr "args" #: ../../library/logging.rst:997 ../../library/logging.rst:1011 -#: ../../library/logging.rst:1039 ../../library/logging.rst:1057 +#: ../../library/logging.rst:1014 ../../library/logging.rst:1044 +#: ../../library/logging.rst:1062 msgid "You shouldn't need to format this yourself." msgstr "你不應該需要自己格式化它。" @@ -1381,250 +1382,260 @@ msgid "" msgstr "" #: ../../library/logging.rst:1014 +msgid "exc_text" +msgstr "" + +#: ../../library/logging.rst:1014 +msgid "" +"Exception information formatted as a string. This is set when :meth:" +"`Formatter.format` is invoked, or ``None`` if no exception has occurred." +msgstr "" + +#: ../../library/logging.rst:1019 msgid "filename" msgstr "filename" -#: ../../library/logging.rst:1014 +#: ../../library/logging.rst:1019 msgid "``%(filename)s``" msgstr "``%(filename)s``" -#: ../../library/logging.rst:1014 +#: ../../library/logging.rst:1019 msgid "Filename portion of ``pathname``." msgstr "``pathname`` 的檔案名稱部分。" -#: ../../library/logging.rst:1016 +#: ../../library/logging.rst:1021 msgid "funcName" msgstr "funcName" -#: ../../library/logging.rst:1016 +#: ../../library/logging.rst:1021 msgid "``%(funcName)s``" msgstr "``%(funcName)s``" -#: ../../library/logging.rst:1016 +#: ../../library/logging.rst:1021 msgid "Name of function containing the logging call." msgstr "" -#: ../../library/logging.rst:1018 +#: ../../library/logging.rst:1023 msgid "levelname" msgstr "levelname" -#: ../../library/logging.rst:1018 +#: ../../library/logging.rst:1023 msgid "``%(levelname)s``" msgstr "``%(levelname)s``" -#: ../../library/logging.rst:1018 +#: ../../library/logging.rst:1023 msgid "" "Text logging level for the message (``'DEBUG'``, ``'INFO'``, ``'WARNING'``, " "``'ERROR'``, ``'CRITICAL'``)." msgstr "" -#: ../../library/logging.rst:1022 +#: ../../library/logging.rst:1027 msgid "levelno" msgstr "levelno" -#: ../../library/logging.rst:1022 +#: ../../library/logging.rst:1027 msgid "``%(levelno)s``" msgstr "``%(levelno)s``" -#: ../../library/logging.rst:1022 +#: ../../library/logging.rst:1027 msgid "" "Numeric logging level for the message (:const:`DEBUG`, :const:`INFO`, :const:" "`WARNING`, :const:`ERROR`, :const:`CRITICAL`)." msgstr "" -#: ../../library/logging.rst:1027 +#: ../../library/logging.rst:1032 msgid "lineno" msgstr "lineno" -#: ../../library/logging.rst:1027 +#: ../../library/logging.rst:1032 msgid "``%(lineno)d``" msgstr "``%(lineno)d``" -#: ../../library/logging.rst:1027 +#: ../../library/logging.rst:1032 msgid "Source line number where the logging call was issued (if available)." msgstr "" -#: ../../library/logging.rst:1030 +#: ../../library/logging.rst:1035 msgid "message" msgstr "message" -#: ../../library/logging.rst:1030 +#: ../../library/logging.rst:1035 msgid "``%(message)s``" msgstr "``%(message)s``" -#: ../../library/logging.rst:1030 +#: ../../library/logging.rst:1035 msgid "" "The logged message, computed as ``msg % args``. This is set when :meth:" "`Formatter.format` is invoked." msgstr "" -#: ../../library/logging.rst:1034 +#: ../../library/logging.rst:1039 msgid "module" msgstr "模組" -#: ../../library/logging.rst:1034 +#: ../../library/logging.rst:1039 msgid "``%(module)s``" msgstr "``%(module)s``" -#: ../../library/logging.rst:1034 +#: ../../library/logging.rst:1039 msgid "Module (name portion of ``filename``)." msgstr "模組(``filename`` 的名稱部分)。" -#: ../../library/logging.rst:1036 +#: ../../library/logging.rst:1041 msgid "msecs" msgstr "msecs" -#: ../../library/logging.rst:1036 +#: ../../library/logging.rst:1041 msgid "``%(msecs)d``" msgstr "``%(msecs)d``" -#: ../../library/logging.rst:1036 +#: ../../library/logging.rst:1041 msgid "" "Millisecond portion of the time when the :class:`LogRecord` was created." msgstr "" -#: ../../library/logging.rst:0 ../../library/logging.rst:1039 +#: ../../library/logging.rst:0 ../../library/logging.rst:1044 msgid "msg" msgstr "msg" -#: ../../library/logging.rst:1039 +#: ../../library/logging.rst:1044 msgid "" "The format string passed in the original logging call. Merged with ``args`` " "to produce ``message``, or an arbitrary object (see :ref:`arbitrary-object-" "messages`)." msgstr "" -#: ../../library/logging.rst:0 ../../library/logging.rst:1044 +#: ../../library/logging.rst:0 ../../library/logging.rst:1049 msgid "name" msgstr "name" -#: ../../library/logging.rst:1044 +#: ../../library/logging.rst:1049 msgid "``%(name)s``" msgstr "``%(name)s``" -#: ../../library/logging.rst:1044 +#: ../../library/logging.rst:1049 msgid "Name of the logger used to log the call." msgstr "" -#: ../../library/logging.rst:1046 +#: ../../library/logging.rst:1051 msgid "pathname" msgstr "pathname" -#: ../../library/logging.rst:1046 +#: ../../library/logging.rst:1051 msgid "``%(pathname)s``" msgstr "``%(pathname)s``" -#: ../../library/logging.rst:1046 +#: ../../library/logging.rst:1051 msgid "" "Full pathname of the source file where the logging call was issued (if " "available)." msgstr "" -#: ../../library/logging.rst:1049 +#: ../../library/logging.rst:1054 msgid "process" msgstr "process" -#: ../../library/logging.rst:1049 +#: ../../library/logging.rst:1054 msgid "``%(process)d``" msgstr "``%(process)d``" -#: ../../library/logging.rst:1049 +#: ../../library/logging.rst:1054 msgid "Process ID (if available)." msgstr "行程 ID(如果可用)。" -#: ../../library/logging.rst:1051 +#: ../../library/logging.rst:1056 msgid "processName" msgstr "processName" -#: ../../library/logging.rst:1051 +#: ../../library/logging.rst:1056 msgid "``%(processName)s``" msgstr "``%(processName)s``" -#: ../../library/logging.rst:1051 +#: ../../library/logging.rst:1056 msgid "Process name (if available)." msgstr "行程名稱(如果可用)。" -#: ../../library/logging.rst:1053 +#: ../../library/logging.rst:1058 msgid "relativeCreated" msgstr "relativeCreated" -#: ../../library/logging.rst:1053 +#: ../../library/logging.rst:1058 msgid "``%(relativeCreated)d``" msgstr "``%(relativeCreated)d``" -#: ../../library/logging.rst:1053 +#: ../../library/logging.rst:1058 msgid "" "Time in milliseconds when the LogRecord was created, relative to the time " "the logging module was loaded." msgstr "" -#: ../../library/logging.rst:1057 +#: ../../library/logging.rst:1062 msgid "stack_info" msgstr "stack_info" -#: ../../library/logging.rst:1057 +#: ../../library/logging.rst:1062 msgid "" "Stack frame information (where available) from the bottom of the stack in " "the current thread, up to and including the stack frame of the logging call " "which resulted in the creation of this record." msgstr "" -#: ../../library/logging.rst:1063 +#: ../../library/logging.rst:1068 msgid "thread" msgstr "thread" -#: ../../library/logging.rst:1063 +#: ../../library/logging.rst:1068 msgid "``%(thread)d``" msgstr "``%(thread)d``" -#: ../../library/logging.rst:1063 +#: ../../library/logging.rst:1068 msgid "Thread ID (if available)." msgstr "執行緒 ID(如果可用)。" -#: ../../library/logging.rst:1065 +#: ../../library/logging.rst:1070 msgid "threadName" msgstr "threadName" -#: ../../library/logging.rst:1065 +#: ../../library/logging.rst:1070 msgid "``%(threadName)s``" msgstr "``%(threadName)s``" -#: ../../library/logging.rst:1065 +#: ../../library/logging.rst:1070 msgid "Thread name (if available)." msgstr "" -#: ../../library/logging.rst:1067 +#: ../../library/logging.rst:1072 msgid "taskName" msgstr "taskName" -#: ../../library/logging.rst:1067 +#: ../../library/logging.rst:1072 msgid "``%(taskName)s``" msgstr "``%(taskName)s``" -#: ../../library/logging.rst:1067 +#: ../../library/logging.rst:1072 msgid ":class:`asyncio.Task` name (if available)." msgstr "" -#: ../../library/logging.rst:1070 +#: ../../library/logging.rst:1075 msgid "*processName* was added." msgstr "新增 *processName*。" -#: ../../library/logging.rst:1073 +#: ../../library/logging.rst:1078 msgid "*taskName* was added." msgstr "新增 *taskName*。" -#: ../../library/logging.rst:1079 +#: ../../library/logging.rst:1084 msgid "LoggerAdapter Objects" msgstr "LoggerAdapter 物件" -#: ../../library/logging.rst:1081 +#: ../../library/logging.rst:1086 msgid "" ":class:`LoggerAdapter` instances are used to conveniently pass contextual " "information into logging calls. For a usage example, see the section on :ref:" "`adding contextual information to your logging output `." msgstr "" -#: ../../library/logging.rst:1087 +#: ../../library/logging.rst:1092 msgid "" "Returns an instance of :class:`LoggerAdapter` initialized with an " "underlying :class:`Logger` instance, an optional dict-like object (*extra*), " @@ -1635,7 +1646,7 @@ msgid "" "`LoggerAdapter` instance" msgstr "" -#: ../../library/logging.rst:1097 +#: ../../library/logging.rst:1102 msgid "" "Modifies the message and/or keyword arguments passed to a logging call in " "order to insert contextual information. This implementation takes the object " @@ -1644,15 +1655,15 @@ msgid "" "(possibly modified) versions of the arguments passed in." msgstr "" -#: ../../library/logging.rst:1105 +#: ../../library/logging.rst:1110 msgid "Delegates to the underlying :attr:`!manager` on *logger*." msgstr "" -#: ../../library/logging.rst:1109 +#: ../../library/logging.rst:1114 msgid "Delegates to the underlying :meth:`!_log` method on *logger*." msgstr "" -#: ../../library/logging.rst:1111 +#: ../../library/logging.rst:1116 msgid "" "In addition to the above, :class:`LoggerAdapter` supports the following " "methods of :class:`Logger`: :meth:`~Logger.debug`, :meth:`~Logger.info`, :" @@ -1664,32 +1675,32 @@ msgid "" "interchangeably." msgstr "" -#: ../../library/logging.rst:1122 +#: ../../library/logging.rst:1127 msgid "" "The :meth:`~Logger.isEnabledFor`, :meth:`~Logger.getEffectiveLevel`, :meth:" "`~Logger.setLevel` and :meth:`~Logger.hasHandlers` methods were added to :" "class:`LoggerAdapter`. These methods delegate to the underlying logger." msgstr "" -#: ../../library/logging.rst:1128 +#: ../../library/logging.rst:1133 msgid "" "Attribute :attr:`!manager` and method :meth:`!_log` were added, which " "delegate to the underlying logger and allow adapters to be nested." msgstr "" -#: ../../library/logging.rst:1133 +#: ../../library/logging.rst:1138 msgid "The *extra* argument is now optional." msgstr "*extra* 引數現在是可選的。" -#: ../../library/logging.rst:1137 +#: ../../library/logging.rst:1142 msgid "The *merge_extra* parameter was added." msgstr "新增 *merge_extra* 參數。" -#: ../../library/logging.rst:1141 +#: ../../library/logging.rst:1146 msgid "Thread Safety" msgstr "執行緒安全" -#: ../../library/logging.rst:1143 +#: ../../library/logging.rst:1148 msgid "" "The logging module is intended to be thread-safe without any special work " "needing to be done by its clients. It achieves this through using threading " @@ -1698,7 +1709,7 @@ msgid "" "O." msgstr "" -#: ../../library/logging.rst:1148 +#: ../../library/logging.rst:1153 msgid "" "If you are implementing asynchronous signal handlers using the :mod:`signal` " "module, you may not be able to use logging from within such handlers. This " @@ -1706,17 +1717,17 @@ msgid "" "always re-entrant, and so cannot be invoked from such signal handlers." msgstr "" -#: ../../library/logging.rst:1155 +#: ../../library/logging.rst:1160 msgid "Module-Level Functions" msgstr "模組層級函式" -#: ../../library/logging.rst:1157 +#: ../../library/logging.rst:1162 msgid "" "In addition to the classes described above, there are a number of module-" "level functions." msgstr "" -#: ../../library/logging.rst:1163 +#: ../../library/logging.rst:1168 msgid "" "Return a logger with the specified name or, if name is ``None``, return the " "root logger of the hierarchy. If specified, the name is typically a dot-" @@ -1726,14 +1737,14 @@ msgid "" "for not doing that, as mentioned in :ref:`logger`." msgstr "" -#: ../../library/logging.rst:1170 +#: ../../library/logging.rst:1175 msgid "" "All calls to this function with a given name return the same logger " "instance. This means that logger instances never need to be passed between " "different parts of an application." msgstr "" -#: ../../library/logging.rst:1177 +#: ../../library/logging.rst:1182 msgid "" "Return either the standard :class:`Logger` class, or the last class passed " "to :func:`setLoggerClass`. This function may be called from within a new " @@ -1742,7 +1753,7 @@ msgid "" "example::" msgstr "" -#: ../../library/logging.rst:1182 +#: ../../library/logging.rst:1187 msgid "" "class MyLogger(logging.getLoggerClass()):\n" " # ... override behaviour here" @@ -1750,37 +1761,37 @@ msgstr "" "class MyLogger(logging.getLoggerClass()):\n" " # ... 在這裡覆蓋其行為" -#: ../../library/logging.rst:1188 +#: ../../library/logging.rst:1193 msgid "Return a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:1190 +#: ../../library/logging.rst:1195 msgid "" "This function has been provided, along with :func:`setLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:1195 +#: ../../library/logging.rst:1200 msgid "" "See :func:`setLogRecordFactory` for more information about the how the " "factory is called." msgstr "" -#: ../../library/logging.rst:1200 +#: ../../library/logging.rst:1205 msgid "" "This is a convenience function that calls :meth:`Logger.debug`, on the root " "logger. The handling of the arguments is in every way identical to what is " "described in that method." msgstr "" -#: ../../library/logging.rst:1204 +#: ../../library/logging.rst:1209 msgid "" "The only difference is that if the root logger has no handlers, then :func:" "`basicConfig` is called, prior to calling ``debug`` on the root logger." msgstr "" -#: ../../library/logging.rst:1207 +#: ../../library/logging.rst:1212 msgid "" "For very short scripts or quick demonstrations of ``logging`` facilities, " "``debug`` and the other module-level functions may be convenient. However, " @@ -1790,38 +1801,38 @@ msgid "" "described at the beginning of this documentation." msgstr "" -#: ../../library/logging.rst:1217 +#: ../../library/logging.rst:1222 msgid "" "Logs a message with level :const:`INFO` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1223 +#: ../../library/logging.rst:1228 msgid "" "Logs a message with level :const:`WARNING` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1226 +#: ../../library/logging.rst:1231 msgid "" "There is an obsolete function ``warn`` which is functionally identical to " "``warning``. As ``warn`` is deprecated, please do not use it - use " "``warning`` instead." msgstr "" -#: ../../library/logging.rst:1233 +#: ../../library/logging.rst:1238 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1239 +#: ../../library/logging.rst:1244 msgid "" "Logs a message with level :const:`CRITICAL` on the root logger. The " "arguments and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1245 +#: ../../library/logging.rst:1250 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`. Exception info is " @@ -1829,13 +1840,13 @@ msgid "" "exception handler." msgstr "" -#: ../../library/logging.rst:1251 +#: ../../library/logging.rst:1256 msgid "" "Logs a message with level *level* on the root logger. The arguments and " "behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1256 +#: ../../library/logging.rst:1261 msgid "" "Provides an overriding level *level* for all loggers which takes precedence " "over the logger's own level. When the need arises to temporarily throttle " @@ -1849,7 +1860,7 @@ msgid "" "individual loggers." msgstr "" -#: ../../library/logging.rst:1267 +#: ../../library/logging.rst:1272 msgid "" "Note that if you have defined any custom logging level higher than " "``CRITICAL`` (this is not recommended), you won't be able to rely on the " @@ -1857,13 +1868,13 @@ msgid "" "a suitable value." msgstr "" -#: ../../library/logging.rst:1272 +#: ../../library/logging.rst:1277 msgid "" "The *level* parameter was defaulted to level ``CRITICAL``. See :issue:" "`28524` for more information about this change." msgstr "" -#: ../../library/logging.rst:1278 +#: ../../library/logging.rst:1283 msgid "" "Associates level *level* with text *levelName* in an internal dictionary, " "which is used to map numeric levels to a textual representation, for example " @@ -1873,24 +1884,24 @@ msgid "" "and they should increase in increasing order of severity." msgstr "" -#: ../../library/logging.rst:1285 +#: ../../library/logging.rst:1290 msgid "" "If you are thinking of defining your own levels, please see the section on :" "ref:`custom-levels`." msgstr "" -#: ../../library/logging.rst:1290 +#: ../../library/logging.rst:1295 msgid "" "Returns a mapping from level names to their corresponding logging levels. " "For example, the string \"CRITICAL\" maps to :const:`CRITICAL`. The returned " "mapping is copied from an internal mapping on each call to this function." msgstr "" -#: ../../library/logging.rst:1298 +#: ../../library/logging.rst:1303 msgid "Returns the textual or numeric representation of logging level *level*." msgstr "" -#: ../../library/logging.rst:1300 +#: ../../library/logging.rst:1305 msgid "" "If *level* is one of the predefined levels :const:`CRITICAL`, :const:" "`ERROR`, :const:`WARNING`, :const:`INFO` or :const:`DEBUG` then you get the " @@ -1900,20 +1911,20 @@ msgid "" "the corresponding string representation is returned." msgstr "" -#: ../../library/logging.rst:1307 +#: ../../library/logging.rst:1312 msgid "" "The *level* parameter also accepts a string representation of the level such " "as 'INFO'. In such cases, this functions returns the corresponding numeric " "value of the level." msgstr "" -#: ../../library/logging.rst:1311 +#: ../../library/logging.rst:1316 msgid "" "If no matching numeric or string value is passed in, the string 'Level %s' % " "level is returned." msgstr "" -#: ../../library/logging.rst:1314 +#: ../../library/logging.rst:1319 msgid "" "Levels are internally integers (as they need to be compared in the logging " "logic). This function is used to convert between an integer level and the " @@ -1922,7 +1933,7 @@ msgid "" "vice versa." msgstr "" -#: ../../library/logging.rst:1320 +#: ../../library/logging.rst:1325 msgid "" "In Python versions earlier than 3.4, this function could also be passed a " "text level, and would return the corresponding numeric value of the level. " @@ -1930,17 +1941,17 @@ msgid "" "Python 3.4, but reinstated in 3.4.2 due to retain backward compatibility." msgstr "" -#: ../../library/logging.rst:1328 +#: ../../library/logging.rst:1333 msgid "" "Returns a handler with the specified *name*, or ``None`` if there is no " "handler with that name." msgstr "" -#: ../../library/logging.rst:1335 +#: ../../library/logging.rst:1340 msgid "Returns an immutable set of all known handler names." msgstr "" -#: ../../library/logging.rst:1341 +#: ../../library/logging.rst:1346 msgid "" "Creates and returns a new :class:`LogRecord` instance whose attributes are " "defined by *attrdict*. This function is useful for taking a pickled :class:" @@ -1948,7 +1959,7 @@ msgid "" "as a :class:`LogRecord` instance at the receiving end." msgstr "" -#: ../../library/logging.rst:1349 +#: ../../library/logging.rst:1354 msgid "" "Does basic configuration for the logging system by creating a :class:" "`StreamHandler` with a default :class:`Formatter` and adding it to the root " @@ -1957,13 +1968,13 @@ msgid "" "no handlers are defined for the root logger." msgstr "" -#: ../../library/logging.rst:1355 +#: ../../library/logging.rst:1360 msgid "" "This function does nothing if the root logger already has handlers " "configured, unless the keyword argument *force* is set to ``True``." msgstr "" -#: ../../library/logging.rst:1358 +#: ../../library/logging.rst:1363 msgid "" "This function should be called from the main thread before other threads are " "started. In versions of Python prior to 2.7.1 and 3.2, if this function is " @@ -1972,54 +1983,54 @@ msgid "" "unexpected results such as messages being duplicated in the log." msgstr "" -#: ../../library/logging.rst:1365 +#: ../../library/logging.rst:1370 msgid "The following keyword arguments are supported." msgstr "支援以下的關鍵字引數。" -#: ../../library/logging.rst:1372 +#: ../../library/logging.rst:1377 msgid "*filename*" msgstr "*filename*" -#: ../../library/logging.rst:1372 +#: ../../library/logging.rst:1377 msgid "" "Specifies that a :class:`FileHandler` be created, using the specified " "filename, rather than a :class:`StreamHandler`." msgstr "" -#: ../../library/logging.rst:1376 +#: ../../library/logging.rst:1381 msgid "*filemode*" msgstr "*filemode*" -#: ../../library/logging.rst:1376 +#: ../../library/logging.rst:1381 msgid "" "If *filename* is specified, open the file in this :ref:`mode `. " "Defaults to ``'a'``." msgstr "" -#: ../../library/logging.rst:1380 +#: ../../library/logging.rst:1385 msgid "*format*" msgstr "*format*" -#: ../../library/logging.rst:1380 +#: ../../library/logging.rst:1385 msgid "" "Use the specified format string for the handler. Defaults to attributes " "``levelname``, ``name`` and ``message`` separated by colons." msgstr "" -#: ../../library/logging.rst:1385 +#: ../../library/logging.rst:1390 msgid "*datefmt*" msgstr "*datefmt*" -#: ../../library/logging.rst:1385 +#: ../../library/logging.rst:1390 msgid "" "Use the specified date/time format, as accepted by :func:`time.strftime`." msgstr "" -#: ../../library/logging.rst:1388 +#: ../../library/logging.rst:1393 msgid "*style*" msgstr "*style*" -#: ../../library/logging.rst:1388 +#: ../../library/logging.rst:1393 msgid "" "If *format* is specified, use this style for the format string. One of " "``'%'``, ``'{'`` or ``'$'`` for :ref:`printf-style `." msgstr "" -#: ../../library/logging.rst:1399 +#: ../../library/logging.rst:1404 msgid "*stream*" msgstr "*stream*" -#: ../../library/logging.rst:1399 +#: ../../library/logging.rst:1404 msgid "" "Use the specified stream to initialize the :class:`StreamHandler`. Note that " "this argument is incompatible with *filename* - if both are present, a " "``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1405 +#: ../../library/logging.rst:1410 msgid "*handlers*" msgstr "*handlers*" -#: ../../library/logging.rst:1405 +#: ../../library/logging.rst:1410 msgid "" "If specified, this should be an iterable of already created handlers to add " "to the root logger. Any handlers which don't already have a formatter set " @@ -2059,33 +2070,33 @@ msgid "" "present, a ``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1414 +#: ../../library/logging.rst:1419 msgid "*force*" msgstr "*force*" -#: ../../library/logging.rst:1414 +#: ../../library/logging.rst:1419 msgid "" "If this keyword argument is specified as true, any existing handlers " "attached to the root logger are removed and closed, before carrying out the " "configuration as specified by the other arguments." msgstr "" -#: ../../library/logging.rst:1420 +#: ../../library/logging.rst:1425 msgid "*encoding*" msgstr "*encoding*" -#: ../../library/logging.rst:1420 +#: ../../library/logging.rst:1425 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " "the output file." msgstr "" -#: ../../library/logging.rst:1425 +#: ../../library/logging.rst:1430 msgid "*errors*" msgstr "*errors*" -#: ../../library/logging.rst:1425 +#: ../../library/logging.rst:1430 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " @@ -2094,39 +2105,39 @@ msgid "" "`open`, which means that it will be treated the same as passing 'errors'." msgstr "" -#: ../../library/logging.rst:1436 +#: ../../library/logging.rst:1441 msgid "The *style* argument was added." msgstr "新增 *style* 引數。" -#: ../../library/logging.rst:1439 +#: ../../library/logging.rst:1444 msgid "" "The *handlers* argument was added. Additional checks were added to catch " "situations where incompatible arguments are specified (e.g. *handlers* " "together with *stream* or *filename*, or *stream* together with *filename*)." msgstr "" -#: ../../library/logging.rst:1445 +#: ../../library/logging.rst:1450 msgid "The *force* argument was added." msgstr "新增 *force* 引數。" -#: ../../library/logging.rst:1448 +#: ../../library/logging.rst:1453 msgid "The *encoding* and *errors* arguments were added." msgstr "新增 *encoding* 與 *errors* 引數。" -#: ../../library/logging.rst:1453 +#: ../../library/logging.rst:1458 msgid "" "Informs the logging system to perform an orderly shutdown by flushing and " "closing all handlers. This should be called at application exit and no " "further use of the logging system should be made after this call." msgstr "" -#: ../../library/logging.rst:1457 +#: ../../library/logging.rst:1462 msgid "" "When the logging module is imported, it registers this function as an exit " "handler (see :mod:`atexit`), so normally there's no need to do that manually." msgstr "" -#: ../../library/logging.rst:1464 +#: ../../library/logging.rst:1469 msgid "" "Tells the logging system to use the class *klass* when instantiating a " "logger. The class should define :meth:`!__init__` such that only a name " @@ -2138,32 +2149,32 @@ msgid "" "loggers." msgstr "" -#: ../../library/logging.rst:1475 +#: ../../library/logging.rst:1480 msgid "Set a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:1477 +#: ../../library/logging.rst:1482 msgid "The factory callable to be used to instantiate a log record." msgstr "" -#: ../../library/logging.rst:1479 +#: ../../library/logging.rst:1484 msgid "" "This function has been provided, along with :func:`getLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:1484 +#: ../../library/logging.rst:1489 msgid "The factory has the following signature:" msgstr "" -#: ../../library/logging.rst:1486 +#: ../../library/logging.rst:1491 msgid "" "``factory(name, level, fn, lno, msg, args, exc_info, func=None, sinfo=None, " "**kwargs)``" msgstr "" -#: ../../library/logging.rst:1488 +#: ../../library/logging.rst:1493 msgid "The logger name." msgstr "" @@ -2171,7 +2182,7 @@ msgstr "" msgid "level" msgstr "" -#: ../../library/logging.rst:1489 +#: ../../library/logging.rst:1494 msgid "The logging level (numeric)." msgstr "" @@ -2179,7 +2190,7 @@ msgstr "" msgid "fn" msgstr "fn" -#: ../../library/logging.rst:1490 +#: ../../library/logging.rst:1495 msgid "The full pathname of the file where the logging call was made." msgstr "" @@ -2187,19 +2198,19 @@ msgstr "" msgid "lno" msgstr "lno" -#: ../../library/logging.rst:1491 +#: ../../library/logging.rst:1496 msgid "The line number in the file where the logging call was made." msgstr "" -#: ../../library/logging.rst:1492 +#: ../../library/logging.rst:1497 msgid "The logging message." msgstr "" -#: ../../library/logging.rst:1493 +#: ../../library/logging.rst:1498 msgid "The arguments for the logging message." msgstr "" -#: ../../library/logging.rst:1494 +#: ../../library/logging.rst:1499 msgid "An exception tuple, or ``None``." msgstr "" @@ -2207,7 +2218,7 @@ msgstr "" msgid "func" msgstr "func" -#: ../../library/logging.rst:1495 +#: ../../library/logging.rst:1500 msgid "The name of the function or method which invoked the logging call." msgstr "" @@ -2215,7 +2226,7 @@ msgstr "" msgid "sinfo" msgstr "sinfo" -#: ../../library/logging.rst:1497 +#: ../../library/logging.rst:1502 msgid "" "A stack traceback such as is provided by :func:`traceback.print_stack`, " "showing the call hierarchy." @@ -2225,15 +2236,15 @@ msgstr "" msgid "kwargs" msgstr "kwargs" -#: ../../library/logging.rst:1499 +#: ../../library/logging.rst:1504 msgid "Additional keyword arguments." msgstr "額外的關鍵字引數。" -#: ../../library/logging.rst:1503 +#: ../../library/logging.rst:1508 msgid "Module-Level Attributes" msgstr "模組層級屬性" -#: ../../library/logging.rst:1507 +#: ../../library/logging.rst:1512 msgid "" "A \"handler of last resort\" is available through this attribute. This is a :" "class:`StreamHandler` writing to ``sys.stderr`` with a level of ``WARNING``, " @@ -2244,15 +2255,15 @@ msgid "" "reason, ``lastResort`` can be set to ``None``." msgstr "" -#: ../../library/logging.rst:1519 +#: ../../library/logging.rst:1524 msgid "Used to see if exceptions during handling should be propagated." msgstr "" -#: ../../library/logging.rst:1521 +#: ../../library/logging.rst:1526 msgid "Default: ``True``." msgstr "" -#: ../../library/logging.rst:1523 +#: ../../library/logging.rst:1528 msgid "" "If :data:`raiseExceptions` is ``False``, exceptions get silently ignored. " "This is what is mostly wanted for a logging system - most users will not " @@ -2260,22 +2271,22 @@ msgid "" "application errors." msgstr "" -#: ../../library/logging.rst:1530 +#: ../../library/logging.rst:1535 msgid "Integration with the warnings module" msgstr "" -#: ../../library/logging.rst:1532 +#: ../../library/logging.rst:1537 msgid "" "The :func:`captureWarnings` function can be used to integrate :mod:`logging` " "with the :mod:`warnings` module." msgstr "" -#: ../../library/logging.rst:1537 +#: ../../library/logging.rst:1542 msgid "" "This function is used to turn the capture of warnings by logging on and off." msgstr "" -#: ../../library/logging.rst:1540 +#: ../../library/logging.rst:1545 msgid "" "If *capture* is ``True``, warnings issued by the :mod:`warnings` module will " "be redirected to the logging system. Specifically, a warning will be " @@ -2284,46 +2295,46 @@ msgid "" "`WARNING`." msgstr "" -#: ../../library/logging.rst:1545 +#: ../../library/logging.rst:1550 msgid "" "If *capture* is ``False``, the redirection of warnings to the logging system " "will stop, and warnings will be redirected to their original destinations (i." "e. those in effect before ``captureWarnings(True)`` was called)." msgstr "" -#: ../../library/logging.rst:1552 +#: ../../library/logging.rst:1557 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../library/logging.rst:1553 +#: ../../library/logging.rst:1558 msgid "Configuration API for the logging module." msgstr "" -#: ../../library/logging.rst:1555 +#: ../../library/logging.rst:1560 msgid "Module :mod:`logging.handlers`" msgstr ":mod:`logging.handlers` 模組" -#: ../../library/logging.rst:1556 +#: ../../library/logging.rst:1561 msgid "Useful handlers included with the logging module." msgstr "" -#: ../../library/logging.rst:1558 +#: ../../library/logging.rst:1563 msgid ":pep:`282` - A Logging System" msgstr "" -#: ../../library/logging.rst:1559 +#: ../../library/logging.rst:1564 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: ../../library/logging.rst:1562 +#: ../../library/logging.rst:1567 msgid "" "`Original Python logging package `_" msgstr "" -#: ../../library/logging.rst:1563 +#: ../../library/logging.rst:1568 msgid "" "This is the original source for the :mod:`logging` package. The version of " "the package available from this site is suitable for use with Python 1.5.2, " From ce6e6f8ec242fa8c763f2d473daba0b7cb6977b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 28 Dec 2025 00:18:22 +0000 Subject: [PATCH 2/4] sync with cpython fd9db61a --- library/linecache.po | 37 ++++++++++++++++++------------------- library/os.po | 6 +++--- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/library/linecache.po b/library/linecache.po index 8e7f152f09..79226acf26 100644 --- a/library/linecache.po +++ b/library/linecache.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-09-08 15:25+0800\n" +"POT-Creation-Date: 2025-12-28 00:16+0000\n" "PO-Revision-Date: 2025-07-07 23:50+0800\n" "Last-Translator: Weilin Du <1372449351@qq.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -31,14 +31,13 @@ msgstr "**原始碼:**\\ :source:`Lib/linecache.py`" msgid "" "The :mod:`linecache` module allows one to get any line from a Python source " "file, while attempting to optimize internally, using a cache, the common " -"case where many lines are read from a single file. This is used by " -"the :mod:`traceback` module to retrieve source lines for inclusion in the " -"formatted traceback." +"case where many lines are read from a single file. This is used by the :mod:" +"`traceback` module to retrieve source lines for inclusion in the formatted " +"traceback." msgstr "" ":mod:`linecache` 模組允許從 Python 原始碼檔案中取得任何一行。當嘗試在程式內部" -"進行最佳化,會使用快取,這是從單一檔案讀取許多行的常見情況。 這" -"被 :mod:`traceback` 模組用來擷取來自原始碼檔案的行,以包含在格式化的 " -"traceback 中。" +"進行最佳化,會使用快取,這是從單一檔案讀取許多行的常見情況。 這被 :mod:" +"`traceback` 模組用來擷取來自原始碼檔案的行,以包含在格式化的 traceback 中。" #: ../../library/linecache.rst:18 msgid "" @@ -46,9 +45,9 @@ msgid "" "uses :func:`tokenize.detect_encoding` to get the encoding of the file; in " "the absence of an encoding token, the file encoding defaults to UTF-8." msgstr "" -":func:`tokenize.open` 函式用來開啟檔案。這個函式使" -"用 :func:`tokenize.detect_encoding` 來取得檔案的編碼;在沒有編碼標記的情況" -"下,檔案編碼預設為 UTF-8。" +":func:`tokenize.open` 函式用來開啟檔案。這個函式使用 :func:`tokenize." +"detect_encoding` 來取得檔案的編碼;在沒有編碼標記的情況下,檔案編碼預設為 " +"UTF-8。" #: ../../library/linecache.rst:22 msgid "The :mod:`linecache` module defines the following functions:" @@ -66,21 +65,21 @@ msgstr "" #: ../../library/linecache.rst:33 msgid "" "If *filename* indicates a frozen module (starting with ``'\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -6380,7 +6380,7 @@ msgstr "" #: ../../library/os.rst:5617 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " -"set, :func:`cpu_count` returns the overridden value *n*." +"set, :func:`cpu_count` returns the override value *n*." msgstr "" #: ../../library/os.rst:5624 @@ -6406,7 +6406,7 @@ msgstr "" #: ../../library/os.rst:5640 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " -"set, :func:`process_cpu_count` returns the overridden value *n*." +"set, :func:`process_cpu_count` returns the override value *n*." msgstr "" #: ../../library/os.rst:5643 From 06706551ed1c589c882de98f93871297f1c84987 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 29 Dec 2025 00:18:20 +0000 Subject: [PATCH 3/4] sync with cpython b097fa13 --- library/inspect.po | 599 +++++++++++++++++++++++--------------------- library/zoneinfo.po | 92 +++---- 2 files changed, 362 insertions(+), 329 deletions(-) diff --git a/library/inspect.po b/library/inspect.po index c20412236a..0b0c303c6a 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-18 00:15+0000\n" +"POT-Creation-Date: 2025-12-29 00:16+0000\n" "PO-Revision-Date: 2022-10-16 06:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -74,19 +74,19 @@ msgid "class" msgstr "" #: ../../library/inspect.rst:48 ../../library/inspect.rst:63 -#: ../../library/inspect.rst:81 ../../library/inspect.rst:295 +#: ../../library/inspect.rst:81 ../../library/inspect.rst:301 msgid "__doc__" msgstr "__doc__" #: ../../library/inspect.rst:48 ../../library/inspect.rst:63 -#: ../../library/inspect.rst:81 ../../library/inspect.rst:295 +#: ../../library/inspect.rst:81 ../../library/inspect.rst:301 msgid "documentation string" msgstr "" #: ../../library/inspect.rst:50 ../../library/inspect.rst:65 #: ../../library/inspect.rst:83 ../../library/inspect.rst:248 -#: ../../library/inspect.rst:265 ../../library/inspect.rst:278 -#: ../../library/inspect.rst:297 +#: ../../library/inspect.rst:265 ../../library/inspect.rst:281 +#: ../../library/inspect.rst:303 msgid "__name__" msgstr "__name__" @@ -96,15 +96,15 @@ msgstr "" #: ../../library/inspect.rst:53 ../../library/inspect.rst:68 #: ../../library/inspect.rst:86 ../../library/inspect.rst:250 -#: ../../library/inspect.rst:267 ../../library/inspect.rst:280 -#: ../../library/inspect.rst:300 +#: ../../library/inspect.rst:267 ../../library/inspect.rst:283 +#: ../../library/inspect.rst:306 msgid "__qualname__" msgstr "__qualname__" #: ../../library/inspect.rst:53 ../../library/inspect.rst:68 #: ../../library/inspect.rst:86 ../../library/inspect.rst:250 -#: ../../library/inspect.rst:267 ../../library/inspect.rst:280 -#: ../../library/inspect.rst:300 +#: ../../library/inspect.rst:267 ../../library/inspect.rst:283 +#: ../../library/inspect.rst:306 msgid "qualified name" msgstr "" @@ -143,7 +143,7 @@ msgstr "__func__" msgid "function object containing implementation of method" msgstr "" -#: ../../library/inspect.rst:74 ../../library/inspect.rst:302 +#: ../../library/inspect.rst:74 ../../library/inspect.rst:308 msgid "__self__" msgstr "__self__" @@ -260,7 +260,7 @@ msgid "next inner traceback object (called by this level)" msgstr "" #: ../../library/inspect.rst:132 ../../library/inspect.rst:252 -#: ../../library/inspect.rst:272 ../../library/inspect.rst:285 +#: ../../library/inspect.rst:272 ../../library/inspect.rst:288 msgid "frame" msgstr "" @@ -356,7 +356,7 @@ msgid "used to clear all references to local variables" msgstr "" #: ../../library/inspect.rst:175 ../../library/inspect.rst:259 -#: ../../library/inspect.rst:276 ../../library/inspect.rst:289 +#: ../../library/inspect.rst:279 ../../library/inspect.rst:295 msgid "code" msgstr "code(程式碼)" @@ -529,7 +529,7 @@ msgid "generator" msgstr "" #: ../../library/inspect.rst:248 ../../library/inspect.rst:265 -#: ../../library/inspect.rst:278 +#: ../../library/inspect.rst:281 msgid "name" msgstr "" @@ -549,7 +549,7 @@ msgstr "" msgid "gi_suspended" msgstr "" -#: ../../library/inspect.rst:256 +#: ../../library/inspect.rst:256 ../../library/inspect.rst:276 msgid "is the generator suspended?" msgstr "" @@ -573,7 +573,7 @@ msgstr "" msgid "ag_await" msgstr "ag_await" -#: ../../library/inspect.rst:269 ../../library/inspect.rst:282 +#: ../../library/inspect.rst:269 ../../library/inspect.rst:285 msgid "object being awaited on, or ``None``" msgstr "" @@ -586,76 +586,103 @@ msgid "ag_running" msgstr "ag_running" #: ../../library/inspect.rst:276 +msgid "ag_suspended" +msgstr "" + +#: ../../library/inspect.rst:279 msgid "ag_code" msgstr "ag_code" -#: ../../library/inspect.rst:278 +#: ../../library/inspect.rst:281 msgid "coroutine" msgstr "coroutine" -#: ../../library/inspect.rst:282 +#: ../../library/inspect.rst:285 msgid "cr_await" msgstr "cr_await" -#: ../../library/inspect.rst:285 +#: ../../library/inspect.rst:288 msgid "cr_frame" msgstr "cr_frame" -#: ../../library/inspect.rst:287 +#: ../../library/inspect.rst:290 msgid "cr_running" msgstr "cr_running" -#: ../../library/inspect.rst:287 +#: ../../library/inspect.rst:290 msgid "is the coroutine running?" msgstr "" -#: ../../library/inspect.rst:289 +#: ../../library/inspect.rst:292 +msgid "cr_suspended" +msgstr "" + +#: ../../library/inspect.rst:292 +msgid "is the coroutine suspended?" +msgstr "" + +#: ../../library/inspect.rst:295 msgid "cr_code" msgstr "cr_code" -#: ../../library/inspect.rst:291 +#: ../../library/inspect.rst:297 msgid "cr_origin" msgstr "cr_origin" -#: ../../library/inspect.rst:291 +#: ../../library/inspect.rst:297 msgid "where coroutine was created, or ``None``. See |coroutine-origin-link|" msgstr "" -#: ../../library/inspect.rst:295 +#: ../../library/inspect.rst:301 msgid "builtin" msgstr "" -#: ../../library/inspect.rst:297 +#: ../../library/inspect.rst:303 msgid "original name of this function or method" msgstr "" -#: ../../library/inspect.rst:302 +#: ../../library/inspect.rst:308 msgid "instance to which a method is bound, or ``None``" msgstr "" -#: ../../library/inspect.rst:309 +#: ../../library/inspect.rst:315 msgid "Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators." msgstr "將 ``__qualname__`` 和 ``gi_yieldfrom`` 屬性加到產生器。" -#: ../../library/inspect.rst:311 +#: ../../library/inspect.rst:317 msgid "" "The ``__name__`` attribute of generators is now set from the function name, " "instead of the code name, and it can now be modified." msgstr "" -#: ../../library/inspect.rst:316 +#: ../../library/inspect.rst:322 msgid "Add ``cr_origin`` attribute to coroutines." msgstr "新增協程的 ``cr_origin`` 屬性。" -#: ../../library/inspect.rst:320 +#: ../../library/inspect.rst:326 msgid "Add ``__builtins__`` attribute to functions." msgstr "新增函式的 ``__builtins__`` 屬性。" -#: ../../library/inspect.rst:324 +#: ../../library/inspect.rst:330 +#, fuzzy +msgid "Add ``gi_suspended`` attribute to generators." +msgstr "將 ``__qualname__`` 和 ``gi_yieldfrom`` 屬性加到產生器。" + +#: ../../library/inspect.rst:334 +#, fuzzy +msgid "Add ``cr_suspended`` attribute to coroutines." +msgstr "新增協程的 ``cr_origin`` 屬性。" + +#: ../../library/inspect.rst:338 +#, fuzzy +msgid "Add ``ag_suspended`` attribute to async generators." +msgstr "將 ``__qualname__`` 和 ``gi_yieldfrom`` 屬性加到產生器。" + +#: ../../library/inspect.rst:342 msgid "Add ``f_generator`` attribute to frames." msgstr "新增 ``f_generator`` 屬性到 frame。" -#: ../../library/inspect.rst:328 +#: ../../library/inspect.rst:346 msgid "" "Return all the members of an object in a list of ``(name, value)`` pairs " "sorted by name. If the optional *predicate* argument—which will be called " @@ -663,14 +690,14 @@ msgid "" "the predicate returns a true value are included." msgstr "" -#: ../../library/inspect.rst:335 +#: ../../library/inspect.rst:353 msgid "" ":func:`getmembers` will only return class attributes defined in the " "metaclass when the argument is a class and those attributes have been listed " "in the metaclass' custom :meth:`~object.__dir__`." msgstr "" -#: ../../library/inspect.rst:342 +#: ../../library/inspect.rst:360 msgid "" "Return all the members of an object in a list of ``(name, value)`` pairs " "sorted by name without triggering dynamic lookup via the descriptor " @@ -678,7 +705,7 @@ msgid "" "that satisfy a given predicate." msgstr "" -#: ../../library/inspect.rst:349 +#: ../../library/inspect.rst:367 msgid "" ":func:`getmembers_static` may not be able to retrieve all members that " "getmembers can fetch (like dynamically created attributes) and may find " @@ -687,7 +714,7 @@ msgid "" "cases." msgstr "" -#: ../../library/inspect.rst:360 +#: ../../library/inspect.rst:378 msgid "" "Return the name of the module named by the file *path*, without including " "the names of enclosing packages. The file extension is checked against all " @@ -696,62 +723,62 @@ msgid "" "``None`` is returned." msgstr "" -#: ../../library/inspect.rst:366 +#: ../../library/inspect.rst:384 msgid "" "Note that this function *only* returns a meaningful name for actual Python " "modules - paths that potentially refer to Python packages will still return " "``None``." msgstr "" -#: ../../library/inspect.rst:370 +#: ../../library/inspect.rst:388 msgid "The function is based directly on :mod:`importlib`." msgstr "此函式直接基於 :mod:`importlib`。" -#: ../../library/inspect.rst:376 +#: ../../library/inspect.rst:394 msgid "Return ``True`` if the object is a module." msgstr "如果物件是模組,則回傳 ``True``。" -#: ../../library/inspect.rst:381 +#: ../../library/inspect.rst:399 msgid "" "Return ``True`` if the object is a class, whether built-in or created in " "Python code." msgstr "" -#: ../../library/inspect.rst:387 +#: ../../library/inspect.rst:405 msgid "Return ``True`` if the object is a bound method written in Python." msgstr "" -#: ../../library/inspect.rst:392 +#: ../../library/inspect.rst:410 msgid "Return ``True`` if the object is a :term:`package`." msgstr "如果物件是 :term:`package`,則回傳 ``True``。" -#: ../../library/inspect.rst:399 +#: ../../library/inspect.rst:417 msgid "" "Return ``True`` if the object is a Python function, which includes functions " "created by a :term:`lambda` expression." msgstr "" -#: ../../library/inspect.rst:405 +#: ../../library/inspect.rst:423 msgid "Return ``True`` if the object is a Python generator function." msgstr "如果物件是 Python 產生器函式,則回傳 ``True``。" -#: ../../library/inspect.rst:407 +#: ../../library/inspect.rst:425 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a Python generator function." msgstr "" -#: ../../library/inspect.rst:411 +#: ../../library/inspect.rst:429 msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a Python generator function." msgstr "" -#: ../../library/inspect.rst:417 +#: ../../library/inspect.rst:435 msgid "Return ``True`` if the object is a generator." msgstr "如果物件是產生器,則回傳 ``True``。" -#: ../../library/inspect.rst:422 +#: ../../library/inspect.rst:440 msgid "" "Return ``True`` if the object is a :term:`coroutine function` (a function " "defined with an :keyword:`async def` syntax), a :func:`functools.partial` " @@ -759,60 +786,60 @@ msgid "" "`markcoroutinefunction`." msgstr "" -#: ../../library/inspect.rst:429 +#: ../../library/inspect.rst:447 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a :term:`coroutine function`." msgstr "" -#: ../../library/inspect.rst:433 +#: ../../library/inspect.rst:451 msgid "" "Sync functions marked with :func:`markcoroutinefunction` now return ``True``." msgstr "" -#: ../../library/inspect.rst:437 ../../library/inspect.rst:507 +#: ../../library/inspect.rst:455 ../../library/inspect.rst:525 msgid "" "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if " "the wrapped function is a :term:`coroutine function`." msgstr "" -#: ../../library/inspect.rst:444 +#: ../../library/inspect.rst:462 msgid "" "Decorator to mark a callable as a :term:`coroutine function` if it would not " "otherwise be detected by :func:`iscoroutinefunction`." msgstr "" -#: ../../library/inspect.rst:447 +#: ../../library/inspect.rst:465 msgid "" "This may be of use for sync functions that return a :term:`coroutine`, if " "the function is passed to an API that requires :func:`iscoroutinefunction`." msgstr "" -#: ../../library/inspect.rst:450 +#: ../../library/inspect.rst:468 msgid "" "When possible, using an :keyword:`async def` function is preferred. Also " "acceptable is calling the function and testing the return with :func:" "`iscoroutine`." msgstr "" -#: ../../library/inspect.rst:459 +#: ../../library/inspect.rst:477 msgid "" "Return ``True`` if the object is a :term:`coroutine` created by an :keyword:" "`async def` function." msgstr "" -#: ../../library/inspect.rst:467 +#: ../../library/inspect.rst:485 msgid "" "Return ``True`` if the object can be used in :keyword:`await` expression." msgstr "" -#: ../../library/inspect.rst:469 +#: ../../library/inspect.rst:487 msgid "" "Can also be used to distinguish generator-based coroutines from regular " "generators:" msgstr "" -#: ../../library/inspect.rst:472 +#: ../../library/inspect.rst:490 msgid "" "import types\n" "\n" @@ -836,13 +863,13 @@ msgstr "" "assert not isawaitable(gen())\n" "assert isawaitable(gen_coro())" -#: ../../library/inspect.rst:490 +#: ../../library/inspect.rst:508 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator` function, " "for example:" msgstr "" -#: ../../library/inspect.rst:493 +#: ../../library/inspect.rst:511 msgid "" ">>> async def agen():\n" "... yield 1\n" @@ -856,65 +883,65 @@ msgstr "" ">>> inspect.isasyncgenfunction(agen)\n" "True" -#: ../../library/inspect.rst:503 +#: ../../library/inspect.rst:521 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is an :term:`asynchronous generator` function." msgstr "" -#: ../../library/inspect.rst:513 +#: ../../library/inspect.rst:531 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator iterator` " "created by an :term:`asynchronous generator` function." msgstr "" -#: ../../library/inspect.rst:520 +#: ../../library/inspect.rst:538 msgid "Return ``True`` if the object is a traceback." msgstr "" -#: ../../library/inspect.rst:525 +#: ../../library/inspect.rst:543 msgid "Return ``True`` if the object is a frame." msgstr "" -#: ../../library/inspect.rst:530 +#: ../../library/inspect.rst:548 msgid "Return ``True`` if the object is a code." msgstr "如果物件是程式碼,則回傳 ``True``。" -#: ../../library/inspect.rst:535 +#: ../../library/inspect.rst:553 msgid "" "Return ``True`` if the object is a built-in function or a bound built-in " "method." msgstr "" -#: ../../library/inspect.rst:540 +#: ../../library/inspect.rst:558 msgid "" "Return ``True`` if the type of object is a :class:`~types.MethodWrapperType`." msgstr "" -#: ../../library/inspect.rst:542 +#: ../../library/inspect.rst:560 msgid "" "These are instances of :class:`~types.MethodWrapperType`, such as :meth:" "`~object.__str__`, :meth:`~object.__eq__` and :meth:`~object.__repr__`." msgstr "" -#: ../../library/inspect.rst:550 +#: ../../library/inspect.rst:568 msgid "" "Return ``True`` if the object is a user-defined or built-in function or " "method." msgstr "如果物件是使用者定義或內建的函式或方法,則回傳 ``True``。" -#: ../../library/inspect.rst:555 +#: ../../library/inspect.rst:573 msgid "Return ``True`` if the object is an abstract base class." msgstr "如果物件是抽象基底類別,則回傳 ``True``。" -#: ../../library/inspect.rst:560 +#: ../../library/inspect.rst:578 msgid "" "Return ``True`` if the object is a method descriptor, but not if :func:" "`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are " "true." msgstr "" -#: ../../library/inspect.rst:564 +#: ../../library/inspect.rst:582 msgid "" "This, for example, is true of ``int.__add__``. An object passing this test " "has a :meth:`~object.__get__` method, but not a :meth:`~object.__set__` " @@ -923,7 +950,7 @@ msgid "" "sensible, and :attr:`~definition.__doc__` often is." msgstr "" -#: ../../library/inspect.rst:570 +#: ../../library/inspect.rst:588 msgid "" "Methods implemented via descriptors that also pass one of the other tests " "return ``False`` from the :func:`ismethoddescriptor` test, simply because " @@ -931,7 +958,7 @@ msgid "" "`~method.__func__` attribute (etc) when an object passes :func:`ismethod`." msgstr "" -#: ../../library/inspect.rst:576 +#: ../../library/inspect.rst:594 msgid "" "This function no longer incorrectly reports objects with :meth:`~object." "__get__` and :meth:`~object.__delete__`, but not :meth:`~object.__set__`, as " @@ -939,11 +966,11 @@ msgid "" "descriptors)." msgstr "" -#: ../../library/inspect.rst:584 +#: ../../library/inspect.rst:602 msgid "Return ``True`` if the object is a data descriptor." msgstr "如果物件是資料描述器,則回傳 ``True``。" -#: ../../library/inspect.rst:586 +#: ../../library/inspect.rst:604 msgid "" "Data descriptors have a :attr:`~object.__set__` or a :attr:`~object." "__delete__` method. Examples are properties (defined in Python), getsets, " @@ -954,33 +981,33 @@ msgid "" "and members have both of these attributes), but this is not guaranteed." msgstr "" -#: ../../library/inspect.rst:597 +#: ../../library/inspect.rst:615 msgid "Return ``True`` if the object is a getset descriptor." msgstr "" -#: ../../library/inspect.rst:601 +#: ../../library/inspect.rst:619 msgid "" "getsets are attributes defined in extension modules via :c:type:" "`PyGetSetDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../library/inspect.rst:608 +#: ../../library/inspect.rst:626 msgid "Return ``True`` if the object is a member descriptor." msgstr "如果物件是成員描述器,則回傳 ``True``。" -#: ../../library/inspect.rst:612 +#: ../../library/inspect.rst:630 msgid "" "Member descriptors are attributes defined in extension modules via :c:type:" "`PyMemberDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../library/inspect.rst:620 +#: ../../library/inspect.rst:638 msgid "Retrieving source code" msgstr "取得原始碼" -#: ../../library/inspect.rst:624 +#: ../../library/inspect.rst:642 msgid "" "Get the documentation string for an object, cleaned up with :func:" "`cleandoc`. If the documentation string for an object is not provided and " @@ -989,11 +1016,11 @@ msgid "" "documentation string is invalid or missing." msgstr "" -#: ../../library/inspect.rst:630 +#: ../../library/inspect.rst:648 msgid "Documentation strings are now inherited if not overridden." msgstr "" -#: ../../library/inspect.rst:636 +#: ../../library/inspect.rst:654 msgid "" "Return in a single string any lines of comments immediately preceding the " "object's source code (for a class, function, or method), or at the top of " @@ -1002,27 +1029,27 @@ msgid "" "been defined in C or the interactive shell." msgstr "" -#: ../../library/inspect.rst:645 +#: ../../library/inspect.rst:663 msgid "" "Return the name of the (text or binary) file in which an object was defined. " "This will fail with a :exc:`TypeError` if the object is a built-in module, " "class, or function." msgstr "" -#: ../../library/inspect.rst:652 +#: ../../library/inspect.rst:670 msgid "" "Try to guess which module an object was defined in. Return ``None`` if the " "module cannot be determined." msgstr "" -#: ../../library/inspect.rst:658 +#: ../../library/inspect.rst:676 msgid "" "Return the name of the Python source file in which an object was defined or " "``None`` if no way can be identified to get the source. This will fail with " "a :exc:`TypeError` if the object is a built-in module, class, or function." msgstr "" -#: ../../library/inspect.rst:666 +#: ../../library/inspect.rst:684 msgid "" "Return a list of source lines and starting line number for an object. The " "argument may be a module, class, method, function, traceback, frame, or code " @@ -1033,13 +1060,13 @@ msgid "" "built-in module, class, or function." msgstr "" -#: ../../library/inspect.rst:675 ../../library/inspect.rst:689 +#: ../../library/inspect.rst:693 ../../library/inspect.rst:707 msgid "" ":exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the " "former." msgstr "" -#: ../../library/inspect.rst:682 +#: ../../library/inspect.rst:700 msgid "" "Return the text of the source code for an object. The argument may be a " "module, class, method, function, traceback, frame, or code object. The " @@ -1048,13 +1075,13 @@ msgid "" "object is a built-in module, class, or function." msgstr "" -#: ../../library/inspect.rst:696 +#: ../../library/inspect.rst:714 msgid "" "Clean up indentation from docstrings that are indented to line up with " "blocks of code." msgstr "" -#: ../../library/inspect.rst:699 +#: ../../library/inspect.rst:717 msgid "" "All leading whitespace is removed from the first line. Any leading " "whitespace that can be uniformly removed from the second line onwards is " @@ -1062,22 +1089,22 @@ msgid "" "Also, all tabs are expanded to spaces." msgstr "" -#: ../../library/inspect.rst:708 +#: ../../library/inspect.rst:726 msgid "Introspecting callables with the Signature object" msgstr "" -#: ../../library/inspect.rst:712 +#: ../../library/inspect.rst:730 msgid "" "The :class:`Signature` object represents the call signature of a callable " "object and its return annotation. To retrieve a :class:`!Signature` object, " "use the :func:`!signature` function." msgstr "" -#: ../../library/inspect.rst:719 +#: ../../library/inspect.rst:737 msgid "Return a :class:`Signature` object for the given *callable*:" msgstr "" -#: ../../library/inspect.rst:721 +#: ../../library/inspect.rst:739 msgid "" ">>> from inspect import signature\n" ">>> def foo(a, *, b:int, **kwargs):\n" @@ -1109,13 +1136,13 @@ msgstr "" ">>> sig.parameters['b'].annotation\n" "" -#: ../../library/inspect.rst:738 +#: ../../library/inspect.rst:756 msgid "" "Accepts a wide range of Python callables, from plain functions and classes " "to :func:`functools.partial` objects." msgstr "" -#: ../../library/inspect.rst:741 +#: ../../library/inspect.rst:759 msgid "" "If some of the annotations are strings (e.g., because ``from __future__ " "import annotations`` was used), :func:`signature` will attempt to " @@ -1130,7 +1157,7 @@ msgid "" "STRING`` to return annotations in string format." msgstr "" -#: ../../library/inspect.rst:755 +#: ../../library/inspect.rst:773 msgid "" "Raises :exc:`ValueError` if no signature can be provided, and :exc:" "`TypeError` if that type of object is not supported. Also, if the " @@ -1139,36 +1166,36 @@ msgid "" "get_annotations` could potentially raise any kind of exception." msgstr "" -#: ../../library/inspect.rst:761 +#: ../../library/inspect.rst:779 msgid "" "A slash (/) in the signature of a function denotes that the parameters prior " "to it are positional-only. For more info, see :ref:`the FAQ entry on " "positional-only parameters `." msgstr "" -#: ../../library/inspect.rst:765 +#: ../../library/inspect.rst:783 msgid "" "The *follow_wrapped* parameter was added. Pass ``False`` to get a signature " "of *callable* specifically (``callable.__wrapped__`` will not be used to " "unwrap decorated callables.)" msgstr "" -#: ../../library/inspect.rst:771 ../../library/inspect.rst:907 +#: ../../library/inspect.rst:789 ../../library/inspect.rst:925 msgid "The *globals*, *locals*, and *eval_str* parameters were added." msgstr "" -#: ../../library/inspect.rst:774 +#: ../../library/inspect.rst:792 msgid "The *annotation_format* parameter was added." msgstr "" -#: ../../library/inspect.rst:779 +#: ../../library/inspect.rst:797 msgid "" "Some callables may not be introspectable in certain implementations of " "Python. For example, in CPython, some built-in functions defined in C " "provide no metadata about their arguments." msgstr "" -#: ../../library/inspect.rst:785 +#: ../../library/inspect.rst:803 msgid "" "If the passed object has a :attr:`!__signature__` attribute, we may use it " "to create the signature. The exact semantics are an implementation detail " @@ -1176,14 +1203,14 @@ msgid "" "semantics." msgstr "" -#: ../../library/inspect.rst:793 +#: ../../library/inspect.rst:811 msgid "" "A :class:`!Signature` object represents the call signature of a function and " "its return annotation. For each parameter accepted by the function it " "stores a :class:`Parameter` object in its :attr:`parameters` collection." msgstr "" -#: ../../library/inspect.rst:798 +#: ../../library/inspect.rst:816 msgid "" "The optional *parameters* argument is a sequence of :class:`Parameter` " "objects, which is validated to check that there are no parameters with " @@ -1192,54 +1219,54 @@ msgid "" "defaults follow parameters without defaults." msgstr "" -#: ../../library/inspect.rst:804 +#: ../../library/inspect.rst:822 msgid "" "The optional *return_annotation* argument can be an arbitrary Python object. " "It represents the \"return\" annotation of the callable." msgstr "" -#: ../../library/inspect.rst:807 +#: ../../library/inspect.rst:825 msgid "" ":class:`!Signature` objects are *immutable*. Use :meth:`Signature.replace` " "or :func:`copy.replace` to make a modified copy." msgstr "" -#: ../../library/inspect.rst:810 +#: ../../library/inspect.rst:828 msgid ":class:`!Signature` objects are now picklable and :term:`hashable`." msgstr "" -#: ../../library/inspect.rst:815 +#: ../../library/inspect.rst:833 msgid "A special class-level marker to specify absence of a return annotation." msgstr "" -#: ../../library/inspect.rst:819 +#: ../../library/inspect.rst:837 msgid "" "An ordered mapping of parameters' names to the corresponding :class:" "`Parameter` objects. Parameters appear in strict definition order, " "including keyword-only parameters." msgstr "" -#: ../../library/inspect.rst:823 ../../library/inspect.rst:1187 +#: ../../library/inspect.rst:841 ../../library/inspect.rst:1205 msgid "" "Python only explicitly guaranteed that it preserved the declaration order of " "keyword-only parameters as of version 3.7, although in practice this order " "had always been preserved in Python 3." msgstr "" -#: ../../library/inspect.rst:830 +#: ../../library/inspect.rst:848 msgid "" "The \"return\" annotation for the callable. If the callable has no " "\"return\" annotation, this attribute is set to :attr:`Signature.empty`." msgstr "" -#: ../../library/inspect.rst:835 +#: ../../library/inspect.rst:853 msgid "" "Create a mapping from positional and keyword arguments to parameters. " "Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the " "signature, or raises a :exc:`TypeError`." msgstr "" -#: ../../library/inspect.rst:841 +#: ../../library/inspect.rst:859 msgid "" "Works the same way as :meth:`Signature.bind`, but allows the omission of " "some required arguments (mimics :func:`functools.partial` behavior.) " @@ -1247,7 +1274,7 @@ msgid "" "arguments do not match the signature." msgstr "" -#: ../../library/inspect.rst:848 +#: ../../library/inspect.rst:866 msgid "" "Create a new :class:`Signature` instance based on the instance :meth:" "`replace` was invoked on. It is possible to pass different *parameters* and/" @@ -1256,7 +1283,7 @@ msgid "" "Signature`, pass in :attr:`Signature.empty`." msgstr "" -#: ../../library/inspect.rst:856 +#: ../../library/inspect.rst:874 msgid "" ">>> def test(a, b):\n" "... pass\n" @@ -1274,24 +1301,24 @@ msgstr "" ">>> str(new_sig)\n" "\"(a, b) -> 'new return anno'\"" -#: ../../library/inspect.rst:866 +#: ../../library/inspect.rst:884 msgid "" ":class:`Signature` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: ../../library/inspect.rst:871 +#: ../../library/inspect.rst:889 msgid "Create a string representation of the :class:`Signature` object." msgstr "" -#: ../../library/inspect.rst:873 +#: ../../library/inspect.rst:891 msgid "" "If *max_width* is passed, the method will attempt to fit the signature into " "lines of at most *max_width* characters. If the signature is longer than " "*max_width*, all parameters will be on separate lines." msgstr "" -#: ../../library/inspect.rst:878 +#: ../../library/inspect.rst:896 msgid "" "If *quote_annotation_strings* is False, :term:`annotations ` in " "the signature are displayed without opening and closing quotation marks if " @@ -1300,21 +1327,21 @@ msgid "" "annotations`` was used." msgstr "" -#: ../../library/inspect.rst:886 +#: ../../library/inspect.rst:904 msgid "The *unquote_annotations* parameter was added." msgstr "" -#: ../../library/inspect.rst:891 +#: ../../library/inspect.rst:909 msgid "" "Return a :class:`Signature` (or its subclass) object for a given callable " "*obj*." msgstr "" -#: ../../library/inspect.rst:894 +#: ../../library/inspect.rst:912 msgid "This method simplifies subclassing of :class:`Signature`:" msgstr "" -#: ../../library/inspect.rst:896 +#: ../../library/inspect.rst:914 msgid "" "class MySignature(Signature):\n" " pass\n" @@ -1326,129 +1353,129 @@ msgstr "" "sig = MySignature.from_callable(sum)\n" "assert isinstance(sig, MySignature)" -#: ../../library/inspect.rst:903 +#: ../../library/inspect.rst:921 msgid "Its behavior is otherwise identical to that of :func:`signature`." msgstr "" -#: ../../library/inspect.rst:913 +#: ../../library/inspect.rst:931 msgid "" ":class:`!Parameter` objects are *immutable*. Instead of modifying a :class:`!" "Parameter` object, you can use :meth:`Parameter.replace` or :func:`copy." "replace` to create a modified copy." msgstr "" -#: ../../library/inspect.rst:917 +#: ../../library/inspect.rst:935 msgid "Parameter objects are now picklable and :term:`hashable`." msgstr "" -#: ../../library/inspect.rst:922 +#: ../../library/inspect.rst:940 msgid "" "A special class-level marker to specify absence of default values and " "annotations." msgstr "" -#: ../../library/inspect.rst:927 +#: ../../library/inspect.rst:945 msgid "" "The name of the parameter as a string. The name must be a valid Python " "identifier." msgstr "" -#: ../../library/inspect.rst:932 +#: ../../library/inspect.rst:950 msgid "" "CPython generates implicit parameter names of the form ``.0`` on the code " "objects used to implement comprehensions and generator expressions." msgstr "" -#: ../../library/inspect.rst:936 +#: ../../library/inspect.rst:954 msgid "" "These parameter names are now exposed by this module as names like " "``implicit0``." msgstr "" -#: ../../library/inspect.rst:942 +#: ../../library/inspect.rst:960 msgid "" "The default value for the parameter. If the parameter has no default value, " "this attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:947 +#: ../../library/inspect.rst:965 msgid "" "The annotation for the parameter. If the parameter has no annotation, this " "attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:952 +#: ../../library/inspect.rst:970 msgid "" "Describes how argument values are bound to the parameter. The possible " "values are accessible via :class:`Parameter` (like ``Parameter." "KEYWORD_ONLY``), and support comparison and ordering, in the following order:" msgstr "" -#: ../../library/inspect.rst:959 +#: ../../library/inspect.rst:977 msgid "Name" msgstr "名稱" -#: ../../library/inspect.rst:959 +#: ../../library/inspect.rst:977 msgid "Meaning" msgstr "意義" -#: ../../library/inspect.rst:961 +#: ../../library/inspect.rst:979 msgid "*POSITIONAL_ONLY*" msgstr "*POSITIONAL_ONLY*" -#: ../../library/inspect.rst:961 +#: ../../library/inspect.rst:979 msgid "" "Value must be supplied as a positional argument. Positional only parameters " "are those which appear before a ``/`` entry (if present) in a Python " "function definition." msgstr "" -#: ../../library/inspect.rst:966 +#: ../../library/inspect.rst:984 msgid "*POSITIONAL_OR_KEYWORD*" msgstr "*POSITIONAL_OR_KEYWORD*" -#: ../../library/inspect.rst:966 +#: ../../library/inspect.rst:984 msgid "" "Value may be supplied as either a keyword or positional argument (this is " "the standard binding behaviour for functions implemented in Python.)" msgstr "" -#: ../../library/inspect.rst:971 +#: ../../library/inspect.rst:989 msgid "*VAR_POSITIONAL*" msgstr "*VAR_POSITIONAL*" -#: ../../library/inspect.rst:971 +#: ../../library/inspect.rst:989 msgid "" "A tuple of positional arguments that aren't bound to any other parameter. " "This corresponds to a ``*args`` parameter in a Python function definition." msgstr "" -#: ../../library/inspect.rst:976 +#: ../../library/inspect.rst:994 msgid "*KEYWORD_ONLY*" msgstr "*KEYWORD_ONLY*" -#: ../../library/inspect.rst:976 +#: ../../library/inspect.rst:994 msgid "" "Value must be supplied as a keyword argument. Keyword only parameters are " "those which appear after a ``*`` or ``*args`` entry in a Python function " "definition." msgstr "" -#: ../../library/inspect.rst:981 +#: ../../library/inspect.rst:999 msgid "*VAR_KEYWORD*" msgstr "*VAR_KEYWORD*" -#: ../../library/inspect.rst:981 +#: ../../library/inspect.rst:999 msgid "" "A dict of keyword arguments that aren't bound to any other parameter. This " "corresponds to a ``**kwargs`` parameter in a Python function definition." msgstr "" -#: ../../library/inspect.rst:987 +#: ../../library/inspect.rst:1005 msgid "Example: print all keyword-only arguments without default values:" msgstr "" -#: ../../library/inspect.rst:989 +#: ../../library/inspect.rst:1007 msgid "" ">>> def foo(a, b, *, c, d=10):\n" "... pass\n" @@ -1470,15 +1497,15 @@ msgstr "" "... print('Parameter:', param)\n" "Parameter: c" -#: ../../library/inspect.rst:1003 +#: ../../library/inspect.rst:1021 msgid "Describes an enum value of :attr:`Parameter.kind`." msgstr "" -#: ../../library/inspect.rst:1007 +#: ../../library/inspect.rst:1025 msgid "Example: print all descriptions of arguments:" msgstr "範例:列印所有引數的描述:" -#: ../../library/inspect.rst:1009 +#: ../../library/inspect.rst:1027 msgid "" ">>> def foo(a, b, *, c, d=10):\n" "... pass\n" @@ -1502,7 +1529,7 @@ msgstr "" "keyword-only\n" "keyword-only" -#: ../../library/inspect.rst:1024 +#: ../../library/inspect.rst:1042 msgid "" "Create a new :class:`Parameter` instance based on the instance replaced was " "invoked on. To override a :class:`!Parameter` attribute, pass the " @@ -1510,7 +1537,7 @@ msgid "" "a :class:`!Parameter`, pass :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:1029 +#: ../../library/inspect.rst:1047 msgid "" ">>> from inspect import Parameter\n" ">>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)\n" @@ -1534,83 +1561,83 @@ msgstr "" ">>> str(param.replace(default=Parameter.empty, annotation='spam'))\n" "\"foo: 'spam'\"" -#: ../../library/inspect.rst:1042 +#: ../../library/inspect.rst:1060 msgid "" ":class:`Parameter` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: ../../library/inspect.rst:1045 +#: ../../library/inspect.rst:1063 msgid "" "In Python 3.3 :class:`Parameter` objects were allowed to have ``name`` set " "to ``None`` if their ``kind`` was set to ``POSITIONAL_ONLY``. This is no " "longer permitted." msgstr "" -#: ../../library/inspect.rst:1052 +#: ../../library/inspect.rst:1070 msgid "" "Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call. " "Holds the mapping of arguments to the function's parameters." msgstr "" -#: ../../library/inspect.rst:1057 +#: ../../library/inspect.rst:1075 msgid "" "A mutable mapping of parameters' names to arguments' values. Contains only " "explicitly bound arguments. Changes in :attr:`arguments` will reflect in :" "attr:`args` and :attr:`kwargs`." msgstr "" -#: ../../library/inspect.rst:1061 +#: ../../library/inspect.rst:1079 msgid "" "Should be used in conjunction with :attr:`Signature.parameters` for any " "argument processing purposes." msgstr "" -#: ../../library/inspect.rst:1066 +#: ../../library/inspect.rst:1084 msgid "" "Arguments for which :meth:`Signature.bind` or :meth:`Signature.bind_partial` " "relied on a default value are skipped. However, if needed, use :meth:" "`BoundArguments.apply_defaults` to add them." msgstr "" -#: ../../library/inspect.rst:1071 +#: ../../library/inspect.rst:1089 msgid "" ":attr:`arguments` is now of type :class:`dict`. Formerly, it was of type :" "class:`collections.OrderedDict`." msgstr "" -#: ../../library/inspect.rst:1077 +#: ../../library/inspect.rst:1095 msgid "" "A tuple of positional arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: ../../library/inspect.rst:1082 +#: ../../library/inspect.rst:1100 msgid "" "A dict of keyword arguments values. Dynamically computed from the :attr:" "`arguments` attribute. Arguments that can be passed positionally are " "included in :attr:`args` instead." msgstr "" -#: ../../library/inspect.rst:1088 +#: ../../library/inspect.rst:1106 msgid "A reference to the parent :class:`Signature` object." msgstr "" -#: ../../library/inspect.rst:1092 +#: ../../library/inspect.rst:1110 msgid "Set default values for missing arguments." msgstr "為遺漏的引數設定預設值。" -#: ../../library/inspect.rst:1094 +#: ../../library/inspect.rst:1112 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" -#: ../../library/inspect.rst:1097 +#: ../../library/inspect.rst:1115 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" -#: ../../library/inspect.rst:1100 +#: ../../library/inspect.rst:1118 msgid "" ">>> def foo(a, b='ham', *args): pass\n" ">>> ba = inspect.signature(foo).bind('spam')\n" @@ -1624,13 +1651,13 @@ msgstr "" ">>> ba.arguments\n" "{'a': 'spam', 'b': 'ham', 'args': ()}" -#: ../../library/inspect.rst:1110 +#: ../../library/inspect.rst:1128 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions:" msgstr "" -#: ../../library/inspect.rst:1113 +#: ../../library/inspect.rst:1131 msgid "" "def test(a, *, b):\n" " ...\n" @@ -1646,19 +1673,19 @@ msgstr "" "ba = sig.bind(10, b=20)\n" "test(*ba.args, **ba.kwargs)" -#: ../../library/inspect.rst:1125 +#: ../../library/inspect.rst:1143 msgid ":pep:`362` - Function Signature Object." msgstr ":pep:`362` - 函式簽名物件。" -#: ../../library/inspect.rst:1126 +#: ../../library/inspect.rst:1144 msgid "The detailed specification, implementation details and examples." msgstr "詳細的規格、實作細節和範例。" -#: ../../library/inspect.rst:1132 +#: ../../library/inspect.rst:1150 msgid "Classes and functions" msgstr "類別與函式" -#: ../../library/inspect.rst:1136 +#: ../../library/inspect.rst:1154 msgid "" "Arrange the given list of classes into a hierarchy of nested lists. Where a " "nested list appears, it contains classes derived from the class whose entry " @@ -1669,13 +1696,13 @@ msgid "" "will appear multiple times." msgstr "" -#: ../../library/inspect.rst:1147 +#: ../../library/inspect.rst:1165 msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" -#: ../../library/inspect.rst:1150 +#: ../../library/inspect.rst:1168 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" @@ -1683,7 +1710,7 @@ msgstr "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" -#: ../../library/inspect.rst:1153 +#: ../../library/inspect.rst:1171 msgid "" "*args* is a list of the positional parameter names. *varargs* is the name of " "the ``*`` parameter or ``None`` if arbitrary positional arguments are not " @@ -1698,7 +1725,7 @@ msgid "" "report the function return value annotation (if any)." msgstr "" -#: ../../library/inspect.rst:1168 +#: ../../library/inspect.rst:1186 msgid "" "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support " @@ -1708,14 +1735,14 @@ msgid "" "``inspect`` module API." msgstr "" -#: ../../library/inspect.rst:1175 +#: ../../library/inspect.rst:1193 msgid "" "This function is now based on :func:`signature`, but still ignores " "``__wrapped__`` attributes and includes the already bound first parameter in " "the signature output for bound methods." msgstr "" -#: ../../library/inspect.rst:1180 +#: ../../library/inspect.rst:1198 msgid "" "This method was previously documented as deprecated in favour of :func:" "`signature` in Python 3.5, but that decision has been reversed in order to " @@ -1723,7 +1750,7 @@ msgid "" "code migrating away from the legacy :func:`!getargspec` API." msgstr "" -#: ../../library/inspect.rst:1195 +#: ../../library/inspect.rst:1213 msgid "" "Get information about arguments passed into a particular frame. A :term:" "`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is returned. " @@ -1732,18 +1759,18 @@ msgid "" "dictionary of the given frame." msgstr "" -#: ../../library/inspect.rst:1202 ../../library/inspect.rst:1212 +#: ../../library/inspect.rst:1220 ../../library/inspect.rst:1230 msgid "This function was inadvertently marked as deprecated in Python 3.5." msgstr "" -#: ../../library/inspect.rst:1207 +#: ../../library/inspect.rst:1225 msgid "" "Format a pretty argument spec from the four values returned by :func:" "`getargvalues`. The format\\* arguments are the corresponding optional " "formatting functions that are called to turn names and values into strings." msgstr "" -#: ../../library/inspect.rst:1217 +#: ../../library/inspect.rst:1235 msgid "" "Return a tuple of class cls's base classes, including cls, in method " "resolution order. No class appears more than once in this tuple. Note that " @@ -1751,7 +1778,7 @@ msgid "" "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" -#: ../../library/inspect.rst:1225 +#: ../../library/inspect.rst:1243 msgid "" "Bind the *args* and *kwds* to the argument names of the Python function or " "method *func*, as if it was called with them. For bound methods, bind also " @@ -1764,7 +1791,7 @@ msgid "" "example:" msgstr "" -#: ../../library/inspect.rst:1234 +#: ../../library/inspect.rst:1252 msgid "" ">>> from inspect import getcallargs\n" ">>> def f(a, b=1, *pos, **named):\n" @@ -1794,11 +1821,11 @@ msgstr "" "...\n" "TypeError: f() missing 1 required positional argument: 'a'" -#: ../../library/inspect.rst:1251 +#: ../../library/inspect.rst:1269 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "請改用 :meth:`Signature.bind` 與 :meth:`Signature.bind_partial`。" -#: ../../library/inspect.rst:1257 +#: ../../library/inspect.rst:1275 msgid "" "Get the mapping of external name references in a Python function or method " "*func* to their current values. A :term:`named tuple` " @@ -1810,18 +1837,18 @@ msgid "" "builtins." msgstr "" -#: ../../library/inspect.rst:1266 +#: ../../library/inspect.rst:1284 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "如果 *func* 不是 Python 函式或方法,則引發 :exc:`TypeError`。" -#: ../../library/inspect.rst:1273 +#: ../../library/inspect.rst:1291 msgid "" "Get the object wrapped by *func*. It follows the chain of :attr:" "`__wrapped__` attributes returning the last object in the chain." msgstr "" -#: ../../library/inspect.rst:1276 +#: ../../library/inspect.rst:1294 msgid "" "*stop* is an optional callback accepting an object in the wrapper chain as " "its sole argument that allows the unwrapping to be terminated early if the " @@ -1831,37 +1858,37 @@ msgid "" "``__signature__`` attribute defined." msgstr "" -#: ../../library/inspect.rst:1283 +#: ../../library/inspect.rst:1301 msgid ":exc:`ValueError` is raised if a cycle is encountered." msgstr "如果遇到循環,則引發 :exc:`ValueError`。" -#: ../../library/inspect.rst:1290 +#: ../../library/inspect.rst:1308 msgid "Compute the annotations dict for an object." msgstr "" -#: ../../library/inspect.rst:1292 +#: ../../library/inspect.rst:1310 msgid "" "This is an alias for :func:`annotationlib.get_annotations`; see the " "documentation of that function for more information." msgstr "" -#: ../../library/inspect.rst:1297 +#: ../../library/inspect.rst:1315 msgid "" "This function may execute arbitrary code contained in annotations. See :ref:" "`annotationlib-security` for more information." msgstr "" -#: ../../library/inspect.rst:1302 +#: ../../library/inspect.rst:1320 msgid "" "This function is now an alias for :func:`annotationlib.get_annotations`. " "Calling it as ``inspect.get_annotations`` will continue to work." msgstr "" -#: ../../library/inspect.rst:1310 +#: ../../library/inspect.rst:1328 msgid "The interpreter stack" msgstr "直譯器堆疊" -#: ../../library/inspect.rst:1312 +#: ../../library/inspect.rst:1330 msgid "" "Some of the following functions return :class:`FrameInfo` objects. For " "backwards compatibility these objects allow tuple-like operations on all " @@ -1869,95 +1896,95 @@ msgid "" "may be removed in the future." msgstr "" -#: ../../library/inspect.rst:1321 +#: ../../library/inspect.rst:1339 msgid "The :ref:`frame object ` that the record corresponds to." msgstr "" -#: ../../library/inspect.rst:1325 +#: ../../library/inspect.rst:1343 msgid "" "The file name associated with the code being executed by the frame this " "record corresponds to." msgstr "" -#: ../../library/inspect.rst:1330 +#: ../../library/inspect.rst:1348 msgid "" "The line number of the current line associated with the code being executed " "by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1335 +#: ../../library/inspect.rst:1353 msgid "" "The function name that is being executed by the frame this record " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1339 +#: ../../library/inspect.rst:1357 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1344 ../../library/inspect.rst:1383 +#: ../../library/inspect.rst:1362 ../../library/inspect.rst:1401 msgid "" "The index of the current line being executed in the :attr:`code_context` " "list." msgstr "" -#: ../../library/inspect.rst:1348 +#: ../../library/inspect.rst:1366 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1352 +#: ../../library/inspect.rst:1370 msgid "Return a :term:`named tuple` instead of a :class:`tuple`." msgstr "" -#: ../../library/inspect.rst:1355 +#: ../../library/inspect.rst:1373 msgid "" ":class:`!FrameInfo` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../library/inspect.rst:1364 +#: ../../library/inspect.rst:1382 msgid "" "The file name associated with the code being executed by the frame this " "traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1369 +#: ../../library/inspect.rst:1387 msgid "" "The line number of the current line associated with the code being executed " "by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1374 +#: ../../library/inspect.rst:1392 msgid "" "The function name that is being executed by the frame this traceback " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1378 +#: ../../library/inspect.rst:1396 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1387 +#: ../../library/inspect.rst:1405 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1392 +#: ../../library/inspect.rst:1410 msgid "" ":class:`!Traceback` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../library/inspect.rst:1399 +#: ../../library/inspect.rst:1417 msgid "" "Keeping references to frame objects, as found in the first element of the " "frame records these functions return, can cause your program to create " @@ -1969,7 +1996,7 @@ msgid "" "consumption which occurs." msgstr "" -#: ../../library/inspect.rst:1407 +#: ../../library/inspect.rst:1425 msgid "" "Though the cycle detector will catch these, destruction of the frames (and " "local variables) can be made deterministic by removing the cycle in a :" @@ -1977,7 +2004,7 @@ msgid "" "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" -#: ../../library/inspect.rst:1412 +#: ../../library/inspect.rst:1430 msgid "" "def handle_stackframe_without_leak():\n" " frame = inspect.currentframe()\n" @@ -1987,31 +2014,31 @@ msgid "" " del frame" msgstr "" -#: ../../library/inspect.rst:1419 +#: ../../library/inspect.rst:1437 msgid "" "If you want to keep the frame around (for example to print a traceback " "later), you can also break reference cycles by using the :meth:`frame.clear` " "method." msgstr "" -#: ../../library/inspect.rst:1423 +#: ../../library/inspect.rst:1441 msgid "" "The optional *context* argument supported by most of these functions " "specifies the number of lines of context to return, which are centered " "around the current line." msgstr "" -#: ../../library/inspect.rst:1430 +#: ../../library/inspect.rst:1448 msgid "" "Get information about a frame or traceback object. A :class:`Traceback` " "object is returned." msgstr "" -#: ../../library/inspect.rst:1433 +#: ../../library/inspect.rst:1451 msgid "A :class:`Traceback` object is returned instead of a named tuple." msgstr "" -#: ../../library/inspect.rst:1438 +#: ../../library/inspect.rst:1456 msgid "" "Get a list of :class:`FrameInfo` objects for a frame and all outer frames. " "These frames represent the calls that lead to the creation of *frame*. The " @@ -2019,19 +2046,19 @@ msgid "" "represents the outermost call on *frame*'s stack." msgstr "" -#: ../../library/inspect.rst:1443 ../../library/inspect.rst:1458 -#: ../../library/inspect.rst:1484 ../../library/inspect.rst:1499 +#: ../../library/inspect.rst:1461 ../../library/inspect.rst:1476 +#: ../../library/inspect.rst:1502 ../../library/inspect.rst:1517 msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" -#: ../../library/inspect.rst:1448 ../../library/inspect.rst:1463 -#: ../../library/inspect.rst:1489 ../../library/inspect.rst:1504 +#: ../../library/inspect.rst:1466 ../../library/inspect.rst:1481 +#: ../../library/inspect.rst:1507 ../../library/inspect.rst:1522 msgid "A list of :class:`FrameInfo` objects is returned." msgstr "回傳一個 :class:`FrameInfo` 物件串列。" -#: ../../library/inspect.rst:1453 +#: ../../library/inspect.rst:1471 msgid "" "Get a list of :class:`FrameInfo` objects for a traceback's frame and all " "inner frames. These frames represent calls made as a consequence of " @@ -2039,11 +2066,11 @@ msgid "" "represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1468 +#: ../../library/inspect.rst:1486 msgid "Return the frame object for the caller's stack frame." msgstr "" -#: ../../library/inspect.rst:1472 +#: ../../library/inspect.rst:1490 msgid "" "This function relies on Python stack frame support in the interpreter, which " "isn't guaranteed to exist in all implementations of Python. If running in " @@ -2051,14 +2078,14 @@ msgid "" "``None``." msgstr "" -#: ../../library/inspect.rst:1480 +#: ../../library/inspect.rst:1498 msgid "" "Return a list of :class:`FrameInfo` objects for the caller's stack. The " "first entry in the returned list represents the caller; the last entry " "represents the outermost call on the stack." msgstr "" -#: ../../library/inspect.rst:1494 +#: ../../library/inspect.rst:1512 msgid "" "Return a list of :class:`FrameInfo` objects for the stack between the " "current frame and the frame in which an exception currently being handled " @@ -2066,11 +2093,11 @@ msgid "" "entry represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1508 +#: ../../library/inspect.rst:1526 msgid "Fetching attributes statically" msgstr "" -#: ../../library/inspect.rst:1510 +#: ../../library/inspect.rst:1528 msgid "" "Both :func:`getattr` and :func:`hasattr` can trigger code execution when " "fetching or checking for the existence of attributes. Descriptors, like " @@ -2078,20 +2105,20 @@ msgid "" "`~object.__getattribute__` may be called." msgstr "" -#: ../../library/inspect.rst:1516 +#: ../../library/inspect.rst:1534 msgid "" "For cases where you want passive introspection, like documentation tools, " "this can be inconvenient. :func:`getattr_static` has the same signature as :" "func:`getattr` but avoids executing code when it fetches attributes." msgstr "" -#: ../../library/inspect.rst:1522 +#: ../../library/inspect.rst:1540 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`." msgstr "" -#: ../../library/inspect.rst:1526 +#: ../../library/inspect.rst:1544 msgid "" "Note: this function may not be able to retrieve all attributes that getattr " "can fetch (like dynamically created attributes) and may find attributes that " @@ -2099,27 +2126,27 @@ msgid "" "return descriptors objects instead of instance members." msgstr "" -#: ../../library/inspect.rst:1532 +#: ../../library/inspect.rst:1550 msgid "" "If the instance :attr:`~object.__dict__` is shadowed by another member (for " "example a property) then this function will be unable to find instance " "members." msgstr "" -#: ../../library/inspect.rst:1538 +#: ../../library/inspect.rst:1556 msgid "" ":func:`getattr_static` does not resolve descriptors, for example slot " "descriptors or getset descriptors on objects implemented in C. The " "descriptor object is returned instead of the underlying attribute." msgstr "" -#: ../../library/inspect.rst:1542 +#: ../../library/inspect.rst:1560 msgid "" "You can handle these with code like the following. Note that for arbitrary " "getset descriptors invoking these may trigger code execution::" msgstr "" -#: ../../library/inspect.rst:1546 +#: ../../library/inspect.rst:1564 msgid "" "# example code for resolving the builtin descriptor types\n" "class _foo:\n" @@ -2142,11 +2169,11 @@ msgid "" " pass" msgstr "" -#: ../../library/inspect.rst:1568 +#: ../../library/inspect.rst:1586 msgid "Current State of Generators, Coroutines, and Asynchronous Generators" msgstr "" -#: ../../library/inspect.rst:1570 +#: ../../library/inspect.rst:1588 msgid "" "When implementing coroutine schedulers and for other advanced uses of " "generators, it is useful to determine whether a generator is currently " @@ -2155,32 +2182,32 @@ msgid "" "generator to be determined easily." msgstr "" -#: ../../library/inspect.rst:1578 +#: ../../library/inspect.rst:1596 msgid "Get current state of a generator-iterator." msgstr "" -#: ../../library/inspect.rst:1580 ../../library/inspect.rst:1596 -#: ../../library/inspect.rst:1613 +#: ../../library/inspect.rst:1598 ../../library/inspect.rst:1614 +#: ../../library/inspect.rst:1631 msgid "Possible states are:" msgstr "" -#: ../../library/inspect.rst:1582 +#: ../../library/inspect.rst:1600 msgid "GEN_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1583 +#: ../../library/inspect.rst:1601 msgid "GEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1584 +#: ../../library/inspect.rst:1602 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../library/inspect.rst:1585 +#: ../../library/inspect.rst:1603 msgid "GEN_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1591 +#: ../../library/inspect.rst:1609 msgid "" "Get current state of a coroutine object. The function is intended to be " "used with coroutine objects created by :keyword:`async def` functions, but " @@ -2188,23 +2215,23 @@ msgid "" "``cr_frame`` attributes." msgstr "" -#: ../../library/inspect.rst:1598 +#: ../../library/inspect.rst:1616 msgid "CORO_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1599 +#: ../../library/inspect.rst:1617 msgid "CORO_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1600 +#: ../../library/inspect.rst:1618 msgid "CORO_SUSPENDED: Currently suspended at an await expression." msgstr "" -#: ../../library/inspect.rst:1601 +#: ../../library/inspect.rst:1619 msgid "CORO_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1607 +#: ../../library/inspect.rst:1625 msgid "" "Get current state of an asynchronous generator object. The function is " "intended to be used with asynchronous iterator objects created by :keyword:" @@ -2213,30 +2240,30 @@ msgid "" "``ag_frame`` attributes." msgstr "" -#: ../../library/inspect.rst:1615 +#: ../../library/inspect.rst:1633 msgid "AGEN_CREATED: Waiting to start execution." msgstr "AGEN_CREATED: 等待開始執行。" -#: ../../library/inspect.rst:1616 +#: ../../library/inspect.rst:1634 msgid "AGEN_RUNNING: Currently being executed by the interpreter." msgstr "AGEN_RUNNING: 目前正在被直譯器執行。" -#: ../../library/inspect.rst:1617 +#: ../../library/inspect.rst:1635 msgid "AGEN_SUSPENDED: Currently suspended at a yield expression." msgstr "AGEN_SUSPENDED: 目前於 yield 運算式暫停。" -#: ../../library/inspect.rst:1618 +#: ../../library/inspect.rst:1636 msgid "AGEN_CLOSED: Execution has completed." msgstr "AGEN_CLOSED: 執行已完成。" -#: ../../library/inspect.rst:1622 +#: ../../library/inspect.rst:1640 msgid "" "The current internal state of the generator can also be queried. This is " "mostly useful for testing purposes, to ensure that internal state is being " "updated as expected:" msgstr "" -#: ../../library/inspect.rst:1628 +#: ../../library/inspect.rst:1646 msgid "" "Get the mapping of live local variables in *generator* to their current " "values. A dictionary is returned that maps from variable names to values. " @@ -2244,14 +2271,14 @@ msgid "" "generator, and all the same caveats apply." msgstr "" -#: ../../library/inspect.rst:1633 +#: ../../library/inspect.rst:1651 msgid "" "If *generator* is a :term:`generator` with no currently associated frame, " "then an empty dictionary is returned. :exc:`TypeError` is raised if " "*generator* is not a Python generator object." msgstr "" -#: ../../library/inspect.rst:1639 +#: ../../library/inspect.rst:1657 msgid "" "This function relies on the generator exposing a Python stack frame for " "introspection, which isn't guaranteed to be the case in all implementations " @@ -2259,90 +2286,90 @@ msgid "" "dictionary." msgstr "" -#: ../../library/inspect.rst:1648 +#: ../../library/inspect.rst:1666 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" -#: ../../library/inspect.rst:1655 +#: ../../library/inspect.rst:1673 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for asynchronous generator objects created by :keyword:`async def` functions " "which use the :keyword:`yield` statement." msgstr "" -#: ../../library/inspect.rst:1665 +#: ../../library/inspect.rst:1683 msgid "Code Objects Bit Flags" msgstr "" -#: ../../library/inspect.rst:1667 +#: ../../library/inspect.rst:1685 msgid "" "Python code objects have a :attr:`~codeobject.co_flags` attribute, which is " "a bitmap of the following flags:" msgstr "" -#: ../../library/inspect.rst:1672 +#: ../../library/inspect.rst:1690 msgid "The code object is optimized, using fast locals." msgstr "" -#: ../../library/inspect.rst:1676 +#: ../../library/inspect.rst:1694 msgid "" "If set, a new dict will be created for the frame's :attr:`~frame.f_locals` " "when the code object is executed." msgstr "" -#: ../../library/inspect.rst:1681 +#: ../../library/inspect.rst:1699 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" -#: ../../library/inspect.rst:1685 +#: ../../library/inspect.rst:1703 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" -#: ../../library/inspect.rst:1689 +#: ../../library/inspect.rst:1707 msgid "The flag is set when the code object is a nested function." msgstr "" -#: ../../library/inspect.rst:1693 +#: ../../library/inspect.rst:1711 msgid "" "The flag is set when the code object is a generator function, i.e. a " "generator object is returned when the code object is executed." msgstr "" -#: ../../library/inspect.rst:1698 +#: ../../library/inspect.rst:1716 msgid "" "The flag is set when the code object is a coroutine function. When the code " "object is executed it returns a coroutine object. See :pep:`492` for more " "details." msgstr "" -#: ../../library/inspect.rst:1706 +#: ../../library/inspect.rst:1724 msgid "" "The flag is used to transform generators into generator-based coroutines. " "Generator objects with this flag can be used in ``await`` expression, and " "can ``yield from`` coroutine objects. See :pep:`492` for more details." msgstr "" -#: ../../library/inspect.rst:1715 +#: ../../library/inspect.rst:1733 msgid "" "The flag is set when the code object is an asynchronous generator function. " "When the code object is executed it returns an asynchronous generator " "object. See :pep:`525` for more details." msgstr "" -#: ../../library/inspect.rst:1723 +#: ../../library/inspect.rst:1741 msgid "" "The flag is set when there is a docstring for the code object in the source " "code. If set, it will be the first item in :attr:`~codeobject.co_consts`." msgstr "" -#: ../../library/inspect.rst:1731 +#: ../../library/inspect.rst:1749 msgid "" "The flag is set when the code object is a function defined in class scope." msgstr "" -#: ../../library/inspect.rst:1737 +#: ../../library/inspect.rst:1755 msgid "" "The flags are specific to CPython, and may not be defined in other Python " "implementations. Furthermore, the flags are an implementation detail, and " @@ -2350,39 +2377,39 @@ msgid "" "use public APIs from the :mod:`inspect` module for any introspection needs." msgstr "" -#: ../../library/inspect.rst:1745 +#: ../../library/inspect.rst:1763 msgid "Buffer flags" msgstr "" -#: ../../library/inspect.rst:1749 +#: ../../library/inspect.rst:1767 msgid "" "This is an :class:`enum.IntFlag` that represents the flags that can be " "passed to the :meth:`~object.__buffer__` method of objects implementing the :" "ref:`buffer protocol `." msgstr "" -#: ../../library/inspect.rst:1753 +#: ../../library/inspect.rst:1771 msgid "The meaning of the flags is explained at :ref:`buffer-request-types`." msgstr "" -#: ../../library/inspect.rst:1780 +#: ../../library/inspect.rst:1798 msgid "Command-line interface" msgstr "命令列介面" -#: ../../library/inspect.rst:1782 +#: ../../library/inspect.rst:1800 msgid "" "The :mod:`inspect` module also provides a basic introspection capability " "from the command line." msgstr "" -#: ../../library/inspect.rst:1787 +#: ../../library/inspect.rst:1805 msgid "" "By default, accepts the name of a module and prints the source of that " "module. A class or function within the module can be printed instead by " "appended a colon and the qualified name of the target object." msgstr "" -#: ../../library/inspect.rst:1793 +#: ../../library/inspect.rst:1811 msgid "" "Print information about the specified object rather than the source code" msgstr "" diff --git a/library/zoneinfo.po b/library/zoneinfo.po index 0badcc92a7..e9f6f15c1c 100644 --- a/library/zoneinfo.po +++ b/library/zoneinfo.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-08 00:15+0000\n" +"POT-Creation-Date: 2025-12-29 00:16+0000\n" "PO-Revision-Date: 2025-06-21 20:00+0800\n" "Last-Translator: Dr-XYZ \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -413,7 +413,13 @@ msgid "" "Objects created via this constructor cannot be pickled (see `pickling`_)." msgstr "透過此建構函式建立的物件無法被封裝(參閱 `pickling`_)。" -#: ../../library/zoneinfo.rst:211 +#: ../../library/zoneinfo.rst:209 +msgid "" +":exc:`ValueError` is raised if the data read from *file_obj* is not a valid " +"TZif file." +msgstr "" + +#: ../../library/zoneinfo.rst:214 msgid "" "An alternate constructor that bypasses the constructor's cache. It is " "identical to the primary constructor, but returns a new object on each call. " @@ -425,13 +431,13 @@ msgstr "" "一個新物件。這對於測試或示範目的最可能有用,但它也可以用來建立一個具有不同快" "取失效策略的系統。" -#: ../../library/zoneinfo.rst:217 +#: ../../library/zoneinfo.rst:220 msgid "" "Objects created via this constructor will also bypass the cache of a " "deserializing process when unpickled." msgstr "透過此建構函式建立的物件,在拆封時也會繞過去序列化過程的快取。" -#: ../../library/zoneinfo.rst:224 +#: ../../library/zoneinfo.rst:227 msgid "" "Using this constructor may change the semantics of your datetimes in " "surprising ways, only use it if you know that you need to." @@ -439,11 +445,11 @@ msgstr "" "使用此建構函式可能會以意想不到的方式改變你的 datetime 物件的語意,只有在你確" "定需要時才使用它。" -#: ../../library/zoneinfo.rst:227 +#: ../../library/zoneinfo.rst:230 msgid "The following class methods are also available:" msgstr "以下類別方法也可用:" -#: ../../library/zoneinfo.rst:231 +#: ../../library/zoneinfo.rst:234 msgid "" "A method for invalidating the cache on the ``ZoneInfo`` class. If no " "arguments are passed, all caches are invalidated and the next call to the " @@ -452,7 +458,7 @@ msgstr "" "一個用於使 ``ZoneInfo`` 類別上的快取失效的方法。如果沒有傳入引數,所有快取都" "會失效,且下一次對每個鍵的主要建構函式呼叫都將回傳一個新的實例。" -#: ../../library/zoneinfo.rst:235 +#: ../../library/zoneinfo.rst:238 msgid "" "If an iterable of key names is passed to the ``only_keys`` parameter, only " "the specified keys will be removed from the cache. Keys passed to " @@ -461,7 +467,7 @@ msgstr "" "如果將一個包含鍵名的可疊代物件傳遞給 ``only_keys`` 參數,則只有指定的鍵會從快" "取中移除。傳遞給 ``only_keys`` 但在快取中找不到的鍵會被忽略。" -#: ../../library/zoneinfo.rst:243 +#: ../../library/zoneinfo.rst:246 msgid "" "Invoking this function may change the semantics of datetimes using " "``ZoneInfo`` in surprising ways; this modifies module state and thus may " @@ -470,11 +476,11 @@ msgstr "" "呼叫此函式可能會以意想不到的方式改變使用 ``ZoneInfo`` 的 datetime 物件的語" "意;這會修改模組狀態,因此可能產生廣泛的影響。只有在你確定需要時才使用它。" -#: ../../library/zoneinfo.rst:248 +#: ../../library/zoneinfo.rst:251 msgid "The class has one attribute:" msgstr "該類別有一個屬性:" -#: ../../library/zoneinfo.rst:252 +#: ../../library/zoneinfo.rst:255 msgid "" "This is a read-only :term:`attribute` that returns the value of ``key`` " "passed to the constructor, which should be a lookup key in the IANA time " @@ -485,13 +491,13 @@ msgstr "" "值應為 IANA 時區資料庫中的查詢鍵(例如 ``America/New_York``、``Europe/" "Paris`` 或 ``Asia/Tokyo``)。" -#: ../../library/zoneinfo.rst:257 +#: ../../library/zoneinfo.rst:260 msgid "" "For zones constructed from file without specifying a ``key`` parameter, this " "will be set to ``None``." msgstr "對於從檔案建構且未指定 ``key`` 參數的時區,此屬性將被設定為 ``None``。" -#: ../../library/zoneinfo.rst:262 +#: ../../library/zoneinfo.rst:265 msgid "" "Although it is a somewhat common practice to expose these to end users, " "these values are designed to be primary keys for representing the relevant " @@ -503,11 +509,11 @@ msgstr "" "區的主鍵,而不一定是面向使用者的元素。像 CLDR(Unicode 通用地區資料儲存庫)這" "樣的專案可以用來從這些鍵中取得更友善的使用者字串。" -#: ../../library/zoneinfo.rst:269 +#: ../../library/zoneinfo.rst:272 msgid "String representations" msgstr "字串表示" -#: ../../library/zoneinfo.rst:271 +#: ../../library/zoneinfo.rst:274 msgid "" "The string representation returned when calling :py:class:`str` on a :class:" "`ZoneInfo` object defaults to using the :attr:`ZoneInfo.key` attribute (see " @@ -516,7 +522,7 @@ msgstr "" "在 :class:`ZoneInfo` 物件上呼叫 :py:class:`str` 時回傳的字串表示,預設使用 :" "attr:`ZoneInfo.key` 屬性(參閱屬性文件中的使用說明): ::" -#: ../../library/zoneinfo.rst:275 +#: ../../library/zoneinfo.rst:278 msgid "" ">>> zone = ZoneInfo(\"Pacific/Kwajalein\")\n" ">>> str(zone)\n" @@ -534,7 +540,7 @@ msgstr "" ">>> f\"{dt.isoformat()} [{dt.tzinfo}]\"\n" "'2020-04-01T03:15:00+12:00 [Pacific/Kwajalein]'" -#: ../../library/zoneinfo.rst:283 +#: ../../library/zoneinfo.rst:286 msgid "" "For objects constructed from a file without specifying a ``key`` parameter, " "``str`` falls back to calling :func:`repr`. ``ZoneInfo``'s ``repr`` is " @@ -545,11 +551,11 @@ msgstr "" "``ZoneInfo`` 的 ``repr`` 是實作定義的,且不保證在不同版本之間保持穩定,但保證" "它不會是一個有效的 ``ZoneInfo`` 鍵。" -#: ../../library/zoneinfo.rst:291 +#: ../../library/zoneinfo.rst:294 msgid "Pickle serialization" msgstr "封裝(Pickle)序列化" -#: ../../library/zoneinfo.rst:293 +#: ../../library/zoneinfo.rst:296 msgid "" "Rather than serializing all transition data, ``ZoneInfo`` objects are " "serialized by key, and ``ZoneInfo`` objects constructed from files (even " @@ -558,11 +564,11 @@ msgstr "" "``ZoneInfo`` 物件不是序列化所有轉換資料,而是按鍵進行序列化,而從檔案建構的 " "``ZoneInfo`` 物件(即使是那些指定了 ``key`` 值的物件)也無法被封裝。" -#: ../../library/zoneinfo.rst:297 +#: ../../library/zoneinfo.rst:300 msgid "The behavior of a ``ZoneInfo`` file depends on how it was constructed:" msgstr "``ZoneInfo`` 檔案的行為取決於它的建構方式:" -#: ../../library/zoneinfo.rst:299 +#: ../../library/zoneinfo.rst:302 msgid "" "``ZoneInfo(key)``: When constructed with the primary constructor, a " "``ZoneInfo`` object is serialized by key, and when deserialized, the " @@ -572,11 +578,11 @@ msgid "" "``ZoneInfo(\"Europe/Berlin\")``, one would expect the following behavior:" msgstr "" "``ZoneInfo(key)``:當使用主要建構函式建構時,``ZoneInfo`` 物件會按鍵序列化," -"而在去序列化時,去序列化過程會使用主要建構函式,因此這些物件會與指向相同" -"時區的其他參照是同一個物件。例如,如果 ``europe_berlin_pkl`` 是一個包含從 " +"而在去序列化時,去序列化過程會使用主要建構函式,因此這些物件會與指向相同時區" +"的其他參照是同一個物件。例如,如果 ``europe_berlin_pkl`` 是一個包含從 " "``ZoneInfo(\"Europe/Berlin\")`` 建構並封裝的字串,會預期以下行為:" -#: ../../library/zoneinfo.rst:307 +#: ../../library/zoneinfo.rst:310 msgid "" ">>> a = ZoneInfo(\"Europe/Berlin\")\n" ">>> b = pickle.loads(europe_berlin_pkl)\n" @@ -588,7 +594,7 @@ msgstr "" ">>> a is b\n" "True" -#: ../../library/zoneinfo.rst:314 +#: ../../library/zoneinfo.rst:317 msgid "" "``ZoneInfo.no_cache(key)``: When constructed from the cache-bypassing " "constructor, the ``ZoneInfo`` object is also serialized by key, but when " @@ -602,7 +608,7 @@ msgstr "" "``europe_berlin_pkl_nc`` 是一個包含從 ``ZoneInfo.no_cache(\"Europe/" "Berlin\")`` 建構並封裝的字串,會預期以下行為:" -#: ../../library/zoneinfo.rst:321 +#: ../../library/zoneinfo.rst:324 msgid "" ">>> a = ZoneInfo(\"Europe/Berlin\")\n" ">>> b = pickle.loads(europe_berlin_pkl_nc)\n" @@ -614,7 +620,7 @@ msgstr "" ">>> a is b\n" "False" -#: ../../library/zoneinfo.rst:328 +#: ../../library/zoneinfo.rst:331 msgid "" "``ZoneInfo.from_file(file_obj, /, key=None)``: When constructed from a file, " "the ``ZoneInfo`` object raises an exception on pickling. If an end user " @@ -628,7 +634,7 @@ msgstr "" "建議他們使用包裝器型別或自訂序列化函式:可以按鍵序列化,或儲存檔案物件的內容" "並將其序列化。" -#: ../../library/zoneinfo.rst:334 +#: ../../library/zoneinfo.rst:337 msgid "" "This method of serialization requires that the time zone data for the " "required key be available on both the serializing and deserializing side, " @@ -642,11 +648,11 @@ msgstr "" "函式的參照預期存在於序列化和去序列化環境中的方式相似。這也意味著,當在具有不" "同版本時區資料的環境中拆封一個封裝的 ``ZoneInfo`` 時,不保證結果的一致性。" -#: ../../library/zoneinfo.rst:342 +#: ../../library/zoneinfo.rst:345 msgid "Functions" msgstr "函式" -#: ../../library/zoneinfo.rst:346 +#: ../../library/zoneinfo.rst:349 msgid "" "Get a set containing all the valid keys for IANA time zones available " "anywhere on the time zone path. This is recalculated on every call to the " @@ -655,7 +661,7 @@ msgstr "" "取得一個集合,其中包含時區路徑上任何地方可用的所有 IANA 時區的有效鍵。這會在" "每次呼叫函式時重新計算。" -#: ../../library/zoneinfo.rst:350 +#: ../../library/zoneinfo.rst:353 msgid "" "This function only includes canonical zone names and does not include " "\"special\" zones such as those under the ``posix/`` and ``right/`` " @@ -664,7 +670,7 @@ msgstr "" "此函式僅包含規範的時區名稱,不包含「特殊」時區,例如 ``posix/`` 和 ``right/" "`` 目錄下的時區,或 ``posixrules`` 時區。" -#: ../../library/zoneinfo.rst:356 +#: ../../library/zoneinfo.rst:359 msgid "" "This function may open a large number of files, as the best way to determine " "if a file on the time zone path is a valid time zone is to read the \"magic " @@ -673,7 +679,7 @@ msgstr "" "此函式可能會開啟大量檔案,因為確定時區路徑上的檔案是否為有效時區的最佳方法是" "讀取開頭的「魔術字串」。" -#: ../../library/zoneinfo.rst:362 +#: ../../library/zoneinfo.rst:365 msgid "" "These values are not designed to be exposed to end-users; for user facing " "elements, applications should use something like CLDR (the Unicode Common " @@ -684,7 +690,7 @@ msgstr "" "(Unicode 通用地區資料儲存庫)這樣的工具來取得更友善的使用者字串。另請參閱關" "於 :attr:`ZoneInfo.key` 的警示說明。" -#: ../../library/zoneinfo.rst:369 +#: ../../library/zoneinfo.rst:372 msgid "" "Sets or resets the time zone search path (:data:`TZPATH`) for the module. " "When called with no arguments, :data:`TZPATH` is set to the default value." @@ -692,7 +698,7 @@ msgstr "" "為模組設定或重設時區搜尋路徑(:data:`TZPATH`)。當不帶引數呼叫時,:data:" "`TZPATH` 會被設定為預設值。" -#: ../../library/zoneinfo.rst:372 +#: ../../library/zoneinfo.rst:375 msgid "" "Calling ``reset_tzpath`` will not invalidate the :class:`ZoneInfo` cache, " "and so calls to the primary ``ZoneInfo`` constructor will only use the new " @@ -701,7 +707,7 @@ msgstr "" "呼叫 ``reset_tzpath`` 不會使 :class:`ZoneInfo` 快取失效,因此對主要 " "``ZoneInfo`` 建構函式的呼叫只會在快取未命中時才使用新的 ``TZPATH``。" -#: ../../library/zoneinfo.rst:376 +#: ../../library/zoneinfo.rst:379 msgid "" "The ``to`` parameter must be a :term:`sequence` of strings or :class:`os." "PathLike` and not a string, all of which must be absolute paths. :exc:" @@ -712,11 +718,11 @@ msgstr "" "`,而不是一個字串,其中所有元素都必須是絕對路徑。如果傳入的不是絕對" "路徑,將會引發 :exc:`ValueError` 例外。" -#: ../../library/zoneinfo.rst:382 +#: ../../library/zoneinfo.rst:385 msgid "Globals" msgstr "全域變數" -#: ../../library/zoneinfo.rst:386 +#: ../../library/zoneinfo.rst:389 msgid "" "A read-only sequence representing the time zone search path -- when " "constructing a ``ZoneInfo`` from a key, the key is joined to each entry in " @@ -725,13 +731,13 @@ msgstr "" "一個表示時區搜尋路徑的唯讀序列 —— 當從一個鍵建構 ``ZoneInfo`` 時,該鍵會與 " "``TZPATH`` 中的每個條目結合,並使用找到的第一個檔案。" -#: ../../library/zoneinfo.rst:390 +#: ../../library/zoneinfo.rst:393 msgid "" "``TZPATH`` may contain only absolute paths, never relative paths, regardless " "of how it is configured." msgstr "``TZPATH`` 只能包含絕對路徑,絕不能包含相對路徑,無論如何設定。" -#: ../../library/zoneinfo.rst:393 +#: ../../library/zoneinfo.rst:396 msgid "" "The object that ``zoneinfo.TZPATH`` points to may change in response to a " "call to :func:`reset_tzpath`, so it is recommended to use ``zoneinfo." @@ -742,18 +748,18 @@ msgstr "" "變,因此建議使用 ``zoneinfo.TZPATH``,而不是從 ``zoneinfo`` 引入 ``TZPATH`` " "或將一個長生命週期的變數賦值給 ``zoneinfo.TZPATH``。" -#: ../../library/zoneinfo.rst:398 +#: ../../library/zoneinfo.rst:401 msgid "" "For more information on configuring the time zone search path, see :ref:" "`zoneinfo_data_configuration`." msgstr "" "有關設定時區搜尋路徑的更多資訊,請參閱 :ref:`zoneinfo_data_configuration`。" -#: ../../library/zoneinfo.rst:402 +#: ../../library/zoneinfo.rst:405 msgid "Exceptions and warnings" msgstr "例外與警告" -#: ../../library/zoneinfo.rst:406 +#: ../../library/zoneinfo.rst:409 msgid "" "Raised when construction of a :class:`ZoneInfo` object fails because the " "specified key could not be found on the system. This is a subclass of :exc:" @@ -762,7 +768,7 @@ msgstr "" "當建構 :class:`ZoneInfo` 物件因在系統上找不到指定的鍵而失敗時引發。這是 :exc:" "`KeyError` 的一個子類別。" -#: ../../library/zoneinfo.rst:412 +#: ../../library/zoneinfo.rst:415 msgid "" "Raised when :envvar:`PYTHONTZPATH` contains an invalid component that will " "be filtered out, such as a relative path." From 348e49d6d7b9261a3630a9c967de2a8d3b7d3b49 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Dec 2025 00:16:42 +0000 Subject: [PATCH 4/4] sync with cpython 7ff87fa8 --- library/ast.po | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/library/ast.po b/library/ast.po index 6100aef028..606599a2e3 100644 --- a/library/ast.po +++ b/library/ast.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-19 00:15+0000\n" +"POT-Creation-Date: 2025-12-30 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:38+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -188,7 +188,7 @@ msgid "" "int? end_col_offset)\n" "\n" " arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,\n" -" expr* kw_defaults, arg? kwarg, expr* defaults)\n" +" expr?* kw_defaults, arg? kwarg, expr* defaults)\n" "\n" " arg = (identifier arg, expr? annotation, string? type_comment)\n" " attributes (int lineno, int col_offset, int? end_lineno, int? " @@ -413,9 +413,10 @@ msgid "" "removed in Python 3.14, and their functionality has been replaced with :" "class:`ast.Constant`." msgstr "" -"過去的 Python 版本提供了 AST 類別 :class:`!ast.Num`、:class:`!ast.Str`、:class:`!ast.Bytes`" -"、:class:`!ast.NameConstant` 和 :class:`!ast.Ellipsis`,這些類別在 Python 3.8 中已被棄用。" -"這些類別在 Python 3.14 中被移除,其功能已被 :class:`ast.Constant` 取代。" +"過去的 Python 版本提供了 AST 類別 :class:`!ast.Num`、:class:`!ast.Str`、:" +"class:`!ast.Bytes`、:class:`!ast.NameConstant` 和 :class:`!ast.Ellipsis`,這" +"些類別在 Python 3.8 中已被棄用。這些類別在 Python 3.14 中被移除,其功能已被 :" +"class:`ast.Constant` 取代。" #: ../../library/ast.rst:152 msgid "" @@ -4270,8 +4271,8 @@ msgid "" "constant nodes." msgstr "" ":meth:`!visit_Num`、:meth:`!visit_Str`、:meth:`!visit_Bytes`、:meth:`!" -"visit_NameConstant` 和 :meth:`!visit_Ellipsis` 方法在 Python 3.14+ 中將不會被呼叫。" -"請改為新增 :meth:`visit_Constant` 方法來處理所有常數節點。" +"visit_NameConstant` 和 :meth:`!visit_Ellipsis` 方法在 Python 3.14+ 中將不會被" +"呼叫。請改為新增 :meth:`visit_Constant` 方法來處理所有常數節點。" #: ../../library/ast.rst:2447 msgid ""