8000 Sync with CPython 3.10 by pydoc-zh-tw[bot] · Pull Request #314 · python/python-docs-zh-tw · GitHub
[go: up one dir, main page]

Skip to content

Sync with CPython 3.10 #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 210 additions & 134 deletions library/bdb.po

Large diffs are not rendered by default.

400 changes: 205 additions & 195 deletions library/functions.po

Large diffs are not rendered by default.

300 changes: 157 additions & 143 deletions library/json.po

Large diffs are not rendered by default.

66 changes: 41 additions & 25 deletions library/logging.handlers.po
6D47
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-31 00:21+0000\n"
"POT-Creation-Date: 2022-09-04 00:18+0000\n"
"PO-Revision-Date: 2018-05-23 16:05+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -1428,7 +1428,7 @@ msgid ""
msgstr ""

#: ../../library/logging.handlers.rst:1034
#: ../../library/logging.handlers.rst:1109
#: ../../library/logging.handlers.rst:1123
msgid ""
"If you are using :mod:`multiprocessing`, you should avoid using :class:"
"`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`."
Expand Down Expand Up @@ -1467,25 +1467,41 @@ msgid ""
"the original intact."
msgstr ""

#: ../../library/logging.handlers.rst:1065
#: ../../library/logging.handlers.rst:1063
msgid ""
"The base implementation formats the message with arguments, sets the "
"``message`` and ``msg`` attributes to the formatted message and sets the "
"``args`` and ``exc_text`` attributes to ``None`` to allow pickling and to "
"prevent further attempts at formatting. This means that a handl 10000 er on the :"
"class:`QueueListener` side won't have the information to do custom "
"formatting, e.g. of exceptions. You may wish to subclass ``QueueHandler`` "
"and override this method to e.g. avoid setting ``exc_text`` to ``None``. "
"Note that the ``message`` / ``msg`` / ``args`` changes are related to "
"ensuring the record is pickleable, and you might or might not be able to "
"avoid doing that depending on whether your ``args`` are pickleable. (Note "
"that you may have to consider not only your own code but also code in any "
"libraries that you use.)"
msgstr ""

#: ../../library/logging.handlers.rst:1079
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:1071
#: ../../library/logging.handlers.rst:1085
msgid ""
"When created via configuration using :func:`~logging.config.dictConfig`, "
"this attribute will contain a :class:`QueueListener` instance for use with "
"this handler. Otherwise, it will be ``None``."
msgstr ""

#: ../../library/logging.handlers.rst:1080
#: ../../library/logging.handlers.rst:1094
msgid "QueueListener"
msgstr "QueueListener"

#: ../../library/logging.handlers.rst:1084
#: ../../library/logging.handlers.rst:1098
msgid ""
"The :class:`QueueListener` class, located in the :mod:`logging.handlers` "
"module, supports receiving logging messages from a queue, such as those "
Expand All @@ -1496,7 +1512,7 @@ msgid ""
"works hand-in-hand with :class:`QueueHandler`."
msgstr ""

#: ../../library/logging.handlers.rst:1092
#: ../../library/logging.handlers.rst:1106
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 "
Expand All @@ -1506,7 +1522,7 @@ msgid ""
"an email via :class:`SMTPHandler`) are done on a separate thread."
msgstr ""

#: ../../library/logging.handlers.rst:1101
#: ../../library/logging.handlers.rst:1115
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 "
Expand All @@ -1517,90 +1533,90 @@ msgid ""
"class:`~queue.SimpleQueue` instances for *queue*."
msgstr ""

#: ../../library/logging.handlers.rst:1112
#: ../../library/logging.handlers.rst:1126
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 "
"messages to that handler; otherwise, the behaviour is as in previous Python "
"versions - to always pass each message to each handler."
msgstr ""

#: ../../library/logging.handlers.rst:1117
#: ../../library/logging.handlers.rst:1131
msgid "The ``respect_handler_level`` argument was added."
msgstr "新增 ``respect_handler_level`` 引數。"

#: ../../library/logging.handlers.rst:1122
#: ../../library/logging.handlers.rst:1136
msgid "Dequeues a record and return it, optionally blocking."
msgstr ""

#: ../../library/logging.handlers.rst:1124
#: ../../library/logging.handlers.rst:1138
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:1130
#: ../../library/logging.handlers.rst:1144
msgid "Prepare a record for handling."
msgstr ""

#: ../../library/logging.handlers.rst:1132
#: ../../library/logging.handlers.rst:1146
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 "
8000 "manipulation of the record before passing it to the handlers."
msgstr ""

#: ../../library/logging.handlers.rst:1138
#: ../../library/logging.handlers.rst:1152
msgid "Handle a record."
msgstr ""

#: ../../library/logging.handlers.rst:1140
#: ../../library/logging.handlers.rst:1154
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:1146
#: ../../library/logging.handlers.rst:1160
msgid "Starts the listener."
msgstr ""

#: ../../library/logging.handlers.rst:1148
#: ../../library/logging.handlers.rst:1162
msgid ""
"This starts up a background thread to monitor the queue for LogRecords to "
"process."
msgstr ""

#: ../../library/logging.handlers.rst:1153
#: ../../library/logging.handlers.rst:1167
msgid "Stops the listener."
msgstr ""

#: ../../library/logging.handlers.rst:1155
#: ../../library/logging.handlers.rst:1169
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:1161
#: ../../library/logging.handlers.rst:1175
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:1172
#: ../../library/logging.handlers.rst:1186
msgid "Module :mod:`logging`"
msgstr ":mod:`logging` 模組"

