77msgstr ""
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
376376msgid ""
377377"To define a generic function, decorate it with the ``@singledispatch`` "
378- "decorator.Note that the dispatch happens on the type of the first argument, "
379- "create your function accordingly ::"
378+ "decorator.When defining a function using ``@singledispatch``, note that the "
379+ "dispatch happens on the type of the first argument ::"
380380msgstr ""
381381
382382#: ../../library/functools.rst:415
383383msgid ""
384384"To add overloaded implementations to the function, use the :func:`register` "
385- "attribute of the generic function. It is a 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 as a decorator. For "
386+ "functions annotated with types, the decorator will infer the type of the "
387+ "first argument automatically::"
388388msgstr ""
389389
390390#: ../../library/functools.rst:433
@@ -395,15 +395,15 @@ msgstr ""
395395
396396#: ../../library/functools.rst:444
397397msgid ""
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::"
400400msgstr ""
401401
402402#: ../../library/functools.rst:452
403403msgid ""
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 for each variant independently::"
407407msgstr ""
408408
409409#: ../../library/functools.rst:466
@@ -416,60 +416,65 @@ msgstr ""
416416msgid ""
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."
421422msgstr ""
422423
423424#: ../../library/functools.rst:492
424425msgid ""
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::"
427429msgstr ""
428430
429- #: ../../library/functools.rst:506
431+ #: ../../library/functools.rst:507
430432msgid ""
431- "To check which implementationwill the 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::"
433435msgstr ""
434436
435- #: ../../library/functools.rst:514
437+ #: ../../library/functools.rst:515
436438msgid ""
437439"To access all registered implementations, use the read-only ``registry`` "
438440"attribute::"
439441msgstr ""
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` attributenow supports using type annotations."
443445msgstr ""
444446
445- #: ../../library/functools.rst:534
447+ #: ../../library/functools.rst:535
446448msgid ""
447449"Transform a method into a :term:`single-dispatch <single dispatch>` :term:"
448450"`generic function`."
449451msgstr ""
450452
451- #: ../../library/functools.rst:537
453+ #: ../../library/functools.rst:538
452454msgid ""
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::"
456459msgstr ""
457460
458- #: ../../library/functools.rst:554
461+ #: ../../library/functools.rst:556
459462msgid ""
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::"
464468msgstr ""
465469
466- #: ../../library/functools.rst:575
470+ #: ../../library/functools.rst:578
467471msgid ""
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."
470475msgstr ""
471476
472- #: ../../library/functools.rst:583
477+ #: ../../library/functools.rst:587
473478msgid ""
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)."
484489msgstr ""
485490
486- #: ../../library/functools.rst:593
491+ #: ../../library/functools.rst:597
487492msgid ""
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."
492497msgstr ""
493498
494- #: ../../library/functools.rst:598
499+ #: ../../library/functools.rst:602
495500msgid ""
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."
501506msgstr ""
502507
503- #: ../../library/functools.rst:604
508+ #: ../../library/functools.rst:608
504509msgid ""
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*."
510515msgstr ""
511516
512- #: ../../library/functools.rst:610
517+ #: ../../library/functools.rst:614
513518msgid "Automatic addition of the ``__wrapped__`` attribute."
514519msgstr ""
515520
516- #: ../../library/functools.rst:613
521+ #: ../../library/functools.rst:617
517522msgid "Copying of the ``__annotations__`` attribute by default."
518523msgstr ""
519524
520- #: ../../library/functools.rst:616
525+ #: ../../library/functools.rst:620
521526msgid "Missing attributes no longer trigger an :exc:`AttributeError`."
522527msgstr ""
523528
524- #: ../../library/functools.rst:619
529+ #: ../../library/functools.rst:623
525530msgid ""
526531"The ``__wrapped__`` attribute now always refers to the wrapped function, "
527532"even if that function defined a ``__wrapped__`` attribute. (see :issue:"
528533"`17482`)"
529534msgstr ""
530535
531- #: ../../library/functools.rst:627
536+ #: ../../library/functools.rst:631
532537msgid ""
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::"
537542msgstr ""
538543
539- #: ../../library/functools.rst:653
544+ #: ../../library/functools.rst:657
540545msgid ""
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."
544549msgstr ""
545550
546- #: ../../library/functools.rst:661
551+ #: ../../library/functools.rst:665
547552msgid ":class:`partial` Objects"
548553msgstr ""
549554
550- #: ../../library/functools.rst:663
555+ #: ../../library/functools.rst:667
551556msgid ""
552557":class:`partial` objects are callable objects created by :func:`partial`. "
553558"They have three read-only attributes:"
554559msgstr ""
555560
556- #: ../../library/functools.rst:669
561+ #: ../../library/functools.rst:673
557562msgid ""
558563"A callable object or function. Calls to the :class:`partial` object will be "
559564"forwarded to :attr:`func` with new arguments and keywords."
560565msgstr ""
561566
562- #: ../../library/functools.rst:675
567+ #: ../../library/functools.rst:679
563568msgid ""
564569"The leftmost positional arguments that will be prepended to the positional "
565570"arguments provided to a :class:`partial` object call."
566571msgstr ""
567572
568- #: ../../library/functools.rst:681
573+ #: ../../library/functools.rst:685
569574msgid ""
570575"The keyword arguments that will be supplied when the :class:`partial` object "
571576"is called."
572577msgstr ""
573578
574- #: ../../library/functools.rst:684
579+ #: ../../library/functools.rst:688
575580msgid ""
576581":class:`partial` objects are like :class:`function` objects in that they are "
577582"callable, weak referencable, and can have attributes. There are some "