Commit 232b9346 authored by Yury Selivanov's avatar Yury Selivanov

inspect.docs: Fix indentation and version-added for Signature.from_callable

parent 2819718e
...@@ -506,7 +506,7 @@ function. ...@@ -506,7 +506,7 @@ function.
>>> str(new_sig) >>> str(new_sig)
"(a, b) -> 'new return anno'" "(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 Return a :class:`Signature` (or its subclass) object for a given callable
``obj``. This method simplifies subclassing of :class:`Signature`: ``obj``. This method simplifies subclassing of :class:`Signature`:
...@@ -518,6 +518,8 @@ function. ...@@ -518,6 +518,8 @@ function.
sig = MySignature.from_callable(min) sig = MySignature.from_callable(min)
assert isinstance(sig, MySignature) assert isinstance(sig, MySignature)
.. versionadded:: 3.5
.. class:: Parameter(name, kind, \*, default=Parameter.empty, annotation=Parameter.empty) .. class:: Parameter(name, kind, \*, default=Parameter.empty, annotation=Parameter.empty)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment