Skip to content

Commit 79f42b8

Browse files
committed
address PR feedback
1 parent 1157563 commit 79f42b8

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎howto/annotations.po‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ msgid ""
385385
"Instead, use :func:`annotationlib.get_annotations` (Python 3.14+) "
386386
"or :func:`inspect.get_annotations` (Python 3.10+)."
387387
msgstr ""
388-
"你應該避免直接存取物件的 ``__annotations__`` 。請改"
388+
"你應該避免直接存取物件的 ``__annotations__``。請改"
389389
"用 :func:`annotationlib.get_annotations` (Python 3.14+) "
390-
"或 :func:`inspect.get_annotations` (Python 3.10+)."
390+
"或 :func:`inspect.get_annotations` (Python 3.10+)。"
391391

392392
#: ../../howto/annotations.rst:196
393393
msgid ""
@@ -493,12 +493,12 @@ msgid ""
493493
"class's :attr:`~type.__dict__` (for example, "
494494
"``cls.__dict__.get('__annotations__', None)``)."
495495
msgstr ""
496-
"如果你使用的類別具有自訂的元類別,並存取該類別的 ``__annotations__`` ,你可能"
497-
"會觀察到出乎意料的行為;請查閱 :pep:`749 <749#pep749-metaclasses>` 的例子。你"
498-
"可以在Python 3.14+ 使用 :func:`annotationlib.get_annotations` 或者在 Python "
496+
"如果你使用的類別具有自訂的元類別且會存取該類別的 ``__annotations__`` ,你可能"
497+
"會觀察到不預期的行為;請查閱 :pep:`749 <749#pep749-metaclasses>` 的例子。你可"
498+
"以在 Python 3.14+ 使用 :func:`annotationlib.get_annotations` 或者在 Python "
499499
"3.10+ 使用 :func:`inspect.get_annotations` 來避免這些問題。在更早期的版本,你"
500500
"可以存取類別的 :attr:`~type.__dict__` 來避免這些問題。(例如:"
501-
"``cls.__dict__.get(‘__annotations__’, None)`` )"
501+
"``cls.__dict__.get('__annotations__', None)`` )。"
502502

503503
#: ../../howto/annotations.rst:253
504504
msgid ""
@@ -511,4 +511,4 @@ msgstr ""
511511
"在某些 Python 版本中,類別實例可能會帶有 ``__annotations__`` 的屬性,但這並非"
512512
"受支援的功能。如果你需要取得實例的註釋,可以用 :func:`type` 來存取實例的類別"
513513
"(例如在 Python 3.14+ 中使用 "
514-
"``annotationlib.get_annotations(type(myinstance))`` )."
514+
"``annotationlib.get_annotations(type(myinstance))`` )。"

0 commit comments

Comments
 (0)