| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 542f327 commit 31462d4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -655,9 +655,6 @@ function. | |||
| 655 | 655 | Accepts a wide range of Python callables, from plain functions and classes to | |
| 656 | 656 | :func:`functools.partial` objects. | |
| 657 | 657 | ||
| 658 | - If the passed object has a ``__signature__`` attribute, this function | ||
| 659 | - returns it without further computations. | ||
| 660 | - | ||
| 661 | 658 | For objects defined in modules using stringized annotations | |
| 662 | 659 | (``from __future__ import annotations``), :func:`signature` will | |
| 663 | 660 | attempt to automatically un-stringize the annotations using | |
@@ -692,6 +689,13 @@ function. | |||
| 692 | 689 | Python. For example, in CPython, some built-in functions defined in | |
| 693 | 690 | C provide no metadata about their arguments. | |
| 694 | 691 | ||
| 692 | + .. impl-detail:: | ||
| 693 | + | ||
| 694 | + If the passed object has a :attr:`!__signature__` attribute, | ||
| 695 | + we may use it to create the signature. | ||
| 696 | + The exact semantics are an implementation detail and are subject to | ||
| 697 | + unannounced changes. Consult the source code for current semantics. | ||
| 698 | + | ||
| 695 | 699 | ||
| 696 | 700 | .. class:: Signature(parameters=None, *, return_annotation=Signature.empty) | |
| 697 | 701 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments