|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python 3.14\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2026-09-15 09:12+0000\n" |
| 11 | +"POT-Creation-Date: 2026-11-02 03:06+0000\n" |
12 | 12 | "PO-Revision-Date: 2025-09-16 00:00+0000\n" |
13 | 13 | "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" |
14 | 14 | "Language: de\n" |
@@ -376,13 +376,30 @@ msgid "" |
376 | 376 | "the class, you may observe unexpected behavior; see :pep:`749 <749#pep749-" |
377 | 377 | "metaclasses>` for some examples. You can avoid these quirks by " |
378 | 378 | "using :func:`annotationlib.get_annotations` on Python 3.14+ " |
379 | | -"or :func:`inspect.get_annotations` on Python 3.10+. On earlier versions of " |
380 | | -"Python, you can avoid these bugs by accessing the annotations from the " |
| 379 | +"or :func:`inspect.get_annotations` on Python 3.10+." |
| 380 | +msgstr "" |
| 381 | + |
| 382 | +#: ../../howto/annotations.rst:252 |
| 383 | +msgid "" |
| 384 | +"On Python 3.14 and later, annotations are evaluated lazily (see :pep:`649` " |
| 385 | +"and :pep:`749`), and how the annotations dict is stored in the " |
| 386 | +"class's :attr:`~type.__dict__` is a private implementation detail. Reading " |
| 387 | +"``cls.__dict__.get('__annotations__', None)`` may therefore return ``None`` " |
| 388 | +"even when the class has annotations. On these versions, always " |
| 389 | +"use :func:`annotationlib.get_annotations` " |
| 390 | +"(or :func:`inspect.get_annotations`) rather than " |
| 391 | +"accessing :attr:`~type.__dict__` directly." |
| 392 | +msgstr "" |
| 393 | + |
| 394 | +#: ../../howto/annotations.rst:261 |
| 395 | +msgid "" |
| 396 | +"Only on Python 3.9 and earlier, where neither function is available, can you " |
| 397 | +"avoid these bugs by reading the annotations from the " |
381 | 398 | "class's :attr:`~type.__dict__` (for example, " |
382 | 399 | "``cls.__dict__.get('__annotations__', None)``)." |
383 | 400 | msgstr "" |
384 | 401 |
|
385 | | -#: ../../howto/annotations.rst:253 |
| 402 | +#: ../../howto/annotations.rst:265 |
386 | 403 | msgid "" |
387 | 404 | "In some versions of Python, instances of classes may have an " |
388 | 405 | "``__annotations__`` attribute. However, this is not supported functionality. " |
|
0 commit comments