mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
fix review idea
Signed-off-by: Manjusaka <me@manjusaka.me>
This commit is contained in:
parent
7cddaca188
commit
f6fe897c1d
1 changed files with 1 additions and 1 deletions
|
|
@ -448,7 +448,7 @@ Supporting annotations in custom objects
|
|||
-------------------------------------------
|
||||
|
||||
Objects can support annotation introspection by implementing the :attr:`~object.__annotate__`
|
||||
protocol. When an object provides an :attr:`!__annotate__` attribute, :func:`get_annotations`
|
||||
protocol. When an object's class provides an :attr:`!__annotate__` descriptor, :func:`get_annotations`
|
||||
will call it to retrieve the annotations for that object. The :attr:`!__annotate__` function
|
||||
should accept a single argument, a member of the :class:`Format` enum, and return a dictionary
|
||||
mapping annotation names to their values in the requested format.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue