Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit161a43c

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.10 (#314)
* sync with cpython bbcb03e7* sync with cpython cb39a44e* sync with cpython c3dbbc88* sync with cpython f5a78472* fix(library/sys): resolve fuzzy entries* fix(library/stdtypes): resolve fuzzy entryCo-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
1 parenta4e6a70 commit161a43c

File tree

11 files changed

+1700
-1276
lines changed

11 files changed

+1700
-1276
lines changed

‎library/bdb.po

Lines changed: 210 additions & 134 deletions
Large diffs are not rendered by default.

‎library/functions.po

Lines changed: 205 additions & 195 deletions
Large diffs are not rendered by default.

‎library/json.po

Lines changed: 157 additions & 143 deletions
Large diffs are not rendered by default.

‎library/logging.handlers.po

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.10\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2022-08-31 00:21+0000\n"
10+
"POT-Creation-Date:2022-09-04 00:18+0000\n"
1111
"PO-Revision-Date:2018-05-23 16:05+0000\n"
1212
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1428,7 +1428,7 @@ msgid ""
14281428
msgstr""
14291429

14301430
#:../../library/logging.handlers.rst:1034
1431-
#:../../library/logging.handlers.rst:1109
1431+
#:../../library/logging.handlers.rst:1123
14321432
msgid""
14331433
"If you are using :mod:`multiprocessing`, you should avoid using :class:"
14341434
"`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`."
@@ -1467,25 +1467,41 @@ msgid ""
14671467
"the original intact."
14681468
msgstr""
14691469

1470-
#:../../library/logging.handlers.rst:1065
1470+
#:../../library/logging.handlers.rst:1063
1471+
msgid""
1472+
"The base implementation formats the message with arguments, sets the "
1473+
"``message`` and ``msg`` attributes to the formatted message and sets the "
1474+
"``args`` and ``exc_text`` attributes to ``None`` to allow pickling and to "
1475+
"prevent further attempts at formatting. This means that a handler on the :"
1476+
"class:`QueueListener` side won't have the information to do custom "
1477+
"formatting, e.g. of exceptions. You may wish to subclass ``QueueHandler`` "
1478+
"and override this method to e.g. avoid setting ``exc_text`` to ``None``. "
1479+
"Note that the ``message`` / ``msg`` / ``args`` changes are related to "
1480+
"ensuring the record is pickleable, and you might or might not be able to "
1481+
"avoid doing that depending on whether your ``args`` are pickleable. (Note "
1482+
"that you may have to consider not only your own code but also code in any "
1483+
"libraries that you use.)"
1484+
msgstr""
1485+
1486+
#:../../library/logging.handlers.rst:1079
14711487
msgid""
14721488
"Enqueues the record on the queue using ``put_nowait()``; you may want to "
14731489
"override this if you want to use blocking behaviour, or a timeout, or a "
14741490
"customized queue implementation."
14751491
msgstr""
14761492

1477-
#:../../library/logging.handlers.rst:1071
1493+
#:../../library/logging.handlers.rst:1085
14781494
msgid""
14791495
"When created via configuration using :func:`~logging.config.dictConfig`, "
14801496
"this attribute will contain a :class:`QueueListener` instance for use with "
14811497
"this handler. Otherwise, it will be ``None``."
14821498
msgstr""
14831499

1484-
#:../../library/logging.handlers.rst:1080
1500+
#:../../library/logging.handlers.rst:1094
14851501
msgid"QueueListener"
14861502
msgstr"QueueListener"
14871503

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

1499-
#:../../library/logging.handlers.rst:1092
1515+
#:../../library/logging.handlers.rst:1106
15001516
msgid""
15011517
"Along with the :class:`QueueHandler` class, :class:`QueueListener` can be "
15021518
"used to let handlers do their work on a separate thread from the one which "
@@ -1506,7 +1522,7 @@ msgid ""
15061522
"an email via :class:`SMTPHandler`) are done on a separate thread."
15071523
msgstr""
15081524

1509-
#:../../library/logging.handlers.rst:1101
1525+
#:../../library/logging.handlers.rst:1115
15101526
msgid""
15111527
"Returns a new instance of the :class:`QueueListener` class. The instance is "
15121528
"initialized with the queue to send messages to and a list of handlers which "
@@ -1517,90 +1533,90 @@ msgid ""
15171533
"class:`~queue.SimpleQueue` instances for *queue*."
15181534
msgstr""
15191535

1520-
#:../../library/logging.handlers.rst:1112
1536+
#:../../library/logging.handlers.rst:1126
15211537
msgid""
15221538
"If ``respect_handler_level`` is ``True``, a handler's level is respected "
15231539
"(compared with the level for the message) when deciding whether to pass "
15241540
"messages to that handler; otherwise, the behaviour is as in previous Python "
15251541
"versions - to always pass each message to each handler."
15261542
msgstr""
15271543

1528-
#:../../library/logging.handlers.rst:1117
1544+
#:../../library/logging.handlers.rst:1131
15291545
msgid"The ``respect_handler_level`` argument was added."
15301546
msgstr"新增 ``respect_handler_level`` 引數。"
15311547

1532-
#:../../library/logging.handlers.rst:1122
1548+
#:../../library/logging.handlers.rst:1136
15331549
msgid"Dequeues a record and return it, optionally blocking."
15341550
msgstr""
15351551

1536-
#:../../library/logging.handlers.rst:1124
1552+
#:../../library/logging.handlers.rst:1138
15371553
msgid""
15381554
"The base implementation uses ``get()``. You may want to override this method "
15391555
"if you want to use timeouts or work with custom queue implementations."
15401556
msgstr""
15411557

1542-
#:../../library/logging.handlers.rst:1130
1558+
#:../../library/logging.handlers.rst:1144
15431559
msgid"Prepare a record for handling."
15441560
msgstr""
15451561

1546-
#:../../library/logging.handlers.rst:1132
1562+
#:../../library/logging.handlers.rst:1146
15471563
msgid""
15481564
"This implementation just returns the passed-in record. You may want to "
15491565
"override this method if you need to do any custom marshalling or "
15501566
"manipulation of the record before passing it to the handlers."
15511567
msgstr""
15521568

1553-
#:../../library/logging.handlers.rst:1138
1569+
#:../../library/logging.handlers.rst:1152
15541570
msgid"Handle a record."
15551571
msgstr""
15561572

1557-
#:../../library/logging.handlers.rst:1140
1573+
#:../../library/logging.handlers.rst:1154
15581574
msgid""
15591575
"This just loops through the handlers offering them the record to handle. The "
15601576
"actual object passed to the handlers is that which is returned from :meth:"
15611577
"`prepare`."
15621578
msgstr""
15631579

1564-
#:../../library/logging.handlers.rst:1146
1580+
#:../../library/logging.handlers.rst:1160
15651581
msgid"Starts the listener."
15661582
msgstr""
15671583

1568-
#:../../library/logging.handlers.rst:1148
1584+
#:../../library/logging.handlers.rst:1162
15691585
msgid""
15701586
"This starts up a background thread to monitor the queue for LogRecords to "
15711587
"process."
15721588
msgstr""
15731589

1574-
#:../../library/logging.handlers.rst:1153
1590+
#:../../library/logging.handlers.rst:1167
15751591
msgid"Stops the listener."
15761592
msgstr""
15771593

1578-
#:../../library/logging.handlers.rst:1155
1594+
#:../../library/logging.handlers.rst:1169
15791595
msgid""
15801596
"This asks the thread to terminate, and then waits for it to do so. Note that "
15811597
"if you don't call this before your application exits, there may be some "
15821598
"records still left on the queue, which won't be processed."
15831599
msgstr""
15841600

1585-
#:../../library/logging.handlers.rst:1161
1601+
#:../../library/logging.handlers.rst:1175
15861602
msgid""
15871603
"Writes a sentinel to the queue to tell the listener to quit. This "
15881604
"implementation uses ``put_nowait()``. You may want to override this method "
15891605
"if you want to use timeouts or work with custom queue implementations."
15901606
msgstr""
15911607

1592-
#:../../library/logging.handlers.rst:1172
1608+
#:../../library/logging.handlers.rst:1186
15931609
msgid"Module :mod:`logging`"
15941610
msgstr":mod:`logging` 模組"
15951611

1596-
#:../../library/logging.handlers.rst:1172
1612+
#:../../library/logging.handlers.rst:1186
15971613
msgid"API reference for the logging module."
15981614
msgstr""
15991615

1600-
#:../../library/logging.handlers.rst:1174
1616+
#:../../library/logging.handlers.rst:1188
16011617
msgid"Module :mod:`logging.config`"
16021618
msgstr":mod:`logging.config` 模組"
16031619

1604-
#:../../library/logging.handlers.rst:1175
1620+
#:../../library/logging.handlers.rst:1189
16051621
msgid"Configuration API for the logging module."
16061622
msgstr""

‎library/numbers.po

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.10\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2021-09-13 00:11+0000\n"
10+
"POT-Creation-Date:2022-09-05 00:20+0000\n"
1111
"PO-Revision-Date:2016-11-19 00:32+0000\n"
1212
"Last-Translator:Liang-Bo Wang <me@liang2.tw>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -89,50 +89,57 @@ msgstr ""
8989
#:../../library/numbers.rst:61
9090
msgid""
9191
"Subtypes :class:`Real` and adds :attr:`~Rational.numerator` and :attr:"
92-
"`~Rational.denominator` properties, which should be in lowest terms. With"
93-
"these, it provides a default for :func:`float`."
92+
"`~Rational.denominator` properties. It also provides a default for :func:"
93+
"`float`."
9494
msgstr""
9595

96-
#:../../library/numbers.rst:68../../library/numbers.rst:72
96+
#:../../library/numbers.rst:65
97+
msgid""
98+
"The :attr:`~Rational.numerator` and :attr:`~Rational.denominator` values "
99+
"should be instances of :class:`Integral` and should be in lowest terms with :"
100+
"attr:`~Rational.denominator` positive."
101+
msgstr""
102+
103+
#:../../library/numbers.rst:71../../library/numbers.rst:75
97104
msgid"Abstract."
98105
msgstr""
99106

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

108-
#:../../library/numbers.rst:85
115+
#:../../library/numbers.rst:88
109116
msgid"Notes for type implementors"
110117
msgstr""
111118

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

120-
#:../../library/numbers.rst:106
127+
#:../../library/numbers.rst:109
121128
msgid"Adding More Numeric ABCs"
122129
msgstr""
123130

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

131-
#:../../library/numbers.rst:120
138+
#:../../library/numbers.rst:123
132139
msgid"Implementing the arithmetic operations"
133140
msgstr""
134141

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

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

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

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

166-
#:../../library/numbers.rst:168
173+
#:../../library/numbers.rst:171
167174
msgid""
168175
"Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is "
169176
"well."
170177
msgstr""
171178

172-
#:../../library/numbers.rst:170
179+
#:../../library/numbers.rst:173
173180
msgid""
174181
"If it falls back to the boilerplate, there are no more possible methods to "
175182
"try, so this is where the default implementation should live."
176183
msgstr""
177184

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

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

192-
#:../../library/numbers.rst:183
199+
#:../../library/numbers.rst:186
193200
msgid""
194201
"Because most of the operations on any given type will be very similar, it "
195202
"can be useful to define a helper function which generates the forward and "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp