diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 95c88ad68a..f57d5dc7c9 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-01-05 00:10+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -56,7 +56,7 @@ msgstr "" #: ../../library/concurrent.futures.rst:33 msgid "" -"Schedules the callable, *fn*, to be executed as ``fn(*args **kwargs)`` and " +"Schedules the callable, *fn*, to be executed as ``fn(*args, **kwargs)`` and " "returns a :class:`Future` object representing the execution of the " "callable. ::" msgstr "" @@ -455,62 +455,63 @@ msgstr "模組函式" #: ../../library/concurrent.futures.rst:437 msgid "" "Wait for the :class:`Future` instances (possibly created by different :class:" -"`Executor` instances) given by *fs* to complete. Returns a named 2-tuple of " +"`Executor` instances) given by *fs* to complete. Duplicate futures given to " +"*fs* are removed and will be returned only once. Returns a named 2-tuple of " "sets. The first set, named ``done``, contains the futures that completed " "(finished or cancelled futures) before the wait completed. The second set, " "named ``not_done``, contains the futures that did not complete (pending or " "running futures)." msgstr "" -#: ../../library/concurrent.futures.rst:444 +#: ../../library/concurrent.futures.rst:445 msgid "" "*timeout* can be used to control the maximum number of seconds to wait " "before returning. *timeout* can be an int or float. If *timeout* is not " "specified or ``None``, there is no limit to the wait time." msgstr "" -#: ../../library/concurrent.futures.rst:448 +#: ../../library/concurrent.futures.rst:449 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" msgstr "" -#: ../../library/concurrent.futures.rst:454 +#: ../../library/concurrent.futures.rst:455 msgid "Constant" msgstr "常數" -#: ../../library/concurrent.futures.rst:454 +#: ../../library/concurrent.futures.rst:455 msgid "Description" msgstr "描述" -#: ../../library/concurrent.futures.rst:456 +#: ../../library/concurrent.futures.rst:457 msgid ":const:`FIRST_COMPLETED`" msgstr ":const:`FIRST_COMPLETED`" -#: ../../library/concurrent.futures.rst:456 +#: ../../library/concurrent.futures.rst:457 msgid "The function will return when any future finishes or is cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:459 +#: ../../library/concurrent.futures.rst:460 msgid ":const:`FIRST_EXCEPTION`" msgstr ":const:`FIRST_EXCEPTION`" -#: ../../library/concurrent.futures.rst:459 +#: ../../library/concurrent.futures.rst:460 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" "`ALL_COMPLETED`." msgstr "" -#: ../../library/concurrent.futures.rst:465 +#: ../../library/concurrent.futures.rst:466 msgid ":const:`ALL_COMPLETED`" msgstr ":const:`ALL_COMPLETED`" -#: ../../library/concurrent.futures.rst:465 +#: ../../library/concurrent.futures.rst:466 msgid "The function will return when all futures finish or are cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:471 +#: ../../library/concurrent.futures.rst:472 msgid "" "Returns an iterator over the :class:`Future` instances (possibly created by " "different :class:`Executor` instances) given by *fs* that yields futures as " @@ -524,49 +525,49 @@ msgid "" "wait time." msgstr "" -#: ../../library/concurrent.futures.rst:485 +#: ../../library/concurrent.futures.rst:486 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: ../../library/concurrent.futures.rst:485 +#: ../../library/concurrent.futures.rst:486 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: ../../library/concurrent.futures.rst:490 +#: ../../library/concurrent.futures.rst:491 msgid "Exception classes" msgstr "" -#: ../../library/concurrent.futures.rst:496 +#: ../../library/concurrent.futures.rst:497 msgid "Raised when a future is cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:500 +#: ../../library/concurrent.futures.rst:501 msgid "Raised when a future operation exceeds the given timeout." msgstr "" -#: ../../library/concurrent.futures.rst:504 +#: ../../library/concurrent.futures.rst:505 msgid "" "Derived from :exc:`RuntimeError`, this exception class is raised when an " "executor is broken for some reason, and cannot be used to submit or execute " "new tasks." msgstr "" -#: ../../library/concurrent.futures.rst:512 +#: ../../library/concurrent.futures.rst:513 msgid "" "Raised when an operation is performed on a future that is not allowed in the " "current state." msgstr "" -#: ../../library/concurrent.futures.rst:521 +#: ../../library/concurrent.futures.rst:522 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception class " "is raised when one of the workers of a :class:`ThreadPoolExecutor` has " "failed initializing." msgstr "" -#: ../../library/concurrent.futures.rst:531 +#: ../../library/concurrent.futures.rst:532 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" "`RuntimeError`), this exception class is raised when one of the workers of " diff --git a/library/dataclasses.po b/library/dataclasses.po index b461cdfb1b..57ec3ee643 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-30 00:09+0000\n" +"POT-Creation-Date: 2022-01-09 00:10+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -396,7 +396,7 @@ msgstr "" #: ../../library/dataclasses.rst:324 msgid "" -"Converts the dataclass ``instance`` to a dict (by using the factory function " +"Converts the dataclass ``obj`` to a dict (by using the factory function " "``dict_factory``). Each dataclass is converted to a dict of its fields, as " "``name: value`` pairs. dataclasses, dicts, lists, and tuples are recursed " "into. Other objects are copied with :func:`copy.deepcopy`." @@ -412,16 +412,16 @@ msgstr "" #: ../../library/dataclasses.rst:351 msgid "" -":func:`asdict` raises :exc:`TypeError` if ``instance`` is not a dataclass " +":func:`asdict` raises :exc:`TypeError` if ``obj`` is not a dataclass " "instance." msgstr "" #: ../../library/dataclasses.rst:356 msgid "" -"Converts the dataclass ``instance`` to a tuple (by using the factory " -"function ``tuple_factory``). Each dataclass is converted to a tuple of its " -"field values. dataclasses, dicts, lists, and tuples are recursed into. " -"Other objects are copied with :func:`copy.deepcopy`." +"Converts the dataclass ``obj`` to a tuple (by using the factory function " +"``tuple_factory``). Each dataclass is converted to a tuple of its field " +"values. dataclasses, dicts, lists, and tuples are recursed into. Other " +"objects are copied with :func:`copy.deepcopy`." msgstr "" #: ../../library/dataclasses.rst:362 @@ -430,7 +430,7 @@ msgstr "" #: ../../library/dataclasses.rst:371 msgid "" -":func:`astuple` raises :exc:`TypeError` if ``instance`` is not a dataclass " +":func:`astuple` raises :exc:`TypeError` if ``obj`` is not a dataclass " "instance." msgstr "" @@ -460,8 +460,8 @@ msgstr "" #: ../../library/dataclasses.rst:411 msgid "" -"Creates a new object of the same type as ``instance``, replacing fields with " -"values from ``changes``. If ``instance`` is not a Data Class, raises :exc:" +"Creates a new object of the same type as ``obj``, replacing fields with " +"values from ``changes``. If ``obj`` is not a Data Class, raises :exc:" "`TypeError`. If values in ``changes`` do not specify fields, raises :exc:" "`TypeError`." msgstr "" diff --git a/library/logging.config.po b/library/logging.config.po index 9c892d3661..6637496db4 100644 --- a/library/logging.config.po +++ b/library/logging.config.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-07 00:10+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -286,11 +286,28 @@ msgid "" "from :func:`listen`." msgstr "" +#: ../../library/logging.config.rst:195 +msgid "Security considerations" +msgstr "" + #: ../../library/logging.config.rst:197 +msgid "" +"The logging configuration functionality tries to offer convenience, and in " +"part this is done by offering the ability to convert text in configuration " +"files into Python objects used in logging configuration - for example, as " +"described in :ref:`logging-config-dict-userdef`. However, these same " +"mechanisms (importing callables from user-defined modules and calling them " +"with parameters from the configuration) could be used to invoke any code you " +"like, and for this reason you should treat configuration files from " +"untrusted sources with *extreme caution* and satisfy yourself that nothing " +"bad can happen if you load them, before actually loading them." +msgstr "" + +#: ../../library/logging.config.rst:211 msgid "Configuration dictionary schema" msgstr "" -#: ../../library/logging.config.rst:199 +#: ../../library/logging.config.rst:213 msgid "" "Describing a logging configuration requires listing the various objects to " "create and the connections between them; for example, you may create a " @@ -303,23 +320,23 @@ msgid "" "connections` below." msgstr "" -#: ../../library/logging.config.rst:211 +#: ../../library/logging.config.rst:225 msgid "Dictionary Schema Details" msgstr "" -#: ../../library/logging.config.rst:213 +#: ../../library/logging.config.rst:227 msgid "" "The dictionary passed to :func:`dictConfig` must contain the following keys:" msgstr "" -#: ../../library/logging.config.rst:216 +#: ../../library/logging.config.rst:230 msgid "" "*version* - to be set to an integer value representing the schema version. " "The only valid value at present is 1, but having this key allows the schema " "to evolve while still preserving backwards compatibility." msgstr "" -#: ../../library/logging.config.rst:221 +#: ../../library/logging.config.rst:235 msgid "" "All other keys are optional, but if present they will be interpreted as " "described below. In all cases below where a 'configuring dict' is " @@ -329,37 +346,37 @@ msgid "" "otherwise, the context is used to determine what to instantiate." msgstr "" -#: ../../library/logging.config.rst:230 +#: ../../library/logging.config.rst:244 msgid "" "*formatters* - the corresponding value will be a dict in which each key is a " "formatter id and each value is a dict describing how to configure the " "corresponding :class:`~logging.Formatter` instance." msgstr "" -#: ../../library/logging.config.rst:234 +#: ../../library/logging.config.rst:248 msgid "" "The configuring dict is searched for the following optional keys which " "correspond to the arguments passed to create a :class:`~logging.Formatter` " "object:" msgstr "" -#: ../../library/logging.config.rst:238 +#: ../../library/logging.config.rst:252 msgid "``format``" msgstr "``format``" -#: ../../library/logging.config.rst:239 +#: ../../library/logging.config.rst:253 msgid "``datefmt``" msgstr "``datefmt``" -#: ../../library/logging.config.rst:240 +#: ../../library/logging.config.rst:254 msgid "``style``" msgstr "``style``" -#: ../../library/logging.config.rst:241 +#: ../../library/logging.config.rst:255 msgid "``validate`` (since version >=3.8)" msgstr "" -#: ../../library/logging.config.rst:243 +#: ../../library/logging.config.rst:257 msgid "" "An optional ``class`` key indicates the name of the formatter's class (as a " "dotted module and class name). The instantiation arguments are as for :" @@ -370,56 +387,56 @@ msgid "" "configuration keys, you should use :ref:`logging-config-dict-userdef`." msgstr "" -#: ../../library/logging.config.rst:252 +#: ../../library/logging.config.rst:266 msgid "" "*filters* - the corresponding value will be a dict in which each key is a " "filter id and each value is a dict describing how to configure the " "corresponding Filter instance." msgstr "" -#: ../../library/logging.config.rst:256 +#: ../../library/logging.config.rst:270 msgid "" "The configuring dict is searched for the key ``name`` (defaulting to the " "empty string) and this is used to construct a :class:`logging.Filter` " "instance." msgstr "" -#: ../../library/logging.config.rst:260 +#: ../../library/logging.config.rst:274 msgid "" "*handlers* - the corresponding value will be a dict in which each key is a " "handler id and each value is a dict describing how to configure the " "corresponding Handler instance." msgstr "" -#: ../../library/logging.config.rst:264 ../../library/logging.config.rst:306 +#: ../../library/logging.config.rst:278 ../../library/logging.config.rst:320 msgid "The configuring dict is searched for the following keys:" msgstr "" -#: ../../library/logging.config.rst:266 +#: ../../library/logging.config.rst:280 msgid "" "``class`` (mandatory). This is the fully qualified name of the handler " "class." msgstr "" -#: ../../library/logging.config.rst:269 +#: ../../library/logging.config.rst:283 msgid "``level`` (optional). The level of the handler." msgstr "" -#: ../../library/logging.config.rst:271 +#: ../../library/logging.config.rst:285 msgid "``formatter`` (optional). The id of the formatter for this handler." msgstr "" -#: ../../library/logging.config.rst:274 +#: ../../library/logging.config.rst:288 msgid "``filters`` (optional). A list of ids of the filters for this handler." msgstr "" -#: ../../library/logging.config.rst:277 +#: ../../library/logging.config.rst:291 msgid "" "All *other* keys are passed through as keyword arguments to the handler's " "constructor. For example, given the snippet:" msgstr "" -#: ../../library/logging.config.rst:296 +#: ../../library/logging.config.rst:310 msgid "" "the handler with id ``console`` is instantiated as a :class:`logging." "StreamHandler`, using ``sys.stdout`` as the underlying stream. The handler " @@ -428,44 +445,44 @@ msgid "" "maxBytes=1024, backupCount=3``." msgstr "" -#: ../../library/logging.config.rst:302 +#: ../../library/logging.config.rst:316 msgid "" "*loggers* - the corresponding value will be a dict in which each key is a " "logger name and each value is a dict describing how to configure the " "corresponding Logger instance." msgstr "" -#: ../../library/logging.config.rst:308 +#: ../../library/logging.config.rst:322 msgid "``level`` (optional). The level of the logger." msgstr "" -#: ../../library/logging.config.rst:310 +#: ../../library/logging.config.rst:324 msgid "``propagate`` (optional). The propagation setting of the logger." msgstr "" -#: ../../library/logging.config.rst:312 +#: ../../library/logging.config.rst:326 msgid "``filters`` (optional). A list of ids of the filters for this logger." msgstr "" -#: ../../library/logging.config.rst:315 +#: ../../library/logging.config.rst:329 msgid "" "``handlers`` (optional). A list of ids of the handlers for this logger." msgstr "" -#: ../../library/logging.config.rst:318 +#: ../../library/logging.config.rst:332 msgid "" "The specified loggers will be configured according to the level, " "propagation, filters and handlers specified." msgstr "" -#: ../../library/logging.config.rst:321 +#: ../../library/logging.config.rst:335 msgid "" "*root* - this will be the configuration for the root logger. Processing of " "the configuration will be as for any logger, except that the ``propagate`` " "setting will not be applicable." msgstr "" -#: ../../library/logging.config.rst:325 +#: ../../library/logging.config.rst:339 msgid "" "*incremental* - whether the configuration is to be interpreted as " "incremental to the existing configuration. This value defaults to " @@ -474,13 +491,13 @@ msgid "" "`fileConfig` API." msgstr "" -#: ../../library/logging.config.rst:331 +#: ../../library/logging.config.rst:345 msgid "" "If the specified value is ``True``, the configuration is processed as " "described in the section on :ref:`logging-config-dict-incremental`." msgstr "" -#: ../../library/logging.config.rst:334 +#: ../../library/logging.config.rst:348 msgid "" "*disable_existing_loggers* - whether any existing non-root loggers are to be " "disabled. This setting mirrors the parameter of the same name in :func:" @@ -488,11 +505,11 @@ msgid "" "ignored if *incremental* is ``True``." msgstr "" -#: ../../library/logging.config.rst:342 +#: ../../library/logging.config.rst:356 msgid "Incremental Configuration" msgstr "" -#: ../../library/logging.config.rst:344 +#: ../../library/logging.config.rst:358 msgid "" "It is difficult to provide complete flexibility for incremental " "configuration. For example, because objects such as filters and formatters " @@ -500,7 +517,7 @@ msgid "" "to such anonymous objects when augmenting a configuration." msgstr "" -#: ../../library/logging.config.rst:350 +#: ../../library/logging.config.rst:364 msgid "" "Furthermore, there is not a compelling case for arbitrarily altering the " "object graph of loggers, handlers, filters, formatters at run-time, once a " @@ -511,7 +528,7 @@ msgid "" "worth the complexity it adds to the implementation." msgstr "" -#: ../../library/logging.config.rst:359 +#: ../../library/logging.config.rst:373 msgid "" "Thus, when the ``incremental`` key of a configuration dict is present and is " "``True``, the system will completely ignore any ``formatters`` and " @@ -520,7 +537,7 @@ msgid "" "``loggers`` and ``root`` entries." msgstr "" -#: ../../library/logging.config.rst:365 +#: ../../library/logging.config.rst:379 msgid "" "Using a value in the configuration dict lets configurations to be sent over " "the wire as pickled dicts to a socket listener. Thus, the logging verbosity " @@ -528,11 +545,11 @@ msgid "" "and restart the application." msgstr "" -#: ../../library/logging.config.rst:373 +#: ../../library/logging.config.rst:387 msgid "Object connections" msgstr "" -#: ../../library/logging.config.rst:375 +#: ../../library/logging.config.rst:389 msgid "" "The schema describes a set of logging objects - loggers, handlers, " "formatters, filters - which are connected to each other in an object graph. " @@ -548,17 +565,17 @@ msgid "" "source and the destination object with that id." msgstr "" -#: ../../library/logging.config.rst:389 +#: ../../library/logging.config.rst:403 msgid "So, for example, consider the following YAML snippet:" msgstr "" -#: ../../library/logging.config.rst:410 +#: ../../library/logging.config.rst:424 msgid "" "(Note: YAML used here because it's a little more readable than the " "equivalent Python source form for the dictionary.)" msgstr "" -#: ../../library/logging.config.rst:413 +#: ../../library/logging.config.rst:427 msgid "" "The ids for loggers are the logger names which would be used " "programmatically to obtain a reference to those loggers, e.g. ``foo.bar." @@ -569,7 +586,7 @@ msgid "" "configuration call is complete." msgstr "" -#: ../../library/logging.config.rst:421 +#: ../../library/logging.config.rst:435 msgid "" "The above snippet indicates that logger named ``foo.bar.baz`` should have " "two handlers attached to it, which are described by the handler ids ``h1`` " @@ -577,11 +594,11 @@ msgid "" "the formatter for ``h2`` is that described by id ``precise``." msgstr "" -#: ../../library/logging.config.rst:431 +#: ../../library/logging.config.rst:445 msgid "User-defined objects" msgstr "" -#: ../../library/logging.config.rst:433 +#: ../../library/logging.config.rst:447 msgid "" "The schema supports user-defined objects for handlers, filters and " "formatters. (Loggers do not need to have different types for different " @@ -589,7 +606,7 @@ msgid "" "defined logger classes.)" msgstr "" -#: ../../library/logging.config.rst:438 +#: ../../library/logging.config.rst:452 msgid "" "Objects to be configured are described by dictionaries which detail their " "configuration. In some places, the logging system will be able to infer " @@ -602,7 +619,7 @@ msgid "" "made available under the special key ``'()'``. Here's a concrete example:" msgstr "" -#: ../../library/logging.config.rst:464 +#: ../../library/logging.config.rst:478 msgid "" "The above YAML snippet defines three formatters. The first, with id " "``brief``, is a standard :class:`logging.Formatter` instance with the " @@ -613,14 +630,14 @@ msgid "" "configuration sub-dictionaries::" msgstr "" -#: ../../library/logging.config.rst:476 +#: ../../library/logging.config.rst:490 msgid "and::" msgstr "" "和:\n" "\n" "::" -#: ../../library/logging.config.rst:483 +#: ../../library/logging.config.rst:497 msgid "" "respectively, and as these dictionaries do not contain the special key " "``'()'``, the instantiation is inferred from the context: as a result, " @@ -629,7 +646,7 @@ msgid "" "is::" msgstr "" -#: ../../library/logging.config.rst:496 +#: ../../library/logging.config.rst:510 msgid "" "and this contains the special key ``'()'``, which means that user-defined " "instantiation is wanted. In this case, the specified factory callable will " @@ -641,7 +658,7 @@ msgid "" "assumed to be returned by the call::" msgstr "" -#: ../../library/logging.config.rst:508 +#: ../../library/logging.config.rst:522 msgid "" "The key ``'()'`` has been used as the special key because it is not a valid " "keyword parameter name, and so will not clash with the names of the keyword " @@ -649,11 +666,11 @@ msgid "" "corresponding value is a callable." msgstr "" -#: ../../library/logging.config.rst:517 +#: ../../library/logging.config.rst:531 msgid "Access to external objects" msgstr "" -#: ../../library/logging.config.rst:519 +#: ../../library/logging.config.rst:533 msgid "" "There are times where a configuration needs to refer to objects external to " "the configuration, for example ``sys.stderr``. If the configuration dict is " @@ -668,7 +685,7 @@ msgid "" "import mechanisms." msgstr "" -#: ../../library/logging.config.rst:532 +#: ../../library/logging.config.rst:546 msgid "" "The handling of such prefixes is done in a way analogous to protocol " "handling: there is a generic mechanism to look for prefixes which match the " @@ -678,11 +695,11 @@ msgid "" "prefix is not recognised, then the string value will be left as-is." msgstr "" -#: ../../library/logging.config.rst:544 +#: ../../library/logging.config.rst:558 msgid "Access to internal objects" msgstr "" -#: ../../library/logging.config.rst:546 +#: ../../library/logging.config.rst:560 msgid "" "As well as external objects, there is sometimes also a need to refer to " "objects in the configuration. This will be done implicitly by the " @@ -693,7 +710,7 @@ msgid "" "and resolve to the appropriate destination object." msgstr "" -#: ../../library/logging.config.rst:554 +#: ../../library/logging.config.rst:568 msgid "" "However, a more generic mechanism is needed for user-defined objects which " "are not known to the :mod:`logging` module. For example, consider :class:" @@ -707,7 +724,7 @@ msgid "" "resolution system allows the user to specify:" msgstr "" -#: ../../library/logging.config.rst:576 +#: ../../library/logging.config.rst:590 msgid "" "The literal string ``'cfg://handlers.file'`` will be resolved in an " "analogous way to strings with the ``ext://`` prefix, but looking in the " @@ -716,7 +733,7 @@ msgid "" "format``. Thus, given the following snippet:" msgstr "" -#: ../../library/logging.config.rst:594 +#: ../../library/logging.config.rst:608 msgid "" "in the configuration, the string ``'cfg://handlers'`` would resolve to the " "dict with key ``handlers``, the string ``'cfg://handlers.email`` would " @@ -732,7 +749,7 @@ msgid "" "to the string value if needed." msgstr "" -#: ../../library/logging.config.rst:608 +#: ../../library/logging.config.rst:622 msgid "" "Given a string ``cfg://handlers.myhandler.mykey.123``, this will resolve to " "``config_dict['handlers']['myhandler']['mykey']['123']``. If the string is " @@ -742,11 +759,11 @@ msgid "" "['mykey']['123']`` if that fails." msgstr "" -#: ../../library/logging.config.rst:620 +#: ../../library/logging.config.rst:634 msgid "Import resolution and custom importers" msgstr "" -#: ../../library/logging.config.rst:622 +#: ../../library/logging.config.rst:636 msgid "" "Import resolution, by default, uses the builtin :func:`__import__` function " "to do its importing. You may want to replace this with your own importing " @@ -758,17 +775,17 @@ msgid "" "instance level, you need to wrap it with :func:`staticmethod`. For example::" msgstr "" -#: ../../library/logging.config.rst:637 +#: ../../library/logging.config.rst:651 msgid "" "You don't need to wrap with :func:`staticmethod` if you're setting the " "import callable on a configurator *instance*." msgstr "" -#: ../../library/logging.config.rst:644 +#: ../../library/logging.config.rst:658 msgid "Configuration file format" msgstr "" -#: ../../library/logging.config.rst:646 +#: ../../library/logging.config.rst:660 msgid "" "The configuration file format understood by :func:`fileConfig` is based on :" "mod:`configparser` functionality. The file must contain sections called " @@ -785,7 +802,7 @@ msgid "" "specified in a section called ``[logger_root]``." msgstr "" -#: ../../library/logging.config.rst:661 +#: ../../library/logging.config.rst:675 msgid "" "The :func:`fileConfig` API is older than the :func:`dictConfig` API and does " "not provide functionality to cover certain aspects of logging. For example, " @@ -798,17 +815,17 @@ msgid "" "when it's convenient to do so." msgstr "" -#: ../../library/logging.config.rst:671 +#: ../../library/logging.config.rst:685 msgid "Examples of these sections in the file are given below." msgstr "" -#: ../../library/logging.config.rst:684 +#: ../../library/logging.config.rst:698 msgid "" "The root logger must specify a level and a list of handlers. An example of a " "root logger section is given below." msgstr "" -#: ../../library/logging.config.rst:693 +#: ../../library/logging.config.rst:707 msgid "" "The ``level`` entry can be one of ``DEBUG, INFO, WARNING, ERROR, CRITICAL`` " "or ``NOTSET``. For the root logger only, ``NOTSET`` means that all messages " @@ -816,7 +833,7 @@ msgid "" "``logging`` package's namespace." msgstr "" -#: ../../library/logging.config.rst:698 +#: ../../library/logging.config.rst:712 msgid "" "The ``handlers`` entry is a comma-separated list of handler names, which " "must appear in the ``[handlers]`` section. These names must appear in the " @@ -824,13 +841,13 @@ msgid "" "file." msgstr "" -#: ../../library/logging.config.rst:703 +#: ../../library/logging.config.rst:717 msgid "" "For loggers other than the root logger, some additional information is " "required. This is illustrated by the following example." msgstr "" -#: ../../library/logging.config.rst:714 +#: ../../library/logging.config.rst:728 msgid "" "The ``level`` and ``handlers`` entries are interpreted as for the root " "logger, except that if a non-root logger's level is specified as ``NOTSET``, " @@ -843,20 +860,20 @@ msgid "" "application to get the logger." msgstr "" -#: ../../library/logging.config.rst:723 +#: ../../library/logging.config.rst:737 msgid "" "Sections which specify handler configuration are exemplified by the " "following." msgstr "" -#: ../../library/logging.config.rst:733 +#: ../../library/logging.config.rst:747 msgid "" "The ``class`` entry indicates the handler's class (as determined by :func:" "`eval` in the ``logging`` package's namespace). The ``level`` is interpreted " "as for loggers, and ``NOTSET`` is taken to mean 'log everything'." msgstr "" -#: ../../library/logging.config.rst:737 +#: ../../library/logging.config.rst:751 msgid "" "The ``formatter`` entry indicates the key name of the formatter for this " "handler. If blank, a default formatter (``logging._defaultFormatter``) is " @@ -864,7 +881,7 @@ msgid "" "and have a corresponding section in the configuration file." msgstr "" -#: ../../library/logging.config.rst:742 +#: ../../library/logging.config.rst:756 msgid "" "The ``args`` entry, when :func:`eval`\\ uated in the context of the " "``logging`` package's namespace, is the list of arguments to the constructor " @@ -873,26 +890,26 @@ msgid "" "provided, it defaults to ``()``." msgstr "" -#: ../../library/logging.config.rst:748 +#: ../../library/logging.config.rst:762 msgid "" "The optional ``kwargs`` entry, when :func:`eval`\\ uated in the context of " "the ``logging`` package's namespace, is the keyword argument dict to the " "constructor for the handler class. If not provided, it defaults to ``{}``." msgstr "" -#: ../../library/logging.config.rst:805 +#: ../../library/logging.config.rst:819 msgid "" "Sections which specify formatter configuration are typified by the following." msgstr "" -#: ../../library/logging.config.rst:816 +#: ../../library/logging.config.rst:830 msgid "" "The arguments for the formatter configuration are the same as the keys in " "the dictionary schema :ref:`formatters section `." msgstr "" -#: ../../library/logging.config.rst:822 +#: ../../library/logging.config.rst:836 msgid "" "Due to the use of :func:`eval` as described above, there are potential " "security risks which result from using the :func:`listen` to send and " @@ -901,18 +918,18 @@ msgid "" "`listen` documentation for more information." msgstr "" -#: ../../library/logging.config.rst:831 +#: ../../library/logging.config.rst:845 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../library/logging.config.rst:831 +#: ../../library/logging.config.rst:845 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.config.rst:833 +#: ../../library/logging.config.rst:847 msgid "Module :mod:`logging.handlers`" msgstr ":mod:`logging.handlers` 模組" -#: ../../library/logging.config.rst:834 +#: ../../library/logging.config.rst:848 msgid "Useful handlers included with the logging module." msgstr "" diff --git a/library/logging.handlers.po b/library/logging.handlers.po index 0d9694b7b1..566e366c9d 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-14 09:35+0000\n" +"POT-Creation-Date: 2022-01-08 00:09+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -146,18 +146,18 @@ msgid "" msgstr "" #: ../../library/logging.handlers.rst:105 -#: ../../library/logging.handlers.rst:187 -#: ../../library/logging.handlers.rst:335 -#: ../../library/logging.handlers.rst:441 +#: ../../library/logging.handlers.rst:190 +#: ../../library/logging.handlers.rst:338 +#: ../../library/logging.handlers.rst:444 msgid "" "As well as string values, :class:`~pathlib.Path` objects are also accepted " "for the *filename* argument." msgstr "" #: ../../library/logging.handlers.rst:109 -#: ../../library/logging.handlers.rst:191 -#: ../../library/logging.handlers.rst:339 -#: ../../library/logging.handlers.rst:445 +#: ../../library/logging.handlers.rst:194 +#: ../../library/logging.handlers.rst:342 +#: ../../library/logging.handlers.rst:448 msgid "The *errors* parameter was added." msgstr "新增 *errors* 參數。" @@ -169,43 +169,49 @@ msgstr "" msgid "Outputs the record to the file." msgstr "" -#: ../../library/logging.handlers.rst:124 +#: ../../library/logging.handlers.rst:120 +msgid "" +"Note that if the file was closed due to logging shutdown at exit and the " +"file mode is 'w', the record will not be emitted (see :issue:`42378`)." +msgstr "" + +#: ../../library/logging.handlers.rst:127 msgid "NullHandler" msgstr "NullHandler" -#: ../../library/logging.handlers.rst:128 +#: ../../library/logging.handlers.rst:131 msgid "" "The :class:`NullHandler` class, located in the core :mod:`logging` package, " "does not do any formatting or output. It is essentially a 'no-op' handler " "for use by library developers." msgstr "" -#: ../../library/logging.handlers.rst:134 +#: ../../library/logging.handlers.rst:137 msgid "Returns a new instance of the :class:`NullHandler` class." msgstr "" -#: ../../library/logging.handlers.rst:138 -#: ../../library/logging.handlers.rst:142 +#: ../../library/logging.handlers.rst:141 +#: ../../library/logging.handlers.rst:145 msgid "This method does nothing." msgstr "" -#: ../../library/logging.handlers.rst:146 +#: ../../library/logging.handlers.rst:149 msgid "" "This method returns ``None`` for the lock, since there is no underlying I/O " "to which access needs to be serialized." msgstr "" -#: ../../library/logging.handlers.rst:150 +#: ../../library/logging.handlers.rst:153 msgid "" "See :ref:`library-config` for more information on how to use :class:" "`NullHandler`." msgstr "" -#: ../../library/logging.handlers.rst:156 +#: ../../library/logging.handlers.rst:159 msgid "WatchedFileHandler" msgstr "WatchedFileHandler" -#: ../../library/logging.handlers.rst:160 +#: ../../library/logging.handlers.rst:163 msgid "" "The :class:`WatchedFileHandler` class, located in the :mod:`logging." "handlers` module, is a :class:`FileHandler` which watches the file it is " @@ -213,7 +219,7 @@ msgid "" "name." msgstr "" -#: ../../library/logging.handlers.rst:164 +#: ../../library/logging.handlers.rst:167 msgid "" "A file change can happen because of usage of programs such as *newsyslog* " "and *logrotate* which perform log file rotation. This handler, intended for " @@ -223,7 +229,7 @@ msgid "" "file opened to get a new stream." msgstr "" -#: ../../library/logging.handlers.rst:171 +#: ../../library/logging.handlers.rst:174 msgid "" "This handler is not appropriate for use under Windows, because under Windows " "open log files cannot be moved or renamed - logging opens the files with " @@ -232,7 +238,7 @@ msgid "" "zero for this value." msgstr "" -#: ../../library/logging.handlers.rst:180 +#: ../../library/logging.handlers.rst:183 msgid "" "Returns a new instance of the :class:`WatchedFileHandler` class. The " "specified file is opened and used as the stream for logging. If *mode* is " @@ -243,24 +249,24 @@ msgid "" "errors are handled." msgstr "" -#: ../../library/logging.handlers.rst:196 +#: ../../library/logging.handlers.rst:199 msgid "" "Checks to see if the file has changed. If it has, the existing stream is " "flushed and closed and the file opened again, typically as a precursor to " "outputting the record to the file." msgstr "" -#: ../../library/logging.handlers.rst:205 +#: ../../library/logging.handlers.rst:208 msgid "" "Outputs the record to the file, but first calls :meth:`reopenIfNeeded` to " "reopen the file if it has changed." msgstr "" -#: ../../library/logging.handlers.rst:211 +#: ../../library/logging.handlers.rst:214 msgid "BaseRotatingHandler" msgstr "BaseRotatingHandler" -#: ../../library/logging.handlers.rst:213 +#: ../../library/logging.handlers.rst:216 msgid "" "The :class:`BaseRotatingHandler` class, located in the :mod:`logging." "handlers` module, is the base class for the rotating file handlers, :class:" @@ -269,18 +275,18 @@ msgid "" "need to override." msgstr "" -#: ../../library/logging.handlers.rst:221 +#: ../../library/logging.handlers.rst:224 msgid "The parameters are as for :class:`FileHandler`. The attributes are:" msgstr "" -#: ../../library/logging.handlers.rst:225 +#: ../../library/logging.handlers.rst:228 msgid "" "If this attribute is set to a callable, the :meth:`rotation_filename` method " "delegates to this callable. The parameters passed to the callable are those " "passed to :meth:`rotation_filename`." msgstr "" -#: ../../library/logging.handlers.rst:229 +#: ../../library/logging.handlers.rst:232 msgid "" "The namer function is called quite a few times during rollover, so it should " "be as simple and as fast as possible. It should also return the same output " @@ -288,7 +294,7 @@ msgid "" "as expected." msgstr "" -#: ../../library/logging.handlers.rst:234 +#: ../../library/logging.handlers.rst:237 msgid "" "It's also worth noting that care should be taken when using a namer to " "preserve certain attributes in the filename which are used during rotation. " @@ -305,37 +311,37 @@ msgid "" "custom naming scheme.)" msgstr "" -#: ../../library/logging.handlers.rst:252 +#: ../../library/logging.handlers.rst:255 msgid "" "If this attribute is set to a callable, the :meth:`rotate` method delegates " "to this callable. The parameters passed to the callable are those passed " "to :meth:`rotate`." msgstr "" -#: ../../library/logging.handlers.rst:260 +#: ../../library/logging.handlers.rst:263 msgid "Modify the filename of a log file when rotating." msgstr "" -#: ../../library/logging.handlers.rst:262 +#: ../../library/logging.handlers.rst:265 msgid "This is provided so that a custom filename can be provided." msgstr "" -#: ../../library/logging.handlers.rst:264 +#: ../../library/logging.handlers.rst:267 msgid "" "The default implementation calls the 'namer' attribute of the handler, if " "it's callable, passing the default name to it. If the attribute isn't " "callable (the default is ``None``), the name is returned unchanged." msgstr "" -#: ../../library/logging.handlers.rst:268 +#: ../../library/logging.handlers.rst:271 msgid "The default name for the log file." msgstr "" -#: ../../library/logging.handlers.rst:275 +#: ../../library/logging.handlers.rst:278 msgid "When rotating, rotate the current log." msgstr "" -#: ../../library/logging.handlers.rst:277 +#: ../../library/logging.handlers.rst:280 msgid "" "The default implementation calls the 'rotator' attribute of the handler, if " "it's callable, passing the source and dest arguments to it. If the attribute " @@ -343,18 +349,18 @@ msgid "" "the destination." msgstr "" -#: ../../library/logging.handlers.rst:282 +#: ../../library/logging.handlers.rst:285 msgid "" "The source filename. This is normally the base filename, e.g. 'test.log'." msgstr "" -#: ../../library/logging.handlers.rst:284 +#: ../../library/logging.handlers.rst:287 msgid "" "The destination filename. This is normally what the source is rotated to, e." "g. 'test.log.1'." msgstr "" -#: ../../library/logging.handlers.rst:289 +#: ../../library/logging.handlers.rst:292 msgid "" "The reason the attributes exist is to save you having to subclass - you can " "use the same callables for instances of :class:`RotatingFileHandler` and :" @@ -364,27 +370,27 @@ msgid "" "method of the handler." msgstr "" -#: ../../library/logging.handlers.rst:296 +#: ../../library/logging.handlers.rst:299 msgid "" "If you need to make more significant changes to rotation processing, you can " "override the methods." msgstr "" -#: ../../library/logging.handlers.rst:299 +#: ../../library/logging.handlers.rst:302 msgid "For an example, see :ref:`cookbook-rotator-namer`." msgstr "" -#: ../../library/logging.handlers.rst:305 +#: ../../library/logging.handlers.rst:308 msgid "RotatingFileHandler" msgstr "RotatingFileHandler" -#: ../../library/logging.handlers.rst:307 +#: ../../library/logging.handlers.rst:310 msgid "" "The :class:`RotatingFileHandler` class, located in the :mod:`logging." "handlers` module, supports rotation of disk log files." msgstr "" -#: ../../library/logging.handlers.rst:313 +#: ../../library/logging.handlers.rst:316 msgid "" "Returns a new instance of the :class:`RotatingFileHandler` class. The " "specified file is opened and used as the stream for logging. If *mode* is " @@ -395,7 +401,7 @@ msgid "" "errors are handled." msgstr "" -#: ../../library/logging.handlers.rst:320 +#: ../../library/logging.handlers.rst:323 msgid "" "You can use the *maxBytes* and *backupCount* values to allow the file to :" "dfn:`rollover` at a predetermined size. When the size is about to be " @@ -413,29 +419,29 @@ msgid "" "they are renamed to :file:`app.log.2`, :file:`app.log.3` etc. respectively." msgstr "" -#: ../../library/logging.handlers.rst:344 -#: ../../library/logging.handlers.rst:450 +#: ../../library/logging.handlers.rst:347 +#: ../../library/logging.handlers.rst:453 msgid "Does a rollover, as described above." msgstr "" -#: ../../library/logging.handlers.rst:349 +#: ../../library/logging.handlers.rst:352 msgid "" "Outputs the record to the file, catering for rollover as described " "previously." msgstr "" -#: ../../library/logging.handlers.rst:355 +#: ../../library/logging.handlers.rst:358 msgid "TimedRotatingFileHandler" msgstr "TimedRotatingFileHandler" -#: ../../library/logging.handlers.rst:357 +#: ../../library/logging.handlers.rst:360 msgid "" "The :class:`TimedRotatingFileHandler` class, located in the :mod:`logging." "handlers` module, supports rotation of disk log files at certain timed " "intervals." msgstr "" -#: ../../library/logging.handlers.rst:364 +#: ../../library/logging.handlers.rst:367 msgid "" "Returns a new instance of the :class:`TimedRotatingFileHandler` class. The " "specified file is opened and used as the stream for logging. On rotating it " @@ -443,112 +449,112 @@ msgid "" "*when* and *interval*." msgstr "" -#: ../../library/logging.handlers.rst:369 +#: ../../library/logging.handlers.rst:372 msgid "" "You can use the *when* to specify the type of *interval*. The list of " "possible values is below. Note that they are not case sensitive." msgstr "" -#: ../../library/logging.handlers.rst:373 +#: ../../library/logging.handlers.rst:376 msgid "Value" msgstr "" -#: ../../library/logging.handlers.rst:373 +#: ../../library/logging.handlers.rst:376 msgid "Type of interval" msgstr "" -#: ../../library/logging.handlers.rst:373 +#: ../../library/logging.handlers.rst:376 msgid "If/how *atTime* is used" msgstr "" -#: ../../library/logging.handlers.rst:375 +#: ../../library/logging.handlers.rst:378 msgid "``'S'``" msgstr "``'S'``" -#: ../../library/logging.handlers.rst:375 +#: ../../library/logging.handlers.rst:378 msgid "Seconds" msgstr "" -#: ../../library/logging.handlers.rst:375 -#: ../../library/logging.handlers.rst:377 -#: ../../library/logging.handlers.rst:379 -#: ../../library/logging.handlers.rst:381 +#: ../../library/logging.handlers.rst:378 +#: ../../library/logging.handlers.rst:380 +#: ../../library/logging.handlers.rst:382 +#: ../../library/logging.handlers.rst:384 msgid "Ignored" msgstr "" -#: ../../library/logging.handlers.rst:377 +#: ../../library/logging.handlers.rst:380 msgid "``'M'``" msgstr "``'M'``" -#: ../../library/logging.handlers.rst:377 +#: ../../library/logging.handlers.rst:380 msgid "Minutes" msgstr "" -#: ../../library/logging.handlers.rst:379 +#: ../../library/logging.handlers.rst:382 msgid "``'H'``" msgstr "``'H'``" -#: ../../library/logging.handlers.rst:379 +#: ../../library/logging.handlers.rst:382 msgid "Hours" msgstr "" -#: ../../library/logging.handlers.rst:381 +#: ../../library/logging.handlers.rst:384 msgid "``'D'``" msgstr "``'D'``" -#: ../../library/logging.handlers.rst:381 +#: ../../library/logging.handlers.rst:384 msgid "Days" msgstr "" -#: ../../library/logging.handlers.rst:383 +#: ../../library/logging.handlers.rst:386 msgid "``'W0'-'W6'``" msgstr "``'W0'-'W6'``" -#: ../../library/logging.handlers.rst:383 +#: ../../library/logging.handlers.rst:386 msgid "Weekday (0=Monday)" msgstr "" -#: ../../library/logging.handlers.rst:383 #: ../../library/logging.handlers.rst:386 +#: ../../library/logging.handlers.rst:389 msgid "Used to compute initial rollover time" msgstr "" -#: ../../library/logging.handlers.rst:386 +#: ../../library/logging.handlers.rst:389 msgid "``'midnight'``" msgstr "``'midnight'``" -#: ../../library/logging.handlers.rst:386 +#: ../../library/logging.handlers.rst:389 msgid "Roll over at midnight, if *atTime* not specified, else at time *atTime*" msgstr "" -#: ../../library/logging.handlers.rst:391 +#: ../../library/logging.handlers.rst:394 msgid "" "When using weekday-based rotation, specify 'W0' for Monday, 'W1' for " "Tuesday, and so on up to 'W6' for Sunday. In this case, the value passed for " "*interval* isn't used." msgstr "" -#: ../../library/logging.handlers.rst:395 +#: ../../library/logging.handlers.rst:398 msgid "" "The system will save old log files by appending extensions to the filename. " "The extensions are date-and-time based, using the strftime format ``%Y-%m-%d_" "%H-%M-%S`` or a leading portion thereof, depending on the rollover interval." msgstr "" -#: ../../library/logging.handlers.rst:400 +#: ../../library/logging.handlers.rst:403 msgid "" "When computing the next rollover time for the first time (when the handler " "is created), the last modification time of an existing log file, or else the " "current time, is used to compute when the next rotation will occur." msgstr "" -#: ../../library/logging.handlers.rst:404 +#: ../../library/logging.handlers.rst:407 msgid "" "If the *utc* argument is true, times in UTC will be used; otherwise local " "time is used." msgstr "" -#: ../../library/logging.handlers.rst:407 +#: ../../library/logging.handlers.rst:410 msgid "" "If *backupCount* is nonzero, at most *backupCount* files will be kept, and " "if more would be created when rollover occurs, the oldest one is deleted. " @@ -556,13 +562,13 @@ msgid "" "changing the interval may leave old files lying around." msgstr "" -#: ../../library/logging.handlers.rst:412 +#: ../../library/logging.handlers.rst:415 msgid "" "If *delay* is true, then file opening is deferred until the first call to :" "meth:`emit`." msgstr "" -#: ../../library/logging.handlers.rst:415 +#: ../../library/logging.handlers.rst:418 msgid "" "If *atTime* is not ``None``, it must be a ``datetime.time`` instance which " "specifies the time of day when rollover occurs, for the cases where rollover " @@ -572,13 +578,13 @@ msgid "" "normal interval calculation." msgstr "" -#: ../../library/logging.handlers.rst:422 +#: ../../library/logging.handlers.rst:425 msgid "" "If *errors* is specified, it's used to determine how encoding errors are " "handled." msgstr "" -#: ../../library/logging.handlers.rst:425 +#: ../../library/logging.handlers.rst:428 msgid "" "Calculation of the initial rollover time is done when the handler is " "initialised. Calculation of subsequent rollover times is done only when " @@ -593,51 +599,51 @@ msgid "" "to the minutes where no output (and hence no rollover) occurred." msgstr "" -#: ../../library/logging.handlers.rst:438 +#: ../../library/logging.handlers.rst:441 msgid "*atTime* parameter was added." msgstr "新增 *atTime* 參數。" -#: ../../library/logging.handlers.rst:454 +#: ../../library/logging.handlers.rst:457 msgid "" "Outputs the record to the file, catering for rollover as described above." msgstr "" -#: ../../library/logging.handlers.rst:458 +#: ../../library/logging.handlers.rst:461 msgid "" "Returns a list of filenames which should be deleted as part of rollover. " "These are the absolute paths of the oldest backup log files written by the " "handler." msgstr "" -#: ../../library/logging.handlers.rst:464 +#: ../../library/logging.handlers.rst:467 msgid "SocketHandler" msgstr "SocketHandler" -#: ../../library/logging.handlers.rst:466 +#: ../../library/logging.handlers.rst:469 msgid "" "The :class:`SocketHandler` class, located in the :mod:`logging.handlers` " "module, sends logging output to a network socket. The base class uses a TCP " "socket." msgstr "" -#: ../../library/logging.handlers.rst:472 +#: ../../library/logging.handlers.rst:475 msgid "" "Returns a new instance of the :class:`SocketHandler` class intended to " "communicate with a remote machine whose address is given by *host* and " "*port*." msgstr "" -#: ../../library/logging.handlers.rst:475 +#: ../../library/logging.handlers.rst:478 msgid "" "If ``port`` is specified as ``None``, a Unix domain socket is created using " "the value in ``host`` - otherwise, a TCP socket is created." msgstr "" -#: ../../library/logging.handlers.rst:481 +#: ../../library/logging.handlers.rst:484 msgid "Closes the socket." msgstr "" -#: ../../library/logging.handlers.rst:486 +#: ../../library/logging.handlers.rst:489 msgid "" "Pickles the record's attribute dictionary and writes it to the socket in " "binary format. If there is an error with the socket, silently drops the " @@ -646,28 +652,28 @@ msgid "" "`~logging.LogRecord`, use the :func:`~logging.makeLogRecord` function." msgstr "" -#: ../../library/logging.handlers.rst:496 +#: ../../library/logging.handlers.rst:499 msgid "" "Handles an error which has occurred during :meth:`emit`. The most likely " "cause is a lost connection. Closes the socket so that we can retry on the " "next event." msgstr "" -#: ../../library/logging.handlers.rst:503 +#: ../../library/logging.handlers.rst:506 msgid "" "This is a factory method which allows subclasses to define the precise type " "of socket they want. The default implementation creates a TCP socket (:const:" "`socket.SOCK_STREAM`)." msgstr "" -#: ../../library/logging.handlers.rst:510 +#: ../../library/logging.handlers.rst:513 msgid "" "Pickles the record's attribute dictionary in binary format with a length " "prefix, and returns it ready for transmission across the socket. The details " "of this operation are equivalent to::" msgstr "" -#: ../../library/logging.handlers.rst:518 +#: ../../library/logging.handlers.rst:521 msgid "" "Note that pickles aren't completely secure. If you are concerned about " "security, you may want to override this method to implement a more secure " @@ -676,20 +682,20 @@ msgid "" "objects on the receiving end." msgstr "" -#: ../../library/logging.handlers.rst:527 +#: ../../library/logging.handlers.rst:530 msgid "" "Send a pickled byte-string *packet* to the socket. The format of the sent " "byte-string is as described in the documentation for :meth:`~SocketHandler." "makePickle`." msgstr "" -#: ../../library/logging.handlers.rst:531 +#: ../../library/logging.handlers.rst:534 msgid "" "This function allows for partial sends, which can happen when the network is " "busy." msgstr "" -#: ../../library/logging.handlers.rst:537 +#: ../../library/logging.handlers.rst:540 msgid "" "Tries to create a socket; on failure, uses an exponential back-off " "algorithm. On initial failure, the handler will drop the message it was " @@ -700,23 +706,23 @@ msgid "" "each time up to a maximum of 30 seconds." msgstr "" -#: ../../library/logging.handlers.rst:545 +#: ../../library/logging.handlers.rst:548 msgid "This behaviour is controlled by the following handler attributes:" msgstr "" -#: ../../library/logging.handlers.rst:547 +#: ../../library/logging.handlers.rst:550 msgid "``retryStart`` (initial delay, defaulting to 1.0 seconds)." msgstr "" -#: ../../library/logging.handlers.rst:548 +#: ../../library/logging.handlers.rst:551 msgid "``retryFactor`` (multiplier, defaulting to 2.0)." msgstr "" -#: ../../library/logging.handlers.rst:549 +#: ../../library/logging.handlers.rst:552 msgid "``retryMax`` (maximum delay, defaulting to 30.0 seconds)." msgstr "" -#: ../../library/logging.handlers.rst:551 +#: ../../library/logging.handlers.rst:554 msgid "" "This means that if the remote listener starts up *after* the handler has " "been used, you could lose messages (since the handler won't even attempt a " @@ -724,31 +730,31 @@ msgid "" "during the delay period)." msgstr "" -#: ../../library/logging.handlers.rst:560 +#: ../../library/logging.handlers.rst:563 msgid "DatagramHandler" msgstr "DatagramHandler" -#: ../../library/logging.handlers.rst:562 +#: ../../library/logging.handlers.rst:565 msgid "" "The :class:`DatagramHandler` class, located in the :mod:`logging.handlers` " "module, inherits from :class:`SocketHandler` to support sending logging " "messages over UDP sockets." msgstr "" -#: ../../library/logging.handlers.rst:569 +#: ../../library/logging.handlers.rst:572 msgid "" "Returns a new instance of the :class:`DatagramHandler` class intended to " "communicate with a remote machine whose address is given by *host* and " "*port*." msgstr "" -#: ../../library/logging.handlers.rst:572 +#: ../../library/logging.handlers.rst:575 msgid "" "If ``port`` is specified as ``None``, a Unix domain socket is created using " "the value in ``host`` - otherwise, a UDP socket is created." msgstr "" -#: ../../library/logging.handlers.rst:578 +#: ../../library/logging.handlers.rst:581 msgid "" "Pickles the record's attribute dictionary and writes it to the socket in " "binary format. If there is an error with the socket, silently drops the " @@ -756,29 +762,29 @@ msgid "" "LogRecord`, use the :func:`~logging.makeLogRecord` function." msgstr "" -#: ../../library/logging.handlers.rst:587 +#: ../../library/logging.handlers.rst:590 msgid "" "The factory method of :class:`SocketHandler` is here overridden to create a " "UDP socket (:const:`socket.SOCK_DGRAM`)." msgstr "" -#: ../../library/logging.handlers.rst:593 +#: ../../library/logging.handlers.rst:596 msgid "" "Send a pickled byte-string to a socket. The format of the sent byte-string " "is as described in the documentation for :meth:`SocketHandler.makePickle`." msgstr "" -#: ../../library/logging.handlers.rst:600 +#: ../../library/logging.handlers.rst:603 msgid "SysLogHandler" msgstr "SysLogHandler" -#: ../../library/logging.handlers.rst:602 +#: ../../library/logging.handlers.rst:605 msgid "" "The :class:`SysLogHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a remote or local Unix syslog." msgstr "" -#: ../../library/logging.handlers.rst:608 +#: ../../library/logging.handlers.rst:611 msgid "" "Returns a new instance of the :class:`SysLogHandler` class intended to " "communicate with a remote Unix machine whose address is given by *address* " @@ -793,7 +799,7 @@ msgid "" "rsyslog), specify a value of :const:`socket.SOCK_STREAM`." msgstr "" -#: ../../library/logging.handlers.rst:620 +#: ../../library/logging.handlers.rst:623 msgid "" "Note that if your server is not listening on UDP port 514, :class:" "`SysLogHandler` may appear not to work. In that case, check what address you " @@ -804,21 +810,21 @@ msgid "" "platforms). On Windows, you pretty much have to use the UDP option." msgstr "" -#: ../../library/logging.handlers.rst:629 +#: ../../library/logging.handlers.rst:632 msgid "*socktype* was added." msgstr "新增 *socktype*\\ 。" -#: ../../library/logging.handlers.rst:635 +#: ../../library/logging.handlers.rst:638 msgid "Closes the socket to the remote host." msgstr "" -#: ../../library/logging.handlers.rst:640 +#: ../../library/logging.handlers.rst:643 msgid "" "The record is formatted, and then sent to the syslog server. If exception " "information is present, it is *not* sent to the server." msgstr "" -#: ../../library/logging.handlers.rst:643 +#: ../../library/logging.handlers.rst:646 msgid "" "(See: :issue:`12168`.) In earlier versions, the message sent to the syslog " "daemons was always terminated with a NUL byte, because early versions of " @@ -829,7 +835,7 @@ msgid "" "byte on as part of the message." msgstr "" -#: ../../library/logging.handlers.rst:652 +#: ../../library/logging.handlers.rst:655 msgid "" "To enable easier handling of syslog messages in the face of all these " "differing daemon behaviours, the appending of the NUL byte has been made " @@ -839,7 +845,7 @@ msgid "" "*not* append the NUL terminator." msgstr "" -#: ../../library/logging.handlers.rst:659 +#: ../../library/logging.handlers.rst:662 msgid "" "(See: :issue:`12419`.) In earlier versions, there was no facility for an " "\"ident\" or \"tag\" prefix to identify the source of the message. This can " @@ -850,262 +856,262 @@ msgid "" "bytes, and is prepended to the message exactly as is." msgstr "" -#: ../../library/logging.handlers.rst:670 +#: ../../library/logging.handlers.rst:673 msgid "" "Encodes the facility and priority into an integer. You can pass in strings " "or integers - if strings are passed, internal mapping dictionaries are used " "to convert them to integers." msgstr "" -#: ../../library/logging.handlers.rst:674 +#: ../../library/logging.handlers.rst:677 msgid "" "The symbolic ``LOG_`` values are defined in :class:`SysLogHandler` and " "mirror the values defined in the ``sys/syslog.h`` header file." msgstr "" -#: ../../library/logging.handlers.rst:677 +#: ../../library/logging.handlers.rst:680 msgid "**Priorities**" msgstr "" -#: ../../library/logging.handlers.rst:680 -#: ../../library/logging.handlers.rst:702 +#: ../../library/logging.handlers.rst:683 +#: ../../library/logging.handlers.rst:705 msgid "Name (string)" msgstr "" -#: ../../library/logging.handlers.rst:680 -#: ../../library/logging.handlers.rst:702 +#: ../../library/logging.handlers.rst:683 +#: ../../library/logging.handlers.rst:705 msgid "Symbolic value" msgstr "" -#: ../../library/logging.handlers.rst:682 +#: ../../library/logging.handlers.rst:685 msgid "``alert``" msgstr "``alert``" -#: ../../library/logging.handlers.rst:682 +#: ../../library/logging.handlers.rst:685 msgid "LOG_ALERT" msgstr "LOG_ALERT" -#: ../../library/logging.handlers.rst:684 +#: ../../library/logging.handlers.rst:687 msgid "``crit`` or ``critical``" msgstr "``crit`` 或 ``critical``" -#: ../../library/logging.handlers.rst:684 +#: ../../library/logging.handlers.rst:687 msgid "LOG_CRIT" msgstr "LOG_CRIT" -#: ../../library/logging.handlers.rst:686 +#: ../../library/logging.handlers.rst:689 msgid "``debug``" msgstr "``debug``" -#: ../../library/logging.handlers.rst:686 +#: ../../library/logging.handlers.rst:689 msgid "LOG_DEBUG" msgstr "LOG_DEBUG" -#: ../../library/logging.handlers.rst:688 +#: ../../library/logging.handlers.rst:691 msgid "``emerg`` or ``panic``" msgstr "``emerg`` 或 ``panic``" -#: ../../library/logging.handlers.rst:688 +#: ../../library/logging.handlers.rst:691 msgid "LOG_EMERG" msgstr "LOG_EMERG" -#: ../../library/logging.handlers.rst:690 +#: ../../library/logging.handlers.rst:693 msgid "``err`` or ``error``" msgstr "``err`` 或 ``error``" -#: ../../library/logging.handlers.rst:690 +#: ../../library/logging.handlers.rst:693 msgid "LOG_ERR" msgstr "LOG_ERR" -#: ../../library/logging.handlers.rst:692 +#: ../../library/logging.handlers.rst:695 msgid "``info``" msgstr "``info``" -#: ../../library/logging.handlers.rst:692 +#: ../../library/logging.handlers.rst:695 msgid "LOG_INFO" msgstr "LOG_INFO" -#: ../../library/logging.handlers.rst:694 +#: ../../library/logging.handlers.rst:697 msgid "``notice``" msgstr "``notice``" -#: ../../library/logging.handlers.rst:694 +#: ../../library/logging.handlers.rst:697 msgid "LOG_NOTICE" msgstr "LOG_NOTICE" -#: ../../library/logging.handlers.rst:696 +#: ../../library/logging.handlers.rst:699 msgid "``warn`` or ``warning``" msgstr "``warn`` 或 ``warning``" -#: ../../library/logging.handlers.rst:696 +#: ../../library/logging.handlers.rst:699 msgid "LOG_WARNING" msgstr "LOG_WARNING" -#: ../../library/logging.handlers.rst:699 +#: ../../library/logging.handlers.rst:702 msgid "**Facilities**" msgstr "" -#: ../../library/logging.handlers.rst:704 +#: ../../library/logging.handlers.rst:707 msgid "``auth``" msgstr "``auth``" -#: ../../library/logging.handlers.rst:704 +#: ../../library/logging.handlers.rst:707 msgid "LOG_AUTH" msgstr "LOG_AUTH" -#: ../../library/logging.handlers.rst:706 +#: ../../library/logging.handlers.rst:709 msgid "``authpriv``" msgstr "``authpriv``" -#: ../../library/logging.handlers.rst:706 +#: ../../library/logging.handlers.rst:709 msgid "LOG_AUTHPRIV" msgstr "LOG_AUTHPRIV" -#: ../../library/logging.handlers.rst:708 +#: ../../library/logging.handlers.rst:711 msgid "``cron``" msgstr "``cron``" -#: ../../library/logging.handlers.rst:708 +#: ../../library/logging.handlers.rst:711 msgid "LOG_CRON" msgstr "LOG_CRON" -#: ../../library/logging.handlers.rst:710 +#: ../../library/logging.handlers.rst:713 msgid "``daemon``" msgstr "``daemon``" -#: ../../library/logging.handlers.rst:710 +#: ../../library/logging.handlers.rst:713 msgid "LOG_DAEMON" msgstr "LOG_DAEMON" -#: ../../library/logging.handlers.rst:712 +#: ../../library/logging.handlers.rst:715 msgid "``ftp``" msgstr "``ftp``" -#: ../../library/logging.handlers.rst:712 +#: ../../library/logging.handlers.rst:715 msgid "LOG_FTP" msgstr "LOG_FTP" -#: ../../library/logging.handlers.rst:714 +#: ../../library/logging.handlers.rst:717 msgid "``kern``" msgstr "``kern``" -#: ../../library/logging.handlers.rst:714 +#: ../../library/logging.handlers.rst:717 msgid "LOG_KERN" msgstr "LOG_KERN" -#: ../../library/logging.handlers.rst:716 +#: ../../library/logging.handlers.rst:719 msgid "``lpr``" msgstr "``lpr``" -#: ../../library/logging.handlers.rst:716 +#: ../../library/logging.handlers.rst:719 msgid "LOG_LPR" msgstr "LOG_LPR" -#: ../../library/logging.handlers.rst:718 +#: ../../library/logging.handlers.rst:721 msgid "``mail``" msgstr "``mail``" -#: ../../library/logging.handlers.rst:718 +#: ../../library/logging.handlers.rst:721 msgid "LOG_MAIL" msgstr "LOG_MAIL" -#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:723 msgid "``news``" msgstr "``news``" -#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:723 msgid "LOG_NEWS" msgstr "LOG_NEWS" -#: ../../library/logging.handlers.rst:722 +#: ../../library/logging.handlers.rst:725 msgid "``syslog``" msgstr "``syslog``" -#: ../../library/logging.handlers.rst:722 +#: ../../library/logging.handlers.rst:725 msgid "LOG_SYSLOG" msgstr "LOG_SYSLOG" -#: ../../library/logging.handlers.rst:724 +#: ../../library/logging.handlers.rst:727 msgid "``user``" msgstr "``user``" -#: ../../library/logging.handlers.rst:724 +#: ../../library/logging.handlers.rst:727 msgid "LOG_USER" msgstr "LOG_USER" -#: ../../library/logging.handlers.rst:726 +#: ../../library/logging.handlers.rst:729 msgid "``uucp``" msgstr "``uucp``" -#: ../../library/logging.handlers.rst:726 +#: ../../library/logging.handlers.rst:729 msgid "LOG_UUCP" msgstr "LOG_UUCP" -#: ../../library/logging.handlers.rst:728 +#: ../../library/logging.handlers.rst:731 msgid "``local0``" msgstr "``local0``" -#: ../../library/logging.handlers.rst:728 +#: ../../library/logging.handlers.rst:731 msgid "LOG_LOCAL0" msgstr "LOG_LOCAL0" -#: ../../library/logging.handlers.rst:730 +#: ../../library/logging.handlers.rst:733 msgid "``local1``" msgstr "``local1``" -#: ../../library/logging.handlers.rst:730 +#: ../../library/logging.handlers.rst:733 msgid "LOG_LOCAL1" msgstr "LOG_LOCAL1" -#: ../../library/logging.handlers.rst:732 +#: ../../library/logging.handlers.rst:735 msgid "``local2``" msgstr "``local2``" -#: ../../library/logging.handlers.rst:732 +#: ../../library/logging.handlers.rst:735 msgid "LOG_LOCAL2" msgstr "LOG_LOCAL2" -#: ../../library/logging.handlers.rst:734 +#: ../../library/logging.handlers.rst:737 msgid "``local3``" msgstr "``local3``" -#: ../../library/logging.handlers.rst:734 +#: ../../library/logging.handlers.rst:737 msgid "LOG_LOCAL3" msgstr "LOG_LOCAL3" -#: ../../library/logging.handlers.rst:736 +#: ../../library/logging.handlers.rst:739 msgid "``local4``" msgstr "``local4``" -#: ../../library/logging.handlers.rst:736 +#: ../../library/logging.handlers.rst:739 msgid "LOG_LOCAL4" msgstr "LOG_LOCAL4" -#: ../../library/logging.handlers.rst:738 +#: ../../library/logging.handlers.rst:741 msgid "``local5``" msgstr "``local5``" -#: ../../library/logging.handlers.rst:738 +#: ../../library/logging.handlers.rst:741 msgid "LOG_LOCAL5" msgstr "LOG_LOCAL5" -#: ../../library/logging.handlers.rst:740 +#: ../../library/logging.handlers.rst:743 msgid "``local6``" msgstr "``local6``" -#: ../../library/logging.handlers.rst:740 +#: ../../library/logging.handlers.rst:743 msgid "LOG_LOCAL6" msgstr "LOG_LOCAL6" -#: ../../library/logging.handlers.rst:742 +#: ../../library/logging.handlers.rst:745 msgid "``local7``" msgstr "``local7``" -#: ../../library/logging.handlers.rst:742 +#: ../../library/logging.handlers.rst:745 msgid "LOG_LOCAL7" msgstr "LOG_LOCAL7" -#: ../../library/logging.handlers.rst:747 +#: ../../library/logging.handlers.rst:750 msgid "" "Maps a logging level name to a syslog priority name. You may need to " "override this if you are using custom levels, or if the default algorithm is " @@ -1114,11 +1120,11 @@ msgid "" "all other level names to 'warning'." msgstr "" -#: ../../library/logging.handlers.rst:757 +#: ../../library/logging.handlers.rst:760 msgid "NTEventLogHandler" msgstr "NTEventLogHandler" -#: ../../library/logging.handlers.rst:759 +#: ../../library/logging.handlers.rst:762 msgid "" "The :class:`NTEventLogHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a local Windows NT, Windows " @@ -1126,7 +1132,7 @@ msgid "" "Win32 extensions for Python installed." msgstr "" -#: ../../library/logging.handlers.rst:767 +#: ../../library/logging.handlers.rst:770 msgid "" "Returns a new instance of the :class:`NTEventLogHandler` class. The " "*appname* is used to define the application name as it appears in the event " @@ -1142,7 +1148,7 @@ msgid "" "or ``'Security'``, and defaults to ``'Application'``." msgstr "" -#: ../../library/logging.handlers.rst:783 +#: ../../library/logging.handlers.rst:786 msgid "" "At this point, you can remove the application name from the registry as a " "source of event log entries. However, if you do this, you will not be able " @@ -1151,19 +1157,19 @@ msgid "" "not do this." msgstr "" -#: ../../library/logging.handlers.rst:792 +#: ../../library/logging.handlers.rst:795 msgid "" "Determines the message ID, event category and event type, and then logs the " "message in the NT event log." msgstr "" -#: ../../library/logging.handlers.rst:798 +#: ../../library/logging.handlers.rst:801 msgid "" "Returns the event category for the record. Override this if you want to " "specify your own categories. This version returns 0." msgstr "" -#: ../../library/logging.handlers.rst:804 +#: ../../library/logging.handlers.rst:807 msgid "" "Returns the event type for the record. Override this if you want to specify " "your own types. This version does a mapping using the handler's typemap " @@ -1174,7 +1180,7 @@ msgid "" "the handler's *typemap* attribute." msgstr "" -#: ../../library/logging.handlers.rst:815 +#: ../../library/logging.handlers.rst:818 msgid "" "Returns the message ID for the record. If you are using your own messages, " "you could do this by having the *msg* passed to the logger being an ID " @@ -1183,17 +1189,17 @@ msgid "" "message ID in :file:`win32service.pyd`." msgstr "" -#: ../../library/logging.handlers.rst:824 +#: ../../library/logging.handlers.rst:827 msgid "SMTPHandler" msgstr "SMTPHandler" -#: ../../library/logging.handlers.rst:826 +#: ../../library/logging.handlers.rst:829 msgid "" "The :class:`SMTPHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to an email address via SMTP." msgstr "" -#: ../../library/logging.handlers.rst:832 +#: ../../library/logging.handlers.rst:835 msgid "" "Returns a new instance of the :class:`SMTPHandler` class. The instance is " "initialized with the from and to addresses and subject line of the email. " @@ -1204,7 +1210,7 @@ msgid "" "*credentials* argument." msgstr "" -#: ../../library/logging.handlers.rst:839 +#: ../../library/logging.handlers.rst:842 msgid "" "To specify the use of a secure protocol (TLS), pass in a tuple to the " "*secure* argument. This will only be used when authentication credentials " @@ -1214,31 +1220,31 @@ msgid "" "SMTP.starttls` method.)" msgstr "" -#: ../../library/logging.handlers.rst:846 +#: ../../library/logging.handlers.rst:849 msgid "" "A timeout can be specified for communication with the SMTP server using the " "*timeout* argument." msgstr "" -#: ../../library/logging.handlers.rst:849 +#: ../../library/logging.handlers.rst:852 msgid "The *timeout* argument was added." msgstr "新增 *timeout* 引數。" -#: ../../library/logging.handlers.rst:854 +#: ../../library/logging.handlers.rst:857 msgid "Formats the record and sends it to the specified addressees." msgstr "" -#: ../../library/logging.handlers.rst:859 +#: ../../library/logging.handlers.rst:862 msgid "" "If you want to specify a subject line which is record-dependent, override " "this method." msgstr "" -#: ../../library/logging.handlers.rst:865 +#: ../../library/logging.handlers.rst:868 msgid "MemoryHandler" msgstr "MemoryHandler" -#: ../../library/logging.handlers.rst:867 +#: ../../library/logging.handlers.rst:870 msgid "" "The :class:`MemoryHandler` class, located in the :mod:`logging.handlers` " "module, supports buffering of logging records in memory, periodically " @@ -1246,7 +1252,7 @@ msgid "" "buffer is full, or when an event of a certain severity or greater is seen." msgstr "" -#: ../../library/logging.handlers.rst:872 +#: ../../library/logging.handlers.rst:875 msgid "" ":class:`MemoryHandler` is a subclass of the more general :class:" "`BufferingHandler`, which is an abstract class. This buffers logging records " @@ -1255,31 +1261,31 @@ msgid "" "should, then :meth:`flush` is expected to do the flushing." msgstr "" -#: ../../library/logging.handlers.rst:881 +#: ../../library/logging.handlers.rst:884 msgid "" "Initializes the handler with a buffer of the specified capacity. Here, " "*capacity* means the number of logging records buffered." msgstr "" -#: ../../library/logging.handlers.rst:887 +#: ../../library/logging.handlers.rst:890 msgid "" "Append the record to the buffer. If :meth:`shouldFlush` returns true, call :" "meth:`flush` to process the buffer." msgstr "" -#: ../../library/logging.handlers.rst:893 +#: ../../library/logging.handlers.rst:896 msgid "" "You can override this to implement custom flushing behavior. This version " "just zaps the buffer to empty." msgstr "" -#: ../../library/logging.handlers.rst:899 +#: ../../library/logging.handlers.rst:902 msgid "" "Return ``True`` if the buffer is up to capacity. This method can be " "overridden to implement custom flushing strategies." msgstr "" -#: ../../library/logging.handlers.rst:905 +#: ../../library/logging.handlers.rst:908 msgid "" "Returns a new instance of the :class:`MemoryHandler` class. The instance is " "initialized with a buffer size of *capacity* (number of records buffered). " @@ -1291,41 +1297,41 @@ msgid "" "the buffer will occur when the handler is closed." msgstr "" -#: ../../library/logging.handlers.rst:914 +#: ../../library/logging.handlers.rst:917 msgid "The *flushOnClose* parameter was added." msgstr "新增 *flushOnClose* 參數。" -#: ../../library/logging.handlers.rst:920 +#: ../../library/logging.handlers.rst:923 msgid "Calls :meth:`flush`, sets the target to ``None`` and clears the buffer." msgstr "" -#: ../../library/logging.handlers.rst:926 +#: ../../library/logging.handlers.rst:929 msgid "" "For a :class:`MemoryHandler`, flushing means just sending the buffered " "records to the target, if there is one. The buffer is also cleared when this " "happens. Override if you want different behavior." msgstr "" -#: ../../library/logging.handlers.rst:933 +#: ../../library/logging.handlers.rst:936 msgid "Sets the target handler for this handler." msgstr "" -#: ../../library/logging.handlers.rst:938 +#: ../../library/logging.handlers.rst:941 msgid "Checks for buffer full or a record at the *flushLevel* or higher." msgstr "" -#: ../../library/logging.handlers.rst:944 +#: ../../library/logging.handlers.rst:947 msgid "HTTPHandler" msgstr "HTTPHandler" -#: ../../library/logging.handlers.rst:946 +#: ../../library/logging.handlers.rst:949 msgid "" "The :class:`HTTPHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a web server, using either " "``GET`` or ``POST`` semantics." msgstr "" -#: ../../library/logging.handlers.rst:953 +#: ../../library/logging.handlers.rst:956 msgid "" "Returns a new instance of the :class:`HTTPHandler` class. The *host* can be " "of the form ``host:port``, should you need to use a specific port number. " @@ -1339,11 +1345,11 @@ msgid "" "cleartext across the wire." msgstr "" -#: ../../library/logging.handlers.rst:964 +#: ../../library/logging.handlers.rst:967 msgid "The *context* parameter was added." msgstr "新增 *context* 參數。" -#: ../../library/logging.handlers.rst:969 +#: ../../library/logging.handlers.rst:972 msgid "" "Provides a dictionary, based on ``record``, which is to be URL-encoded and " "sent to the web server. The default implementation just returns ``record." @@ -1352,14 +1358,14 @@ msgid "" "customization of what's sent to the server is required." msgstr "" -#: ../../library/logging.handlers.rst:977 +#: ../../library/logging.handlers.rst:980 msgid "" "Sends the record to the web server as a URL-encoded dictionary. The :meth:" "`mapLogRecord` method is used to convert the record to the dictionary to be " "sent." msgstr "" -#: ../../library/logging.handlers.rst:981 +#: ../../library/logging.handlers.rst:984 msgid "" "Since preparing a record for sending it to a web server is not the same as a " "generic formatting operation, using :meth:`~logging.Handler.setFormatter` to " @@ -1369,18 +1375,18 @@ msgid "" "the dictionary in a form suitable for sending to a web server." msgstr "" -#: ../../library/logging.handlers.rst:994 +#: ../../library/logging.handlers.rst:997 msgid "QueueHandler" msgstr "QueueHandler" -#: ../../library/logging.handlers.rst:998 +#: ../../library/logging.handlers.rst:1001 msgid "" "The :class:`QueueHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a queue, such as those " "implemented in the :mod:`queue` or :mod:`multiprocessing` modules." msgstr "" -#: ../../library/logging.handlers.rst:1002 +#: ../../library/logging.handlers.rst:1005 msgid "" "Along with the :class:`QueueListener` class, :class:`QueueHandler` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1390,7 +1396,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1011 +#: ../../library/logging.handlers.rst:1014 msgid "" "Returns a new instance of the :class:`QueueHandler` class. The instance is " "initialized with the queue to send messages to. The *queue* can be any queue-" @@ -1400,7 +1406,7 @@ msgid "" "instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1021 +#: ../../library/logging.handlers.rst:1024 msgid "" "Enqueues the result of preparing the LogRecord. Should an exception occur (e." "g. because a bounded queue has filled up), the :meth:`~logging.Handler." @@ -1410,38 +1416,38 @@ msgid "" "raiseExceptions` is ``True``)." msgstr "" -#: ../../library/logging.handlers.rst:1030 +#: ../../library/logging.handlers.rst:1033 msgid "" "Prepares a record for queuing. The object returned by this method is " "enqueued." msgstr "" -#: ../../library/logging.handlers.rst:1033 +#: ../../library/logging.handlers.rst:1036 msgid "" "The base implementation formats the record to merge the message, arguments, " "and exception information, if present. It also removes unpickleable items " "from the record in-place." msgstr "" -#: ../../library/logging.handlers.rst:1037 +#: ../../library/logging.handlers.rst:1040 msgid "" "You might want to override this method if you want to convert the record to " "a dict or JSON string, or send a modified copy of the record while leaving " "the original intact." msgstr "" -#: ../../library/logging.handlers.rst:1043 +#: ../../library/logging.handlers.rst:1046 msgid "" "Enqueues the record on the queue using ``put_nowait()``; you may want to " "override this if you want to use blocking behaviour, or a timeout, or a " "customized queue implementation." msgstr "" -#: ../../library/logging.handlers.rst:1052 +#: ../../library/logging.handlers.rst:1055 msgid "QueueListener" msgstr "QueueListener" -#: ../../library/logging.handlers.rst:1056 +#: ../../library/logging.handlers.rst:1059 msgid "" "The :class:`QueueListener` class, located in the :mod:`logging.handlers` " "module, supports receiving logging messages from a queue, such as those " @@ -1452,7 +1458,7 @@ msgid "" "works hand-in-hand with :class:`QueueHandler`." msgstr "" -#: ../../library/logging.handlers.rst:1064 +#: ../../library/logging.handlers.rst:1067 msgid "" "Along with the :class:`QueueHandler` class, :class:`QueueListener` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1462,7 +1468,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1073 +#: ../../library/logging.handlers.rst:1076 msgid "" "Returns a new instance of the :class:`QueueListener` class. The instance is " "initialized with the queue to send messages to and a list of handlers which " @@ -1473,7 +1479,7 @@ msgid "" "class:`~queue.SimpleQueue` instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1081 +#: ../../library/logging.handlers.rst:1084 msgid "" "If ``respect_handler_level`` is ``True``, a handler's level is respected " "(compared with the level for the message) when deciding whether to pass " @@ -1481,82 +1487,82 @@ msgid "" "versions - to always pass each message to each handler." msgstr "" -#: ../../library/logging.handlers.rst:1086 +#: ../../library/logging.handlers.rst:1089 msgid "The ``respect_handler_level`` argument was added." msgstr "新增 ``respect_handler_level`` 引數。" -#: ../../library/logging.handlers.rst:1091 +#: ../../library/logging.handlers.rst:1094 msgid "Dequeues a record and return it, optionally blocking." msgstr "" -#: ../../library/logging.handlers.rst:1093 +#: ../../library/logging.handlers.rst:1096 msgid "" "The base implementation uses ``get()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1099 +#: ../../library/logging.handlers.rst:1102 msgid "Prepare a record for handling." msgstr "" -#: ../../library/logging.handlers.rst:1101 +#: ../../library/logging.handlers.rst:1104 msgid "" "This implementation just returns the passed-in record. You may want to " "override this method if you need to do any custom marshalling or " "manipulation of the record before passing it to the handlers." msgstr "" -#: ../../library/logging.handlers.rst:1107 +#: ../../library/logging.handlers.rst:1110 msgid "Handle a record." msgstr "" -#: ../../library/logging.handlers.rst:1109 +#: ../../library/logging.handlers.rst:1112 msgid "" "This just loops through the handlers offering them the record to handle. The " "actual object passed to the handlers is that which is returned from :meth:" "`prepare`." msgstr "" -#: ../../library/logging.handlers.rst:1115 +#: ../../library/logging.handlers.rst:1118 msgid "Starts the listener." msgstr "" -#: ../../library/logging.handlers.rst:1117 +#: ../../library/logging.handlers.rst:1120 msgid "" "This starts up a background thread to monitor the queue for LogRecords to " "process." msgstr "" -#: ../../library/logging.handlers.rst:1122 +#: ../../library/logging.handlers.rst:1125 msgid "Stops the listener." msgstr "" -#: ../../library/logging.handlers.rst:1124 +#: ../../library/logging.handlers.rst:1127 msgid "" "This asks the thread to terminate, and then waits for it to do so. Note that " "if you don't call this before your application exits, there may be some " "records still left on the queue, which won't be processed." msgstr "" -#: ../../library/logging.handlers.rst:1130 +#: ../../library/logging.handlers.rst:1133 msgid "" "Writes a sentinel to the queue to tell the listener to quit. This " "implementation uses ``put_nowait()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1141 +#: ../../library/logging.handlers.rst:1144 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../library/logging.handlers.rst:1141 +#: ../../library/logging.handlers.rst:1144 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.handlers.rst:1143 +#: ../../library/logging.handlers.rst:1146 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../library/logging.handlers.rst:1144 +#: ../../library/logging.handlers.rst:1147 msgid "Configuration API for the logging module." msgstr "" diff --git a/library/os.po b/library/os.po index e2d55afd60..12e99f60c8 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-30 00:08+0000\n" +"POT-Creation-Date: 2022-01-08 00:09+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1080,7 +1080,8 @@ msgstr "" #: ../../library/os.rst:954 msgid "See also :func:`set_blocking` and :meth:`socket.socket.setblocking`." -msgstr "另請參閱 :func:`set_blocking` 與 :meth:`socket.socket.setblocking`\\ 。" +msgstr "" +"另請參閱 :func:`set_blocking` 與 :meth:`socket.socket.setblocking`\\ 。" #: ../../library/os.rst:963 msgid "" @@ -1543,7 +1544,8 @@ msgstr "" #: ../../library/os.rst:1414 msgid "See also :func:`get_blocking` and :meth:`socket.socket.setblocking`." -msgstr "另請參閱 :func:`get_blocking` 與 :meth:`socket.socket.setblocking`\\ 。" +msgstr "" +"另請參閱 :func:`get_blocking` 與 :meth:`socket.socket.setblocking`\\ 。" #: ../../library/os.rst:1425 msgid "" @@ -4612,30 +4614,30 @@ msgid "" msgstr "" #: ../../library/os.rst:4247 -msgid ":attr:`user` - user time" +msgid ":attr:`!user` - user time" msgstr "" #: ../../library/os.rst:4248 -msgid ":attr:`system` - system time" -msgstr "" +msgid ":attr:`!system` - system time" +msgstr ":attr:`!system` - 系統時間" #: ../../library/os.rst:4249 -msgid ":attr:`children_user` - user time of all child processes" +msgid ":attr:`!children_user` - user time of all child processes" msgstr "" #: ../../library/os.rst:4250 -msgid ":attr:`children_system` - system time of all child processes" +msgid ":attr:`!children_system` - system time of all child processes" msgstr "" #: ../../library/os.rst:4251 -msgid ":attr:`elapsed` - elapsed real time since a fixed point in the past" +msgid ":attr:`!elapsed` - elapsed real time since a fixed point in the past" msgstr "" #: ../../library/os.rst:4253 msgid "" "For backwards compatibility, this object also behaves like a five-tuple " -"containing :attr:`user`, :attr:`system`, :attr:`children_user`, :attr:" -"`children_system`, and :attr:`elapsed` in that order." +"containing :attr:`!user`, :attr:`!system`, :attr:`!children_user`, :attr:`!" +"children_system`, and :attr:`!elapsed` in that order." msgstr "" #: ../../library/os.rst:4257 @@ -4643,8 +4645,8 @@ msgid "" "See the Unix manual page :manpage:`times(2)` and :manpage:`times(3)` manual " "page on Unix or `the GetProcessTimes MSDN `_ " -"on Windows. On Windows, only :attr:`user` and :attr:`system` are known; the " -"other attributes are zero." +"on Windows. On Windows, only :attr:`!user` and :attr:`!system` are known; " +"the other attributes are zero." msgstr "" #: ../../library/os.rst:4271 diff --git a/library/pdb.po b/library/pdb.po index b96e424d27..714a36023c 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-01-08 00:09+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -85,35 +85,33 @@ msgid "" msgstr "" #: ../../library/pdb.rst:70 -msgid "" -"The typical usage to break into the debugger from a running program is to " -"insert ::" +msgid "The typical usage to break into the debugger is to insert::" msgstr "" -#: ../../library/pdb.rst:75 +#: ../../library/pdb.rst:74 msgid "" -"at the location you want to break into the debugger. You can then step " -"through the code following this statement, and continue running without the " -"debugger using the :pdbcmd:`continue` command." +"at the location you want to break into the debugger, and then run the " +"program. You can then step through the code following this statement, and " +"continue running without the debugger using the :pdbcmd:`continue` command." msgstr "" -#: ../../library/pdb.rst:79 +#: ../../library/pdb.rst:78 msgid "" "The built-in :func:`breakpoint()`, when called with defaults, can be used " "instead of ``import pdb; pdb.set_trace()``." msgstr "" -#: ../../library/pdb.rst:83 +#: ../../library/pdb.rst:82 msgid "The typical usage to inspect a crashed program is::" msgstr "" -#: ../../library/pdb.rst:101 +#: ../../library/pdb.rst:100 msgid "" "The module defines the following functions; each enters the debugger in a " "slightly different way:" msgstr "" -#: ../../library/pdb.rst:106 +#: ../../library/pdb.rst:105 msgid "" "Execute the *statement* (given as a string or a code object) under debugger " "control. The debugger prompt appears before any code is executed; you can " @@ -125,14 +123,14 @@ msgid "" "`exec` or :func:`eval` functions.)" msgstr "" -#: ../../library/pdb.rst:118 +#: ../../library/pdb.rst:117 msgid "" "Evaluate the *expression* (given as a string or a code object) under " "debugger control. When :func:`runeval` returns, it returns the value of the " "expression. Otherwise this function is similar to :func:`run`." msgstr "" -#: ../../library/pdb.rst:125 +#: ../../library/pdb.rst:124 msgid "" "Call the *function* (a function or method object, not a string) with the " "given arguments. When :func:`runcall` returns, it returns whatever the " @@ -140,7 +138,7 @@ msgid "" "is entered." msgstr "" -#: ../../library/pdb.rst:133 +#: ../../library/pdb.rst:132 msgid "" "Enter the debugger at the calling stack frame. This is useful to hard-code " "a breakpoint at a given point in a program, even if the code is not " @@ -148,11 +146,11 @@ msgid "" "is printed to the console just before debugging begins." msgstr "" -#: ../../library/pdb.rst:138 +#: ../../library/pdb.rst:137 msgid "The keyword-only argument *header*." msgstr "" -#: ../../library/pdb.rst:144 +#: ../../library/pdb.rst:143 msgid "" "Enter post-mortem debugging of the given *traceback* object. If no " "*traceback* is given, it uses the one of the exception that is currently " @@ -160,37 +158,37 @@ msgid "" "used)." msgstr "" -#: ../../library/pdb.rst:152 +#: ../../library/pdb.rst:151 msgid "" "Enter post-mortem debugging of the traceback found in :data:`sys." "last_traceback`." msgstr "" -#: ../../library/pdb.rst:156 +#: ../../library/pdb.rst:155 msgid "" "The ``run*`` functions and :func:`set_trace` are aliases for instantiating " "the :class:`Pdb` class and calling the method of the same name. If you want " "to access further features, you have to do this yourself:" msgstr "" -#: ../../library/pdb.rst:163 +#: ../../library/pdb.rst:162 msgid ":class:`Pdb` is the debugger class." msgstr "" -#: ../../library/pdb.rst:165 +#: ../../library/pdb.rst:164 msgid "" "The *completekey*, *stdin* and *stdout* arguments are passed to the " "underlying :class:`cmd.Cmd` class; see the description there." msgstr "" -#: ../../library/pdb.rst:168 +#: ../../library/pdb.rst:167 msgid "" "The *skip* argument, if given, must be an iterable of glob-style module name " "patterns. The debugger will not step into frames that originate in a module " "that matches one of these patterns. [1]_" msgstr "" -#: ../../library/pdb.rst:172 +#: ../../library/pdb.rst:171 msgid "" "By default, Pdb sets a handler for the SIGINT signal (which is sent when the " "user presses :kbd:`Ctrl-C` on the console) when you give a ``continue`` " @@ -199,43 +197,43 @@ msgid "" "to true." msgstr "" -#: ../../library/pdb.rst:177 +#: ../../library/pdb.rst:176 msgid "" "The *readrc* argument defaults to true and controls whether Pdb will load ." "pdbrc files from the filesystem." msgstr "" -#: ../../library/pdb.rst:180 +#: ../../library/pdb.rst:179 msgid "Example call to enable tracing with *skip*::" msgstr "" -#: ../../library/pdb.rst:184 +#: ../../library/pdb.rst:183 msgid "" "Raises an :ref:`auditing event ` ``pdb.Pdb`` with no arguments." msgstr "" -#: ../../library/pdb.rst:186 +#: ../../library/pdb.rst:185 msgid "The *skip* argument." msgstr "" -#: ../../library/pdb.rst:189 +#: ../../library/pdb.rst:188 msgid "" "The *nosigint* argument. Previously, a SIGINT handler was never set by Pdb." msgstr "" -#: ../../library/pdb.rst:193 +#: ../../library/pdb.rst:192 msgid "The *readrc* argument." msgstr "" -#: ../../library/pdb.rst:201 +#: ../../library/pdb.rst:200 msgid "See the documentation for the functions explained above." msgstr "" -#: ../../library/pdb.rst:207 +#: ../../library/pdb.rst:206 msgid "Debugger Commands" msgstr "" -#: ../../library/pdb.rst:209 +#: ../../library/pdb.rst:208 msgid "" "The commands recognized by the debugger are listed below. Most commands can " "be abbreviated to one or two letters as indicated; e.g. ``h(elp)`` means " @@ -247,13 +245,13 @@ msgid "" "are separated by a vertical bar (``|``)." msgstr "" -#: ../../library/pdb.rst:218 +#: ../../library/pdb.rst:217 msgid "" "Entering a blank line repeats the last command entered. Exception: if the " "last command was a :pdbcmd:`list` command, the next 11 lines are listed." msgstr "" -#: ../../library/pdb.rst:221 +#: ../../library/pdb.rst:220 msgid "" "Commands that the debugger doesn't recognize are assumed to be Python " "statements and are executed in the context of the program being debugged. " @@ -264,14 +262,14 @@ msgid "" "is not changed." msgstr "" -#: ../../library/pdb.rst:229 +#: ../../library/pdb.rst:228 msgid "" "The debugger supports :ref:`aliases `. Aliases can have " "parameters which allows one a certain level of adaptability to the context " "under examination." msgstr "" -#: ../../library/pdb.rst:233 +#: ../../library/pdb.rst:232 msgid "" "Multiple commands may be entered on a single line, separated by ``;;``. (A " "single ``;`` is not used as it is the separator for multiple commands in a " @@ -280,7 +278,7 @@ msgid "" "if it is in the middle of a quoted string." msgstr "" -#: ../../library/pdb.rst:243 +#: ../../library/pdb.rst:242 msgid "" "If a file :file:`.pdbrc` exists in the user's home directory or in the " "current directory, it is read in and executed as if it had been typed at the " @@ -289,14 +287,14 @@ msgid "" "can be overridden by the local file." msgstr "" -#: ../../library/pdb.rst:249 +#: ../../library/pdb.rst:248 msgid "" ":file:`.pdbrc` can now contain commands that continue debugging, such as :" "pdbcmd:`continue` or :pdbcmd:`next`. Previously, these commands had no " "effect." msgstr "" -#: ../../library/pdb.rst:257 +#: ../../library/pdb.rst:256 msgid "" "Without argument, print the list of available commands. With a *command* as " "argument, print help about that command. ``help pdb`` displays the full " @@ -305,25 +303,25 @@ msgid "" "the ``!`` command." msgstr "" -#: ../../library/pdb.rst:265 +#: ../../library/pdb.rst:264 msgid "" "Print a stack trace, with the most recent frame at the bottom. An arrow " "indicates the current frame, which determines the context of most commands." msgstr "" -#: ../../library/pdb.rst:270 +#: ../../library/pdb.rst:269 msgid "" "Move the current frame *count* (default one) levels down in the stack trace " "(to a newer frame)." msgstr "" -#: ../../library/pdb.rst:275 +#: ../../library/pdb.rst:274 msgid "" "Move the current frame *count* (default one) levels up in the stack trace " "(to an older frame)." msgstr "" -#: ../../library/pdb.rst:280 +#: ../../library/pdb.rst:279 msgid "" "With a *lineno* argument, set a break there in the current file. With a " "*function* argument, set a break at the first executable statement within " @@ -334,33 +332,33 @@ msgid "" "refer." msgstr "" -#: ../../library/pdb.rst:287 +#: ../../library/pdb.rst:286 msgid "" "If a second argument is present, it is an expression which must evaluate to " "true before the breakpoint is honored." msgstr "" -#: ../../library/pdb.rst:290 +#: ../../library/pdb.rst:289 msgid "" "Without argument, list all breaks, including for each breakpoint, the number " "of times that breakpoint has been hit, the current ignore count, and the " "associated condition if any." msgstr "" -#: ../../library/pdb.rst:296 +#: ../../library/pdb.rst:295 msgid "" "Temporary breakpoint, which is removed automatically when it is first hit. " "The arguments are the same as for :pdbcmd:`break`." msgstr "" -#: ../../library/pdb.rst:301 +#: ../../library/pdb.rst:300 msgid "" "With a *filename:lineno* argument, clear all the breakpoints at this line. " "With a space separated list of breakpoint numbers, clear those breakpoints. " "Without argument, clear all breaks (but first ask confirmation)." msgstr "" -#: ../../library/pdb.rst:307 +#: ../../library/pdb.rst:306 msgid "" "Disable the breakpoints given as a space separated list of breakpoint " "numbers. Disabling a breakpoint means it cannot cause the program to stop " @@ -368,11 +366,11 @@ msgid "" "breakpoints and can be (re-)enabled." msgstr "" -#: ../../library/pdb.rst:314 +#: ../../library/pdb.rst:313 msgid "Enable the breakpoints specified." msgstr "" -#: ../../library/pdb.rst:318 +#: ../../library/pdb.rst:317 msgid "" "Set the ignore count for the given breakpoint number. If count is omitted, " "the ignore count is set to 0. A breakpoint becomes active when the ignore " @@ -381,39 +379,39 @@ msgid "" "condition evaluates to true." msgstr "" -#: ../../library/pdb.rst:326 +#: ../../library/pdb.rst:325 msgid "" "Set a new *condition* for the breakpoint, an expression which must evaluate " "to true before the breakpoint is honored. If *condition* is absent, any " "existing condition is removed; i.e., the breakpoint is made unconditional." msgstr "" -#: ../../library/pdb.rst:332 +#: ../../library/pdb.rst:331 msgid "" "Specify a list of commands for breakpoint number *bpnumber*. The commands " "themselves appear on the following lines. Type a line containing just " "``end`` to terminate the commands. An example::" msgstr "" -#: ../../library/pdb.rst:341 +#: ../../library/pdb.rst:340 msgid "" "To remove all commands from a breakpoint, type ``commands`` and follow it " "immediately with ``end``; that is, give no commands." msgstr "" -#: ../../library/pdb.rst:344 +#: ../../library/pdb.rst:343 msgid "" "With no *bpnumber* argument, ``commands`` refers to the last breakpoint set." msgstr "" -#: ../../library/pdb.rst:346 +#: ../../library/pdb.rst:345 msgid "" "You can use breakpoint commands to start your program up again. Simply use " "the :pdbcmd:`continue` command, or :pdbcmd:`step`, or any other command that " "resumes execution." msgstr "" -#: ../../library/pdb.rst:350 +#: ../../library/pdb.rst:349 msgid "" "Specifying any command resuming execution (currently :pdbcmd:`continue`, :" "pdbcmd:`step`, :pdbcmd:`next`, :pdbcmd:`return`, :pdbcmd:`jump`, :pdbcmd:" @@ -424,7 +422,7 @@ msgid "" "ambiguities about which list to execute." msgstr "" -#: ../../library/pdb.rst:359 +#: ../../library/pdb.rst:358 msgid "" "If you use the 'silent' command in the command list, the usual message about " "stopping at a breakpoint is not printed. This may be desirable for " @@ -433,13 +431,13 @@ msgid "" "was reached." msgstr "" -#: ../../library/pdb.rst:366 +#: ../../library/pdb.rst:365 msgid "" "Execute the current line, stop at the first possible occasion (either in a " "function that is called or on the next line in the current function)." msgstr "" -#: ../../library/pdb.rst:371 +#: ../../library/pdb.rst:370 msgid "" "Continue execution until the next line in the current function is reached or " "it returns. (The difference between :pdbcmd:`next` and :pdbcmd:`step` is " @@ -448,46 +446,46 @@ msgid "" "line in the current function.)" msgstr "" -#: ../../library/pdb.rst:379 +#: ../../library/pdb.rst:378 msgid "" "Without argument, continue execution until the line with a number greater " "than the current one is reached." msgstr "" -#: ../../library/pdb.rst:382 +#: ../../library/pdb.rst:381 msgid "" "With a line number, continue execution until a line with a number greater or " "equal to that is reached. In both cases, also stop when the current frame " "returns." msgstr "" -#: ../../library/pdb.rst:386 +#: ../../library/pdb.rst:385 msgid "Allow giving an explicit line number." msgstr "" -#: ../../library/pdb.rst:391 +#: ../../library/pdb.rst:390 msgid "Continue execution until the current function returns." msgstr "" -#: ../../library/pdb.rst:395 +#: ../../library/pdb.rst:394 msgid "Continue execution, only stop when a breakpoint is encountered." msgstr "" -#: ../../library/pdb.rst:399 +#: ../../library/pdb.rst:398 msgid "" "Set the next line that will be executed. Only available in the bottom-most " "frame. This lets you jump back and execute code again, or jump forward to " "skip code that you don't want to run." msgstr "" -#: ../../library/pdb.rst:403 +#: ../../library/pdb.rst:402 msgid "" "It should be noted that not all jumps are allowed -- for instance it is not " "possible to jump into the middle of a :keyword:`for` loop or out of a :" "keyword:`finally` clause." msgstr "" -#: ../../library/pdb.rst:409 +#: ../../library/pdb.rst:408 msgid "" "List source code for the current file. Without arguments, list 11 lines " "around the current line or continue the previous listing. With ``.`` as " @@ -496,7 +494,7 @@ msgid "" "second argument is less than the first, it is interpreted as a count." msgstr "" -#: ../../library/pdb.rst:415 +#: ../../library/pdb.rst:414 msgid "" "The current line in the current frame is indicated by ``->``. If an " "exception is being debugged, the line where the exception was originally " @@ -504,68 +502,68 @@ msgid "" "line." msgstr "" -#: ../../library/pdb.rst:420 +#: ../../library/pdb.rst:419 msgid "The ``>>`` marker." msgstr "" -#: ../../library/pdb.rst:425 +#: ../../library/pdb.rst:424 msgid "" "List all source code for the current function or frame. Interesting lines " "are marked as for :pdbcmd:`list`." msgstr "" -#: ../../library/pdb.rst:432 +#: ../../library/pdb.rst:431 msgid "Print the argument list of the current function." msgstr "" -#: ../../library/pdb.rst:436 +#: ../../library/pdb.rst:435 msgid "Evaluate the *expression* in the current context and print its value." msgstr "" -#: ../../library/pdb.rst:440 +#: ../../library/pdb.rst:439 msgid "" "``print()`` can also be used, but is not a debugger command --- this " "executes the Python :func:`print` function." msgstr "" -#: ../../library/pdb.rst:446 +#: ../../library/pdb.rst:445 msgid "" "Like the :pdbcmd:`p` command, except the value of the expression is pretty-" "printed using the :mod:`pprint` module." msgstr "" -#: ../../library/pdb.rst:451 +#: ../../library/pdb.rst:450 msgid "Print the type of the *expression*." msgstr "" -#: ../../library/pdb.rst:455 +#: ../../library/pdb.rst:454 msgid "Try to get source code for the given object and display it." msgstr "" -#: ../../library/pdb.rst:461 +#: ../../library/pdb.rst:460 msgid "" "Display the value of the expression if it changed, each time execution stops " "in the current frame." msgstr "" -#: ../../library/pdb.rst:464 +#: ../../library/pdb.rst:463 msgid "Without expression, list all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:470 +#: ../../library/pdb.rst:469 msgid "" "Do not display the expression any more in the current frame. Without " "expression, clear all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:477 +#: ../../library/pdb.rst:476 msgid "" "Start an interactive interpreter (using the :mod:`code` module) whose global " "namespace contains all the (global and local) names found in the current " "scope." msgstr "" -#: ../../library/pdb.rst:487 +#: ../../library/pdb.rst:486 msgid "" "Create an alias called *name* that executes *command*. The command must " "*not* be enclosed in quotes. Replaceable parameters can be indicated by ``" @@ -574,7 +572,7 @@ msgid "" "are given, all aliases are listed." msgstr "" -#: ../../library/pdb.rst:493 +#: ../../library/pdb.rst:492 msgid "" "Aliases may be nested and can contain anything that can be legally typed at " "the pdb prompt. Note that internal pdb commands *can* be overridden by " @@ -583,17 +581,17 @@ msgid "" "other words in the line are left alone." msgstr "" -#: ../../library/pdb.rst:499 +#: ../../library/pdb.rst:498 msgid "" "As an example, here are two useful aliases (especially when placed in the :" "file:`.pdbrc` file)::" msgstr "" -#: ../../library/pdb.rst:509 +#: ../../library/pdb.rst:508 msgid "Delete the specified alias." msgstr "" -#: ../../library/pdb.rst:513 +#: ../../library/pdb.rst:512 msgid "" "Execute the (one-line) *statement* in the context of the current stack " "frame. The exclamation point can be omitted unless the first word of the " @@ -602,7 +600,7 @@ msgid "" "line, e.g.::" msgstr "" -#: ../../library/pdb.rst:525 +#: ../../library/pdb.rst:524 msgid "" "Restart the debugged Python program. If an argument is supplied, it is " "split with :mod:`shlex` and the result is used as the new :data:`sys.argv`. " @@ -610,25 +608,25 @@ msgid "" "`restart` is an alias for :pdbcmd:`run`." msgstr "" -#: ../../library/pdb.rst:532 +#: ../../library/pdb.rst:531 msgid "Quit from the debugger. The program being executed is aborted." msgstr "" -#: ../../library/pdb.rst:536 +#: ../../library/pdb.rst:535 msgid "" "Enter a recursive debugger that steps through the code argument (which is an " "arbitrary expression or statement to be executed in the current environment)." msgstr "" -#: ../../library/pdb.rst:542 +#: ../../library/pdb.rst:541 msgid "Print the return value for the last return of a function." msgstr "" -#: ../../library/pdb.rst:545 +#: ../../library/pdb.rst:544 msgid "Footnotes" msgstr "註解" -#: ../../library/pdb.rst:546 +#: ../../library/pdb.rst:545 msgid "" "Whether a frame is considered to originate in a certain module is determined " "by the ``__name__`` in the frame globals." diff --git a/library/sqlite3.po b/library/sqlite3.po index 0f3a237e32..0df6044423 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-16 00:09+0000\n" +"POT-Creation-Date: 2022-01-09 00:10+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -865,42 +865,41 @@ msgstr "" #: ../../library/sqlite3.rst:769 msgid "" -"This read-only attribute provides the rowid of the last modified row. It is " -"only set if you issued an ``INSERT`` or a ``REPLACE`` statement using the :" -"meth:`execute` method. For operations other than ``INSERT`` or ``REPLACE`` " -"or when :meth:`executemany` is called, :attr:`lastrowid` is set to :const:" -"`None`." +"This read-only attribute provides the row id of the last inserted row. It is " +"only updated after successful ``INSERT`` or ``REPLACE`` statements using " +"the :meth:`execute` method. For other statements, after :meth:`executemany` " +"or :meth:`executescript`, or if the insertion failed, the value of " +"``lastrowid`` is left unchanged. The initial value of ``lastrowid`` is :" +"const:`None`." msgstr "" -#: ../../library/sqlite3.rst:775 -msgid "" -"If the ``INSERT`` or ``REPLACE`` statement failed to insert the previous " -"successful rowid is returned." +#: ../../library/sqlite3.rst:777 +msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:778 +#: ../../library/sqlite3.rst:779 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:783 +#: ../../library/sqlite3.rst:784 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:788 +#: ../../library/sqlite3.rst:789 msgid "" "This read-only attribute provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are :const:`None`." msgstr "" -#: ../../library/sqlite3.rst:792 +#: ../../library/sqlite3.rst:793 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:796 +#: ../../library/sqlite3.rst:797 msgid "" "This read-only attribute provides the SQLite database :class:`Connection` " "used by the :class:`Cursor` object. A :class:`Cursor` object created by " @@ -908,79 +907,79 @@ msgid "" "`connection` attribute that refers to *con*::" msgstr "" -#: ../../library/sqlite3.rst:809 +#: ../../library/sqlite3.rst:810 msgid "Row Objects" msgstr "" -#: ../../library/sqlite3.rst:813 +#: ../../library/sqlite3.rst:814 msgid "" "A :class:`Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It tries to mimic a tuple in " "most of its features." msgstr "" -#: ../../library/sqlite3.rst:817 +#: ../../library/sqlite3.rst:818 msgid "" "It supports mapping access by column name and index, iteration, " "representation, equality testing and :func:`len`." msgstr "" -#: ../../library/sqlite3.rst:820 +#: ../../library/sqlite3.rst:821 msgid "" "If two :class:`Row` objects have exactly the same columns and their members " "are equal, they compare equal." msgstr "" -#: ../../library/sqlite3.rst:825 +#: ../../library/sqlite3.rst:826 msgid "" "This method returns a list of column names. Immediately after a query, it is " "the first member of each tuple in :attr:`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:828 +#: ../../library/sqlite3.rst:829 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:831 +#: ../../library/sqlite3.rst:832 msgid "Let's assume we initialize a table as in the example given above::" msgstr "" -#: ../../library/sqlite3.rst:843 +#: ../../library/sqlite3.rst:844 msgid "Now we plug :class:`Row` in::" msgstr "" -#: ../../library/sqlite3.rst:875 +#: ../../library/sqlite3.rst:876 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:879 +#: ../../library/sqlite3.rst:880 msgid "A subclass of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:883 +#: ../../library/sqlite3.rst:884 msgid "" "The base class of the other exceptions in this module. It is a subclass of :" "exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:888 +#: ../../library/sqlite3.rst:889 msgid "Exception raised for errors that are related to the database." msgstr "" -#: ../../library/sqlite3.rst:892 +#: ../../library/sqlite3.rst:893 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:897 +#: ../../library/sqlite3.rst:898 msgid "" "Exception raised for programming errors, e.g. table not found or already " "exists, syntax error in the SQL statement, wrong number of parameters " "specified, etc. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:903 +#: ../../library/sqlite3.rst:904 msgid "" "Exception raised for errors that are related to the database's operation and " "not necessarily under the control of the programmer, e.g. an unexpected " @@ -988,7 +987,7 @@ msgid "" "not be processed, etc. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:910 +#: ../../library/sqlite3.rst:911 msgid "" "Exception raised in case a method or database API was used which is not " "supported by the database, e.g. calling the :meth:`~Connection.rollback` " @@ -996,82 +995,82 @@ msgid "" "turned off. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:919 +#: ../../library/sqlite3.rst:920 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:923 +#: ../../library/sqlite3.rst:924 msgid "Introduction" msgstr "簡介" -#: ../../library/sqlite3.rst:925 +#: ../../library/sqlite3.rst:926 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:928 +#: ../../library/sqlite3.rst:929 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:931 ../../library/sqlite3.rst:948 +#: ../../library/sqlite3.rst:932 ../../library/sqlite3.rst:949 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:931 ../../library/sqlite3.rst:948 +#: ../../library/sqlite3.rst:932 ../../library/sqlite3.rst:949 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:933 ../../library/sqlite3.rst:950 +#: ../../library/sqlite3.rst:934 ../../library/sqlite3.rst:951 msgid ":const:`None`" msgstr ":const:`None`" -#: ../../library/sqlite3.rst:933 ../../library/sqlite3.rst:950 +#: ../../library/sqlite3.rst:934 ../../library/sqlite3.rst:951 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:935 ../../library/sqlite3.rst:952 +#: ../../library/sqlite3.rst:936 ../../library/sqlite3.rst:953 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:935 ../../library/sqlite3.rst:952 +#: ../../library/sqlite3.rst:936 ../../library/sqlite3.rst:953 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:937 ../../library/sqlite3.rst:954 +#: ../../library/sqlite3.rst:938 ../../library/sqlite3.rst:955 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:937 ../../library/sqlite3.rst:954 +#: ../../library/sqlite3.rst:938 ../../library/sqlite3.rst:955 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:939 +#: ../../library/sqlite3.rst:940 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:939 ../../library/sqlite3.rst:956 +#: ../../library/sqlite3.rst:940 ../../library/sqlite3.rst:957 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:941 ../../library/sqlite3.rst:959 +#: ../../library/sqlite3.rst:942 ../../library/sqlite3.rst:960 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:941 ../../library/sqlite3.rst:959 +#: ../../library/sqlite3.rst:942 ../../library/sqlite3.rst:960 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:945 +#: ../../library/sqlite3.rst:946 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:956 +#: ../../library/sqlite3.rst:957 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:962 +#: ../../library/sqlite3.rst:963 msgid "" "The type system of the :mod:`sqlite3` module is extensible in two ways: you " "can store additional Python types in a SQLite database via object " @@ -1079,11 +1078,11 @@ msgid "" "to different Python types via converters." msgstr "" -#: ../../library/sqlite3.rst:969 +#: ../../library/sqlite3.rst:970 msgid "Using adapters to store additional Python types in SQLite databases" msgstr "" -#: ../../library/sqlite3.rst:971 +#: ../../library/sqlite3.rst:972 msgid "" "As described before, SQLite supports only a limited set of types natively. " "To use other Python types with SQLite, you must **adapt** them to one of the " @@ -1091,23 +1090,23 @@ msgid "" "str, bytes." msgstr "" -#: ../../library/sqlite3.rst:976 +#: ../../library/sqlite3.rst:977 msgid "" "There are two ways to enable the :mod:`sqlite3` module to adapt a custom " "Python type to one of the supported ones." msgstr "" -#: ../../library/sqlite3.rst:981 +#: ../../library/sqlite3.rst:982 msgid "Letting your object adapt itself" msgstr "" -#: ../../library/sqlite3.rst:983 +#: ../../library/sqlite3.rst:984 msgid "" "This is a good approach if you write the class yourself. Let's suppose you " "have a class like this::" msgstr "" -#: ../../library/sqlite3.rst:990 +#: ../../library/sqlite3.rst:991 msgid "" "Now you want to store the point in a single SQLite column. First you'll " "have to choose one of the supported types to be used for representing the " @@ -1117,18 +1116,18 @@ msgid "" "class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1000 +#: ../../library/sqlite3.rst:1001 msgid "Registering an adapter callable" msgstr "" -#: ../../library/sqlite3.rst:1002 +#: ../../library/sqlite3.rst:1003 msgid "" "The other possibility is to create a function that converts the type to the " "string representation and register the function with :meth:" "`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1007 +#: ../../library/sqlite3.rst:1008 msgid "" "The :mod:`sqlite3` module has two default adapters for Python's built-in :" "class:`datetime.date` and :class:`datetime.datetime` types. Now let's " @@ -1136,100 +1135,100 @@ msgid "" "representation, but as a Unix timestamp." msgstr "" -#: ../../library/sqlite3.rst:1016 +#: ../../library/sqlite3.rst:1017 msgid "Converting SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1018 +#: ../../library/sqlite3.rst:1019 msgid "" "Writing an adapter lets you send custom Python types to SQLite. But to make " "it really useful we need to make the Python to SQLite to Python roundtrip " "work." msgstr "" -#: ../../library/sqlite3.rst:1021 +#: ../../library/sqlite3.rst:1022 msgid "Enter converters." msgstr "" -#: ../../library/sqlite3.rst:1023 +#: ../../library/sqlite3.rst:1024 msgid "" "Let's go back to the :class:`Point` class. We stored the x and y coordinates " "separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1026 +#: ../../library/sqlite3.rst:1027 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1031 +#: ../../library/sqlite3.rst:1032 msgid "" "Converter functions **always** get called with a :class:`bytes` object, no " "matter under which data type you sent the value to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1040 +#: ../../library/sqlite3.rst:1041 msgid "" "Now you need to make the :mod:`sqlite3` module know that what you select " "from the database is actually a point. There are two ways of doing this:" msgstr "" -#: ../../library/sqlite3.rst:1043 +#: ../../library/sqlite3.rst:1044 msgid "Implicitly via the declared type" msgstr "" -#: ../../library/sqlite3.rst:1045 +#: ../../library/sqlite3.rst:1046 msgid "Explicitly via the column name" msgstr "" -#: ../../library/sqlite3.rst:1047 +#: ../../library/sqlite3.rst:1048 msgid "" "Both ways are described in section :ref:`sqlite3-module-contents`, in the " "entries for the constants :const:`PARSE_DECLTYPES` and :const:" "`PARSE_COLNAMES`." msgstr "" -#: ../../library/sqlite3.rst:1050 +#: ../../library/sqlite3.rst:1051 msgid "The following example illustrates both approaches." msgstr "" -#: ../../library/sqlite3.rst:1056 +#: ../../library/sqlite3.rst:1057 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1058 +#: ../../library/sqlite3.rst:1059 msgid "" "There are default adapters for the date and datetime types in the datetime " "module. They will be sent as ISO dates/ISO timestamps to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1061 +#: ../../library/sqlite3.rst:1062 msgid "" "The default converters are registered under the name \"date\" for :class:" "`datetime.date` and under the name \"timestamp\" for :class:`datetime." "datetime`." msgstr "" -#: ../../library/sqlite3.rst:1065 +#: ../../library/sqlite3.rst:1066 msgid "" "This way, you can use date/timestamps from Python without any additional " "fiddling in most cases. The format of the adapters is also compatible with " "the experimental SQLite date/time functions." msgstr "" -#: ../../library/sqlite3.rst:1069 +#: ../../library/sqlite3.rst:1070 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1073 +#: ../../library/sqlite3.rst:1074 msgid "" "If a timestamp stored in SQLite has a fractional part longer than 6 numbers, " "its value will be truncated to microsecond precision by the timestamp " "converter." msgstr "" -#: ../../library/sqlite3.rst:1079 +#: ../../library/sqlite3.rst:1080 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1237,17 +1236,17 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1087 +#: ../../library/sqlite3.rst:1088 msgid "Controlling Transactions" msgstr "" -#: ../../library/sqlite3.rst:1089 +#: ../../library/sqlite3.rst:1090 msgid "" "The underlying ``sqlite3`` library operates in ``autocommit`` mode by " "default, but the Python :mod:`sqlite3` module by default does not." msgstr "" -#: ../../library/sqlite3.rst:1092 +#: ../../library/sqlite3.rst:1093 msgid "" "``autocommit`` mode means that statements that modify the database take " "effect immediately. A ``BEGIN`` or ``SAVEPOINT`` statement disables " @@ -1255,14 +1254,14 @@ msgid "" "ends the outermost transaction, turns ``autocommit`` mode back on." msgstr "" -#: ../../library/sqlite3.rst:1097 +#: ../../library/sqlite3.rst:1098 msgid "" "The Python :mod:`sqlite3` module by default issues a ``BEGIN`` statement " "implicitly before a Data Modification Language (DML) statement (i.e. " "``INSERT``/``UPDATE``/``DELETE``/``REPLACE``)." msgstr "" -#: ../../library/sqlite3.rst:1101 +#: ../../library/sqlite3.rst:1102 msgid "" "You can control which kind of ``BEGIN`` statements :mod:`sqlite3` implicitly " "executes via the *isolation_level* parameter to the :func:`connect` call, or " @@ -1272,7 +1271,7 @@ msgid "" "``EXCLUSIVE``." msgstr "" -#: ../../library/sqlite3.rst:1108 +#: ../../library/sqlite3.rst:1109 msgid "" "You can disable the :mod:`sqlite3` module's implicit transaction management " "by setting :attr:`isolation_level` to ``None``. This will leave the " @@ -1282,27 +1281,27 @@ msgid "" "code." msgstr "" -#: ../../library/sqlite3.rst:1114 +#: ../../library/sqlite3.rst:1115 msgid "" "Note that :meth:`~Cursor.executescript` disregards :attr:`isolation_level`; " "any transaction control must be added explicitly." msgstr "" -#: ../../library/sqlite3.rst:1117 +#: ../../library/sqlite3.rst:1118 msgid "" ":mod:`sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: ../../library/sqlite3.rst:1123 +#: ../../library/sqlite3.rst:1124 msgid "Using :mod:`sqlite3` efficiently" msgstr "" -#: ../../library/sqlite3.rst:1127 +#: ../../library/sqlite3.rst:1128 msgid "Using shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:1129 +#: ../../library/sqlite3.rst:1130 msgid "" "Using the nonstandard :meth:`execute`, :meth:`executemany` and :meth:" "`executescript` methods of the :class:`Connection` object, your code can be " @@ -1314,38 +1313,38 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:1141 +#: ../../library/sqlite3.rst:1142 msgid "Accessing columns by name instead of by index" msgstr "" -#: ../../library/sqlite3.rst:1143 +#: ../../library/sqlite3.rst:1144 msgid "" "One useful feature of the :mod:`sqlite3` module is the built-in :class:" "`sqlite3.Row` class designed to be used as a row factory." msgstr "" -#: ../../library/sqlite3.rst:1146 +#: ../../library/sqlite3.rst:1147 msgid "" "Rows wrapped with this class can be accessed both by index (like tuples) and " "case-insensitively by name:" msgstr "" -#: ../../library/sqlite3.rst:1153 +#: ../../library/sqlite3.rst:1154 msgid "Using the connection as a context manager" msgstr "" -#: ../../library/sqlite3.rst:1155 +#: ../../library/sqlite3.rst:1156 msgid "" "Connection objects can be used as context managers that automatically commit " "or rollback transactions. In the event of an exception, the transaction is " "rolled back; otherwise, the transaction is committed:" msgstr "" -#: ../../library/sqlite3.rst:1164 +#: ../../library/sqlite3.rst:1165 msgid "Footnotes" msgstr "註解" -#: ../../library/sqlite3.rst:1165 +#: ../../library/sqlite3.rst:1166 msgid "" "The sqlite3 module is not built with loadable extension support by default, " "because some platforms (notably macOS) have SQLite libraries which are " diff --git a/library/warnings.po b/library/warnings.po index ab139ad9e9..619f8ef123 100644 --- a/library/warnings.po +++ b/library/warnings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-05 00:10+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -216,7 +216,8 @@ msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" #: ../../library/warnings.rst:107 -msgid "Base category for warnings related to resource usage." +msgid "" +"Base category for warnings related to resource usage (ignored by default)." msgstr "" #: ../../library/warnings.rst:111 diff --git a/reference/expressions.po b/reference/expressions.po index 45d321290f..c883077c6a 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-19 00:09+0000\n" +"POT-Creation-Date: 2022-01-08 00:09+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -433,9 +433,9 @@ msgid "" "The yield expression is used when defining a :term:`generator` function or " "an :term:`asynchronous generator` function and thus can only be used in the " "body of a function definition. Using a yield expression in a function's " -"body causes that function to be a generator, and using it in an :keyword:" -"`async def` function's body causes that coroutine function to be an " -"asynchronous generator. For example::" +"body causes that function to be a generator function, and using it in an :" +"keyword:`async def` function's body causes that coroutine function to be an " +"asynchronous generator function. For example::" msgstr "" #: ../../reference/expressions.rst:435 diff --git a/tutorial/datastructures.po b/tutorial/datastructures.po index 8ca49145e4..8c31a565e7 100644 --- a/tutorial/datastructures.po +++ b/tutorial/datastructures.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-21 15:41+0800\n" +"POT-Creation-Date: 2022-01-11 00:10+0000\n" "PO-Revision-Date: 2021-05-27 15:39+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -720,18 +720,19 @@ msgstr "" "使用在 ``while`` 和 ``if`` 陳述式的條件句可以包含任何運算子,而不是只有比較運" "算子 (comparisons) 。" -#: ../../tutorial/datastructures.rst:662 +#: ../../tutorial/datastructures.rst:663 msgid "" -"The comparison operators ``in`` and ``not in`` check whether a value occurs " -"(does not occur) in a sequence. The operators ``is`` and ``is not`` compare " -"whether two objects are really the same object. All comparison operators " -"have the same priority, which is lower than that of all numerical operators." +"The comparison operators ``in`` and ``not in`` are membership tests that " +"determine whether a value is in (or not in) a container. The operators " +"``is`` and ``is not`` compare whether two objects are really the same " +"object. All comparison operators have the same priority, which is lower " +"than that of all numerical operators." msgstr "" -"比較運算子 ``in`` 和 ``not in`` 檢查一個值是否存在(不存在)於一個序列中。運" -"算子 ``is`` 和 ``not is`` 比較兩個物件是否真的是相同的物件。所有比較運算子的" -"優先度都相同且都低於數值運算子。" +"比較運算子 ``in`` 和 ``not in`` 用於成員檢查,在容器中檢查一個值是否存在(或" +"不存在)。運算子 ``is`` 和 ``not is`` 比較兩個物件是否真的是相同的物件。所有" +"比較運算子的優先度都相同且都低於數值運算子。" -#: ../../tutorial/datastructures.rst:667 +#: ../../tutorial/datastructures.rst:669 msgid "" "Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` " "is less than ``b`` and moreover ``b`` equals ``c``." @@ -739,7 +740,7 @@ msgstr "" "比較運算是可以串連在一起的。例如, ``a < b == c`` 就是在測試 ``a`` 是否小於 " "``b`` 和 ``b`` 是否等於 ``c``\\ 。" -#: ../../tutorial/datastructures.rst:670 +#: ../../tutorial/datastructures.rst:672 msgid "" "Comparisons may be combined using the Boolean operators ``and`` and ``or``, " "and the outcome of a comparison (or of any other Boolean expression) may be " @@ -754,7 +755,7 @@ msgstr "" "B or C`` 等同於 ``(A and (not B)) or C``\\ 。一如往常,括號可以用來表示任何想" "要的組合。" -#: ../../tutorial/datastructures.rst:677 +#: ../../tutorial/datastructures.rst:679 msgid "" "The Boolean operators ``and`` and ``or`` are so-called *short-circuit* " "operators: their arguments are evaluated from left to right, and evaluation " @@ -768,7 +769,7 @@ msgstr "" "``B`` 為假,則 ``A and B and C`` 的運算並不會執行到 ``C``\\ 。當運算結果被當" "成一般值而非布林值時,短路運算子的回傳值為最後被求值的引數。" -#: ../../tutorial/datastructures.rst:684 +#: ../../tutorial/datastructures.rst:686 msgid "" "It is possible to assign the result of a comparison or other Boolean " "expression to a variable. For example, ::" @@ -777,7 +778,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/datastructures.rst:692 +#: ../../tutorial/datastructures.rst:694 msgid "" "Note that in Python, unlike C, assignment inside expressions must be done " "explicitly with the :ref:`walrus operator ` ``:=``\\ 。 這樣做避免" "了在 C 語言裡常見的一種問題:想要打 ``==`` 卻在運算式裡輸入 ``=``\\ 。" -#: ../../tutorial/datastructures.rst:702 +#: ../../tutorial/datastructures.rst:704 msgid "Comparing Sequences and Other Types" msgstr "序列和其他資料類型之比較" -#: ../../tutorial/datastructures.rst:703 +#: ../../tutorial/datastructures.rst:705 msgid "" "Sequence objects typically may be compared to other objects with the same " "sequence type. The comparison uses *lexicographical* ordering: first the " @@ -817,7 +818,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/datastructures.rst:723 +#: ../../tutorial/datastructures.rst:725 msgid "" "Note that comparing objects of different types with ``<`` or ``>`` is legal " "provided that the objects have appropriate comparison methods. For example, " @@ -829,11 +830,11 @@ msgstr "" "比較方法。例如,混合的數值類型是根據它們數值來做比較,所以 0 等於 0.0,等等。" "否則直譯器會選擇丟出一個 :exc:`TypeError` 錯誤而不是提供一個任意的排序。" -#: ../../tutorial/datastructures.rst:731 +#: ../../tutorial/datastructures.rst:733 msgid "Footnotes" msgstr "註解" -#: ../../tutorial/datastructures.rst:732 +#: ../../tutorial/datastructures.rst:734 msgid "" "Other languages may return the mutated object, which allows method chaining, " "such as ``d->insert(\"a\")->remove(\"b\")->sort();``."