classification
Title: Fix the docstring of inspect.Parameter and the implementation of _ParameterKind
Type: enhancement Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: yselivanov Nosy List: Antony.Lee, docs@python, ethan.furman, ezio.melotti, ncoghlan, python-dev, yselivanov
Priority: normal Keywords: patch

Created on 2013-11-13 19:33 by Antony.Lee, last changed 2014-03-27 15:32 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
inspect.py.diff Antony.Lee, 2013-11-13 19:33 patch for Lib/inspect.py review
inspect.py.diff Antony.Lee, 2014-02-04 18:01 patch for Lib/inspect.py review
Messages (5)
msg202773 - (view) Author: Antony Lee (Antony.Lee) * Date: 2013-11-13 19:33
The following patch corrects the docstring of `inspect.Parameter`, as the `default` and `annotation` attributes are in fact set to `empty` if no value is provided, and the `kind` attribute is in fact an `int` (more precisely, a `_ParameterKind`).  It also reimplements the `_ParameterKind` type as an `IntEnum`, as the previous implementation (which predates stdlib enums) was more or less a hand-rolled `IntEnum`.
msg209591 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-01-28 21:42
Antony, the docstrings are fixed. Could you please provide a patch just for the _ParameterKind-Enum refactoring? I'll incorporate it into 3.5 then.
msg210255 - (view) Author: Antony Lee (Antony.Lee) * Date: 2014-02-04 18:01
Submitted new patch as suggested.
msg210256 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-02-04 18:03
The patch looks good to me. I'll merge it in 3.5 later.
msg214956 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-27 15:32
New changeset c2b94f891c88 by Yury Selivanov in branch 'default':
inspect.signature: Use enum for parameter kind constants. Closes #19573
http://hg.python.org/cpython/rev/c2b94f891c88
History
Date User Action Args
2014-03-27 15:32:29python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg214956

resolution: fixed
stage: patch review -> resolved
2014-02-04 18:03:36yselivanovsetmessages: + msg210256
2014-02-04 18:01:07Antony.Leesetfiles: + inspect.py.diff

messages: + msg210255
2014-01-28 21:42:18yselivanovsetassignee: docs@python -> yselivanov
messages: + msg209591
2014-01-28 21:35:28yselivanovsetnosy: + yselivanov

versions: + Python 3.5, - Python 3.4
2013-11-16 19:05:08ezio.melottisetnosy: + ncoghlan, ezio.melotti, ethan.furman
stage: patch review

components: + Library (Lib)
versions: + Python 3.4
2013-11-13 19:33:43Antony.Leecreate