#: ../../library/logging.handlers.rst:1172
#: ../../library/logging.handlers.rst:1186
msgid "API reference for the logging module."
msgstr ""

#: ../../library/logging.handlers.rst:1174
#: ../../library/logging.handlers.rst:1188
msgid "Module :mod:`logging.config`"
msgstr ":mod:`logging.config` 模組"

#: ../../library/logging.handlers.rst:1175
#: ../../library/logging.handlers.rst:1189
msgid "Configuration API for the logging module."
msgstr ""
45 changes: 26 additions & 19 deletions library/numbers.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Vers 9E81 ion: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-13 00:11+0000\n"
"POT-Creation-Date: 2022-09-05 00:20+0000\n"
"PO-Revision-Date: 2016-11-19 00:32+0000\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -89,50 +89,57 @@ msgstr ""
#: ../../library/numbers.rst:61
msgid ""
"Subtypes :class:`Real` and adds :attr:`~Rational.numerator` and :attr:"
"`~Rational.denominator` properties, which should be in lowest terms. With "
"these, it provides a default for :func:`float`."
"`~Rational.denominator` properties. It also provides a default for :func:"
"`float`."
msgstr ""

#: ../../library/numbers.rst:68 ../../library/numbers.rst:72
#: ../../library/numbers.rst:65
msgid ""
"The :attr:`~Rational.numerator` and :attr:`~Rational.denominator` values "
"should be instances of :class:`Integral` and should be in lowest terms with :"
"attr:`~Rational.denominator` positive."
msgstr ""

#: ../../library/numbers.rst:71 ../../library/numbers.rst:75
msgid "Abstract."
msgstr ""

#: ../../library/numbers.rst:77
#: ../../library/numbers.rst:80
msgid ""
"Subtypes :class:`Rational` and adds a conversion to :class:`int`. Provides "
"defaults for :func:`float`, :attr:`~Rational.numerator`, and :attr:"
"`~Rational.denominator`. Adds abstract methods for :func:`pow` with modulus "
"and bit-string operations: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``."
msgstr ""

#: ../../library/numbers.rst:85
#: ../../library/numbers.rst:88
msgid "Notes for type implementors"
msgstr ""

#: ../../library/numbers.rst:87
#: ../../library/numbers.rst:90
msgid ""
"Implementors should be careful to make equal numbers equal and hash them to "
"the same values. This may be subtle if there are two different extensions of "
"the real numbers. For example, :class:`fractions.Fraction` implements :func:"
"`hash` as follows::"
msgstr ""

#: ../../library/numbers.rst:106
#: ../../library/numbers.rst:109
msgid "Adding More Numeric ABCs"
msgstr ""

#: ../../library/numbers.rst:108
#: ../../library/numbers.rst:111
msgid ""
"There are, of course, more possible ABCs for numbers, and this would be a "
"poor hierarchy if it precluded the possibility of adding those. You can add "
"``MyFoo`` between :class:`Complex` and :class:`Real` with::"
msgstr ""

#: ../../library/numbers.rst:120
#: ../../library/numbers.rst:123
msgid "Implementing the arithmetic operations"
msgstr ""

#: ../../library/numbers.rst:122
#: ../../library/numbers.rst:125
msgid ""
"We want to implement the arithmetic operations so that mixed-mode operations "
"either call an implementation whose author knew about the types of both "
Expand All @@ -141,7 +148,7 @@ msgid ""
"and :meth:`__radd__` should be defined as::"
msgstr ""

#: ../../library/numbers.rst:153
#: ../../library/numbers.rst:156
msgid ""
"There are 5 different cases for a mixed-type operation on subclasses of :"
"class:`Complex`. I'll refer to all of the above code that doesn't refer to "
Expand All @@ -150,11 +157,11 @@ msgid ""
"Complex``), and ``b : B <: Complex``. I'll consider ``a + b``:"
msgstr ""

#: ../../library/numbers.rst:160
#: ../../library/numbers.rst:163
msgid "If ``A`` defines an :meth:`__add__` which accepts ``b``, all is well."
msgstr ""

#: ../../library/numbers.rst:162
#: ../../library/numbers.rst:165
msgid ""
"If ``A`` falls back to the boilerplate code, and it were to return a value "
"from :meth:`__add__`, we'd miss the possibility that ``B`` defines a more "
Expand All @@ -163,33 +170,33 @@ msgid ""
"`__add__` at all.)"
msgstr ""

#: ../../library/numbers.rst:168
#: ../../library/numbers.rst:171
msgid ""
"Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is "
"well."
msgstr ""

#: ../../library/numbers.rst:170
#: ../../library/numbers.rst:173
msgid ""
"If it falls back to the boilerplate, there are no more possible methods to "
"try, so this is where the default implementation should live."
msgstr ""

#: ../../library/numbers.rst:173
#: ../../library/numbers.rst:176
msgid ""
"If ``B <: A``, Python tries ``B.__radd__`` before ``A.__add__``. This is ok, "
"because it was implemented with knowledge of ``A``, so it can handle those "
"instances before delegating to :class:`Complex`."
msgstr ""

#: ../../library/numbers.rst:178
#: ../../library/numbers.rst:181
msgid ""
"If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge, "
"then the appropriate shared operation is the one involving the built in :"
"class:`complex`, and both :meth:`__radd__` s land there, so ``a+b == b+a``."
msgstr ""

#: ../../library/numbers.rst:183
#: ../../library/numbers.rst:186
msgid ""
"Because most of the operations on any given type will be very similar, it "
"can be useful to define a helper function which generates the forward and "
Expand Down
Loading
0