Skip to content

Commit 50828b7

Browse files
committed
Update docs for simplified implementation
1 parent 46ef8b1 commit 50828b7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Doc/library/annotationlib.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,11 +557,13 @@ following attributes:
557557
return {"x": MyType}
558558
raise NotImplementedError
559559
560+
__code__ = __call__.__code__
560561
__defaults__ = (None,)
561-
562562
__kwdefaults__ = property(lambda self: dict(_self=self))
563563
564-
__code__ = property(lambda self: self.__call__.__code__)
564+
__globals__ = {}
565+
__builtins__ = {}
566+
__closure__ = None
565567
566568
This can then be called with:
567569

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Improve support, error messages, and documentation for non-function callables as
1+
Improve tests and documentation for non-function callables as
22
:term:`annotate functions <annotate function>`.

0 commit comments

Comments
 (0)