mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
inspect.docs: Fix indentation and version-added for Signature.from_callable
This commit is contained in:
parent
2819718ee7
commit
232b934620
1 changed files with 3 additions and 1 deletions
|
|
@ -506,7 +506,7 @@ function.
|
|||
>>> str(new_sig)
|
||||
"(a, b) -> 'new return anno'"
|
||||
|
||||
.. classmethod:: Signature.from_callable(obj)
|
||||
.. classmethod:: Signature.from_callable(obj)
|
||||
|
||||
Return a :class:`Signature` (or its subclass) object for a given callable
|
||||
``obj``. This method simplifies subclassing of :class:`Signature`:
|
||||
|
|
@ -518,6 +518,8 @@ function.
|
|||
sig = MySignature.from_callable(min)
|
||||
assert isinstance(sig, MySignature)
|
||||
|
||||
.. versionadded:: 3.5
|
||||
|
||||
|
||||
.. class:: Parameter(name, kind, \*, default=Parameter.empty, annotation=Parameter.empty)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue