File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -634,9 +634,6 @@ function.
634
634
Accepts a wide range of Python callables, from plain functions and classes to
635
635
:func: `functools.partial ` objects.
636
636
637
- If the passed object has a ``__signature__ `` attribute, this function
638
- returns it without further computations.
639
-
640
637
For objects defined in modules using stringized annotations
641
638
(``from __future__ import annotations ``), :func: `signature ` will
642
639
attempt to automatically un-stringize the annotations using
@@ -671,6 +668,13 @@ function.
671
668
Python. For example, in CPython, some built-in functions defined in
672
669
C provide no metadata about their arguments.
673
670
671
+ .. impl-detail ::
672
+
673
+ If the passed object has a :attr: `!__signature__ ` attribute,
674
+ we may use it to create the signature.
675
+ The exact semantics are an implementation detail and are subject to
676
+ unannounced changes. Consult the source code for current semantics.
677
+
674
<
4508
/td>678
675
679
.. class :: Signature(parameters=None, *, return_annotation=Signature.empty)
676
680
You can’t perform that action at this time.
0 commit comments