File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -442,11 +442,13 @@ Functions
442442
443443 .. versionadded :: 3.14
444444
445+ .. _support-annotations-custom-objects :
446+
445447Supporting annotations in custom objects
446448-------------------------------------------
447449
448450Objects can support annotation introspection by implementing the :attr: `~object.__annotate__ `
449- protocol. When an object provides an :attr: `!__annotate__ ` attribute, :func: `get_annotations `
451+ protocol. When an object’s class provides an :attr: `!__annotate__ ` attribute, :func: `get_annotations `
450452will call it to retrieve the annotations for that object. The :attr: `!__annotate__ ` function
451453should accept a single argument, a member of the :class: `Format ` enum, and return a dictionary
452454mapping annotation names to their values in the requested format.
You can’t perform that action at this time.
0 commit comments