File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -665,9 +665,6 @@ function.
665
665
Accepts a wide range of Python callables, from plain functions and classes to
666
666
:func: `functools.partial ` objects.
667
667
668
- If the passed object has a ``__signature__ `` attribute, this function
669
- returns it without further computations.
670
-
671
668
For objects defined in modules using stringized annotations
672
669
(``from __future__ import annotations ``), :func: `signature ` will
673
670
attempt to automatically un-stringize the annotations using
@@ -702,6 +699,13 @@ function.
702
699
Python. For example, in CPython, some built-in functions defined in
703
700
C provide no metadata about their arguments.
704
701
702
+ .. impl-detail ::
703
+
704
+ If the passed object has a :attr: `!__signature__ ` attribute,
705
+ we may use it to create the signature.
706
+ The exact semantics are an implementation detail and are subject to
707
+ unannounced changes. Consult the source code for current semantics.
708
+
705
709
706
710
.. class :: Signature(parameters=None, *, return_annotation=Signature.empty)
707
711
You can’t perform that action at this time.
0 commit comments