@@ -497,6 +497,12 @@ msgid ""
497497"using :func:`annotationlib.get_annotations` on Python 3.14+ "
498498"or :func:`inspect.get_annotations` on Python 3.10+."
499499msgstr ""
500+ "独自のメタクラスを持つクラスで ``__annotations__`` にアクセスすると、予期しな"
501+ "い動作が起こる場合があります。\n"
502+ "例については :pep:`749 <749#pep749-metaclasses>` を参照してください。\n"
503+ "Python 3.14 以降では :func:`annotationlib.get_annotations`、Python 3.10 以降"
504+ "では :func:`inspect.get_annotations` を使うことで、このような動作を避けられま"
505+ "す。"
500506
501507msgid ""
502508"On Python 3.14 and later, annotations are evaluated lazily (see :pep:`649` "
@@ -508,13 +514,26 @@ msgid ""
508514"(or :func:`inspect.get_annotations`) rather than "
509515"accessing :attr:`~type.__dict__` directly."
510516msgstr ""
517+ "Python 3.14 以降ではアノテーションは遅延評価されます (:pep:`649` "
518+ "と :pep:`749` を参照)。\n"
519+ "アノテーションの辞書をクラスの :attr:`~type.__dict__` にどのように格納するか"
520+ "は、非公開の実装詳細です。\n"
521+ "そのため、クラスにアノテーションがあっても "
522+ "``cls.__dict__.get('__annotations__', None)`` が ``None`` を返す場合がありま"
523+ "す。\n"
524+ "これらのバージョンでは :attr:`~type.__dict__` に直接アクセスせず、必"
525+ "ず :func:`annotationlib.get_annotations` (また"
526+ "は :func:`inspect.get_annotations`) を使ってください。"
511527
512528msgid ""
513529"Only on Python 3.9 and earlier, where neither function is available, can you "
514530"avoid these bugs by reading the annotations from the "
515531"class's :attr:`~type.__dict__` (for example, "
516532"``cls.__dict__.get('__annotations__', None)``)."
517533msgstr ""
534+ "どちらの関数も利用できない Python 3.9 以前に限り、クラス"
535+ "の :attr:`~type.__dict__` からアノテーションを読み取ることで (例えば "
536+ "``cls.__dict__.get('__annotations__', None)``)、これらのバグを回避できます。"
518537
519538msgid ""
520539"In some versions of Python, instances of classes may have an "
0 commit comments