mirror of https://github.com/python/cpython.git
inspect: Fix docstrings for Parameter & Signature classes
This commit is contained in:
parent
62560fb19a
commit
8757ead38e
|
@ -1660,10 +1660,12 @@ class Parameter:
|
||||||
The name of the parameter as a string.
|
The name of the parameter as a string.
|
||||||
* default : object
|
* default : object
|
||||||
The default value for the parameter if specified. If the
|
The default value for the parameter if specified. If the
|
||||||
parameter has no default value, this attribute is not set.
|
parameter has no default value, this attribute is set to
|
||||||
|
`Parameter.empty`.
|
||||||
* annotation
|
* annotation
|
||||||
The annotation for the parameter if specified. If the
|
The annotation for the parameter if specified. If the
|
||||||
parameter has no annotation, this attribute is not set.
|
parameter has no annotation, this attribute is set to
|
||||||
|
`Parameter.empty`.
|
||||||
* kind : str
|
* kind : str
|
||||||
Describes how argument values are bound to the parameter.
|
Describes how argument values are bound to the parameter.
|
||||||
Possible values: `Parameter.POSITIONAL_ONLY`,
|
Possible values: `Parameter.POSITIONAL_ONLY`,
|
||||||
|
@ -1888,7 +1890,7 @@ class Signature:
|
||||||
* return_annotation : object
|
* return_annotation : object
|
||||||
The annotation for the return type of the function if specified.
|
The annotation for the return type of the function if specified.
|
||||||
If the function has no annotation for its return type, this
|
If the function has no annotation for its return type, this
|
||||||
attribute is not set.
|
attribute is set to `Signature.empty`.
|
||||||
* bind(*args, **kwargs) -> BoundArguments
|
* bind(*args, **kwargs) -> BoundArguments
|
||||||
Creates a mapping from positional and keyword arguments to
|
Creates a mapping from positional and keyword arguments to
|
||||||
parameters.
|
parameters.
|
||||||
|
|
Loading…
Reference in New Issue