diff options
author | Andre Delfino <adelfino@gmail.com> | 2020-12-17 01:37:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 01:37:28 (GMT) |
commit | dcc997cd28ab33ebac44182ee55533c1b37689f7 (patch) | |
tree | 1f3dad6d0fe646c4f3e5f3ca1219d88e2156383c /Doc/library/inspect.rst | |
parent | c143cc379c7411598e7b7b652bac7935e4687d07 (diff) | |
download | cpython-dcc997cd28ab33ebac44182ee55533c1b37689f7.zip cpython-dcc997cd28ab33ebac44182ee55533c1b37689f7.tar.gz cpython-dcc997cd28ab33ebac44182ee55533c1b37689f7.tar.bz2 |
[doc] Fix erroneous backslashes in signatures and names (GH-23658)
The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch).
The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did.
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r-- | Doc/library/inspect.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index d00a30f..b53a942 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -556,7 +556,7 @@ The Signature object represents the call signature of a callable object and its return annotation. To retrieve a Signature object, use the :func:`signature` function. -.. function:: signature(callable, \*, follow_wrapped=True) +.. function:: signature(callable, *, follow_wrapped=True) Return a :class:`Signature` object for the given ``callable``:: @@ -597,7 +597,7 @@ function. C provide no metadata about their arguments. -.. class:: Signature(parameters=None, \*, return_annotation=Signature.empty) +.. class:: Signature(parameters=None, *, return_annotation=Signature.empty) A Signature object represents the call signature of a function and its return annotation. For each parameter accepted by the function it stores a @@ -668,7 +668,7 @@ function. >>> str(new_sig) "(a, b) -> 'new return anno'" - .. classmethod:: Signature.from_callable(obj, \*, follow_wrapped=True) + .. classmethod:: Signature.from_callable(obj, *, follow_wrapped=True) Return a :class:`Signature` (or its subclass) object for a given callable ``obj``. Pass ``follow_wrapped=False`` to get a signature of ``obj`` @@ -684,7 +684,7 @@ function. .. versionadded:: 3.5 -.. class:: Parameter(name, kind, \*, default=Parameter.empty, annotation=Parameter.empty) +.. class:: Parameter(name, kind, *, default=Parameter.empty, annotation=Parameter.empty) Parameter objects are *immutable*. Instead of modifying a Parameter object, you can use :meth:`Parameter.replace` to create a modified copy. |