summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/typing.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index de7aa08..cb14db9 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -1985,6 +1985,15 @@ Functions and decorators
.. versionadded:: 3.8
+ .. versionchanged:: 3.11
+ The decorator will now set the ``__final__`` attribute to ``True``
+ on the decorated object. Thus, a check like
+ ``if getattr(obj, "__final__", False)`` can be used at runtime
+ to determine whether an object ``obj`` has been marked as final.
+ If the decorated object does not support setting attributes,
+ the decorator returns the object unchanged without raising an exception.
+
+
.. decorator:: no_type_check
Decorator to indicate that annotations are not type hints.