8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0eedfa commit bd4046fCopy full SHA for bd4046f
Doc/howto/annotations.rst
@@ -248,4 +248,9 @@ quirks by using :func:`annotationlib.get_annotations` on Python 3.14+ or
248
:func:`inspect.get_annotations` on Python 3.10+. On earlier versions of
249
Python, you can avoid these bugs by accessing the annotations from the
250
class's :attr:`~type.__dict__`
251
-(e.g., ``cls.__dict__.get('__annotations__', None)``).
+(for example, ``cls.__dict__.get('__annotations__', None)``).
252
+
253
+In some versions of Python, instances of classes may have an ``__annotations__``
254
+attribute. However, this is not supported functionality. If you need the
255
+annotations of an instance, you can use :func:`type` to access its class
256
+(for example, ``annotationlib.get_annotations(type(myinstance))`` on Python 3.14+).
0 commit comments