[Python-checkins] cpython: inspect: Fix docstrings for Parameter & Signature classes

yury.selivanov python-checkins at python.org
Tue Jan 28 22:40:06 CET 2014


http://hg.python.org/cpython/rev/d3a4e17c5058
changeset:   88797:d3a4e17c5058
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Tue Jan 28 16:39:25 2014 -0500
summary:
  inspect: Fix docstrings for Parameter & Signature classes

files:
  Lib/inspect.py |  8 +++++---
  1 files changed, 5 insertions(+), 3 deletions(-)


diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1660,10 +1660,12 @@
         The name of the parameter as a string.
     * default : object
         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
         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
         Describes how argument values are bound to the parameter.
         Possible values: `Parameter.POSITIONAL_ONLY`,
@@ -1888,7 +1890,7 @@
     * return_annotation : object
         The annotation for the return type of the function if specified.
         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
         Creates a mapping from positional and keyword arguments to
         parameters.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list