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

Commitabe5807

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.10 (#138)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>Co-authored-by: Matt.Wang <mattwang44@gmail.com>
1 parent6c57c32 commitabe5807

File tree

8 files changed

+705
-706
lines changed

8 files changed

+705
-706
lines changed

‎glossary.po

Lines changed: 217 additions & 215 deletions
Large diffs are not rendered by default.

‎library/__main__.po

Lines changed: 5 additions & 5 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-10-26 16:47+0000\n"
10+
"POT-Creation-Date:2021-11-14 00:09+0000\n"
1111
"PO-Revision-Date:2015-12-09 17:51+0000\n"
1212
"Last-Translator:Liang-Bo Wang <me@liang2.tw>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -136,9 +136,9 @@ msgstr ""
136136
#:../../library/__main__.rst:118
137137
msgid""
138138
"Some modules contain code that is intended for script use only, like parsing "
139-
"command-line arguments or fetching data from standard input.When a module "
140-
"like thiswere to beimported from a different module, for example to unit "
141-
"test it,the script code would unintentionally execute as well."
139+
"command-line arguments or fetching data from standard input.If a module "
140+
"like thiswasimported from a different module, for example to unit test it, "
141+
"the script code would unintentionally execute as well."
142142
msgstr""
143143

144144
#:../../library/__main__.rst:123
@@ -247,7 +247,7 @@ msgstr ""
247247
#:../../library/__main__.rst:233
248248
msgid""
249249
"Note that ``from .student import search_students`` is an example of a "
250-
"relative import. This import stylemust be used when referencing modules "
250+
"relative import. This import stylecan be used when referencing modules "
251251
"within a package. For more details, see :ref:`intra-package-references` in "
252252
"the :ref:`tut-modules` section of the tutorial."
253253
msgstr""

‎library/copy.po

Lines changed: 2 additions & 2 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-10-26 16:47+0000\n"
10+
"POT-Creation-Date:2021-11-15 00:09+0000\n"
1111
"PO-Revision-Date:2018-05-23 14:41+0000\n"
1212
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -107,7 +107,7 @@ msgstr ""
107107
#:../../library/copy.rst:62
108108
msgid""
109109
"This module does not copy types like module, method, stack trace, stack "
110-
"frame, file, socket, window,array,or any similar types. It does\"copy\" "
110+
"frame, file, socket, window, or any similar types. It does\"copy\" "
111111
"functions and classes (shallow and deeply), by returning the original object "
112112
"unchanged; this is compatible with the way these are treated by the :mod:"
113113
"`pickle` module."

‎library/functools.po

Lines changed: 53 additions & 48 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-10-26 16:47+0000\n"
10+
"POT-Creation-Date:2021-11-06 00:08+0000\n"
1111
"PO-Revision-Date:2018-05-23 16:02+0000\n"
1212
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -375,16 +375,16 @@ msgstr ""
375375
#:../../library/functools.rst:404
376376
msgid""
377377
"To define a generic function, decorate it with the ``@singledispatch`` "
378-
"decorator.Note that the dispatch happens on the type ofthe first argument, "
379-
"create your function accordingly::"
378+
"decorator.When defining a function using ``@singledispatch``, note thatthe "
379+
"dispatch happens on the type of the first argument::"
380380
msgstr""
381381

382382
#:../../library/functools.rst:415
383383
msgid""
384384
"To add overloaded implementations to the function, use the :func:`register` "
385-
"attribute of the generic function. It isa decorator. For functions "
386-
"annotated with types, the decorator will infer the type of the first "
387-
"argument automatically::"
385+
"attribute of the generic function, which can be used asa decorator. For "
386+
"functionsannotated with types, the decorator will infer the type of the "
387+
"firstargument automatically::"
388388
msgstr""
389389

390390
#:../../library/functools.rst:433
@@ -395,15 +395,15 @@ msgstr ""
395395

396396
#:../../library/functools.rst:444
397397
msgid""
398-
"To enable registering lambdas and pre-existing functions,the :func:"
399-
"`register` attribute can be used in a functional form::"
398+
"To enable registering:term:`lambdas<lambda>` and pre-existing functions, "
399+
"the :func:`register` attribute can also be used in a functional form::"
400400
msgstr""
401401

402402
#:../../library/functools.rst:452
403403
msgid""
404-
"The :func:`register` attribute returns the undecorated function which "
405-
"enables decorator stacking, pickling, as well as creating unit tests for "
406-
"each variant independently::"
404+
"The :func:`register` attribute returns the undecorated function. This "
405+
"enables decorator stacking,:mod:`pickling<pickle>`, and the creation of "
406+
"unit tests foreach variant independently::"
407407
msgstr""
408408

409409
#:../../library/functools.rst:466
@@ -416,60 +416,65 @@ msgstr ""
416416
msgid""
417417
"Where there is no registered implementation for a specific type, its method "
418418
"resolution order is used to find a more generic implementation. The original "
419-
"function decorated with ``@singledispatch`` is registered for the base "
420-
"``object`` type, which means it is used if no better implementation is found."
419+
"function decorated with ``@singledispatch`` is registered for the base :"
420+
"class:`object` type, which means it is used if no better implementation is "
421+
"found."
421422
msgstr""
422423

423424
#:../../library/functools.rst:492
424425
msgid""
425-
"If an implementation registered to :term:`abstract base class`, virtual "
426-
"subclasses will be dispatched to that implementation::"
426+
"If an implementation is registered to an :term:`abstract base class`, "
427+
"virtual subclasses of the base class will be dispatched to that "
428+
"implementation::"
427429
msgstr""
428430

429-
#:../../library/functools.rst:506
431+
#:../../library/functools.rst:507
430432
msgid""
431-
"To check which implementationwillthe generic function choose for a given "
433+
"To check which implementation the generic function will choose for a given "
432434
"type, use the ``dispatch()`` attribute::"
433435
msgstr""
434436

435-
#:../../library/functools.rst:514
437+
#:../../library/functools.rst:515
436438
msgid""
437439
"To access all registered implementations, use the read-only ``registry`` "
438440
"attribute::"
439441
msgstr""
440442

441-
#:../../library/functools.rst:528
442-
msgid"The :func:`register` attribute supports using type annotations."
443+
#:../../library/functools.rst:529
444+
msgid"The :func:`register` attributenowsupports using type annotations."
443445
msgstr""
444446

445-
#:../../library/functools.rst:534
447+
#:../../library/functools.rst:535
446448
msgid""
447449
"Transform a method into a :term:`single-dispatch <single dispatch>` :term:"
448450
"`generic function`."
449451
msgstr""
450452

451-
#:../../library/functools.rst:537
453+
#:../../library/functools.rst:538
452454
msgid""
453455
"To define a generic method, decorate it with the ``@singledispatchmethod`` "
454-
"decorator. Note that the dispatch happens on the type of the first non-self "
455-
"or non-cls argument, create your function accordingly::"
456+
"decorator. When defining a function using ``@singledispatchmethod``, note "
457+
"that the dispatch happens on the type of the first non-*self* or non-*cls* "
458+
"argument::"
456459
msgstr""
457460

458-
#:../../library/functools.rst:554
461+
#:../../library/functools.rst:556
459462
msgid""
460-
"``@singledispatchmethod`` supports nesting with other decorators such as "
461-
"``@classmethod``. Note that to allow for ``dispatcher.register``, "
462-
"``singledispatchmethod`` must be the *outer most* decorator. Here is the "
463-
"``Negator`` class with the ``neg`` methods being class bound::"
463+
"``@singledispatchmethod`` supports nesting with other decorators such as :"
464+
"func:`@classmethod<classmethod>`. Note that to allow for ``dispatcher."
465+
"register``, ``singledispatchmethod`` must be the *outer most* decorator. "
466+
"Here is the ``Negator`` class with the ``neg`` methods bound to the class, "
467+
"rather than an instance of the class::"
464468
msgstr""
465469

466-
#:../../library/functools.rst:575
470+
#:../../library/functools.rst:578
467471
msgid""
468-
"The same pattern can be used for other similar decorators: ``staticmethod``, "
469-
"``abstractmethod``, and others."
472+
"The same pattern can be used for other similar decorators: :func:"
473+
"`@staticmethod<staticmethod>`, :func:`@abstractmethod<abc.abstractmethod>`, "
474+
"and others."
470475
msgstr""
471476

472-
#:../../library/functools.rst:583
477+
#:../../library/functools.rst:587
473478
msgid""
474479
"Update a *wrapper* function to look like the *wrapped* function. The "
475480
"optional arguments are tuples to specify which attributes of the original "
@@ -483,15 +488,15 @@ msgid ""
483488
"``__dict__``, i.e. the instance dictionary)."
484489
msgstr""
485490

486-
#:../../library/functools.rst:593
491+
#:../../library/functools.rst:597
487492
msgid""
488493
"To allow access to the original function for introspection and other "
489494
"purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), "
490495
"this function automatically adds a ``__wrapped__`` attribute to the wrapper "
491496
"that refers to the function being wrapped."
492497
msgstr""
493498

494-
#:../../library/functools.rst:598
499+
#:../../library/functools.rst:602
495500
msgid""
496501
"The main intended use for this function is in :term:`decorator` functions "
497502
"which wrap the decorated function and return the wrapper. If the wrapper "
@@ -500,7 +505,7 @@ msgid ""
500505
"is typically less than helpful."
501506
msgstr""
502507

503-
#:../../library/functools.rst:604
508+
#:../../library/functools.rst:608
504509
msgid""
505510
":func:`update_wrapper` may be used with callables other than functions. Any "
506511
"attributes named in *assigned* or *updated* that are missing from the object "
@@ -509,69 +514,69 @@ msgid ""
509514
"wrapper function itself is missing any attributes named in *updated*."
510515
msgstr""
511516

512-
#:../../library/functools.rst:610
517+
#:../../library/functools.rst:614
513518
msgid"Automatic addition of the ``__wrapped__`` attribute."
514519
msgstr""
515520

516-
#:../../library/functools.rst:613
521+
#:../../library/functools.rst:617
517522
msgid"Copying of the ``__annotations__`` attribute by default."
518523
msgstr""
519524

520-
#:../../library/functools.rst:616
525+
#:../../library/functools.rst:620
521526
msgid"Missing attributes no longer trigger an :exc:`AttributeError`."
522527
msgstr""
523528

524-
#:../../library/functools.rst:619
529+
#:../../library/functools.rst:623
525530
msgid""
526531
"The ``__wrapped__`` attribute now always refers to the wrapped function, "
527532
"even if that function defined a ``__wrapped__`` attribute. (see :issue:"
528533
"`17482`)"
529534
msgstr""
530535

531-
#:../../library/functools.rst:627
536+
#:../../library/functools.rst:631
532537
msgid""
533538
"This is a convenience function for invoking :func:`update_wrapper` as a "
534539
"function decorator when defining a wrapper function. It is equivalent to "
535540
"``partial(update_wrapper, wrapped=wrapped, assigned=assigned, "
536541
"updated=updated)``. For example::"
537542
msgstr""
538543

539-
#:../../library/functools.rst:653
544+
#:../../library/functools.rst:657
540545
msgid""
541546
"Without the use of this decorator factory, the name of the example function "
542547
"would have been ``'wrapper'``, and the docstring of the original :func:"
543548
"`example` would have been lost."
544549
msgstr""
545550

546-
#:../../library/functools.rst:661
551+
#:../../library/functools.rst:665
547552
msgid":class:`partial` Objects"
548553
msgstr""
549554

550-
#:../../library/functools.rst:663
555+
#:../../library/functools.rst:667
551556
msgid""
552557
":class:`partial` objects are callable objects created by :func:`partial`. "
553558
"They have three read-only attributes:"
554559
msgstr""
555560

556-
#:../../library/functools.rst:669
561+
#:../../library/functools.rst:673
557562
msgid""
558563
"A callable object or function. Calls to the :class:`partial` object will be "
559564
"forwarded to :attr:`func` with new arguments and keywords."
560565
msgstr""
561566

562-
#:../../library/functools.rst:675
567+
#:../../library/functools.rst:679
563568
msgid""
564569
"The leftmost positional arguments that will be prepended to the positional "
565570
"arguments provided to a :class:`partial` object call."
566571
msgstr""
567572

568-
#:../../library/functools.rst:681
573+
#:../../library/functools.rst:685
569574
msgid""
570575
"The keyword arguments that will be supplied when the :class:`partial` object "
571576
"is called."
572577
msgstr""
573578

574-
#:../../library/functools.rst:684
579+
#:../../library/functools.rst:688
575580
msgid""
576581
":class:`partial` objects are like :class:`function` objects in that they are "
577582
"callable, weak referencable, and can have attributes. There are some "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp