Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(910)

#27172: Add skip_bound_arg argument to inspect.Signature.from_callable()

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 6 months ago by ryan
Modified:
1 year ago
Reviewers:
ghost.adh, berker.peksag, vadmium+py
CC:
brett.cannon, Nick Coghlan, larry, ned.deily, r.david.murray, SilentGhost, devnull_psf.upfronthosting.co.za, eric.snow, storchaka, Yury Selivanov, Tim.Graham, ryan.petrello
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 5

Patch Set 3 #

Total comments: 5

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Total comments: 6

Patch Set 7 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/inspect.rst View 1 2 3 4 5 6 1 chunk +37 lines, -17 lines 0 comments Download
Doc/whatsnew/3.6.rst View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
Lib/inspect.py View 1 2 3 4 5 6 2 chunks +27 lines, -19 lines 0 comments Download
Misc/NEWS View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 6
SilentGhost
https://bugs.python.org/review/27172/diff/17411/Doc/library/inspect.rst File Doc/library/inspect.rst (right): https://bugs.python.org/review/27172/diff/17411/Doc/library/inspect.rst#newcode609 Doc/library/inspect.rst:609: .. versionadded:: 3.6 This should be versionchanged and it ...
1 year, 6 months ago #1
berkerpeksag
Bonus points if you can add a small note to Doc/whatsnew/3.6.rst :) Thanks! http://bugs.python.org/review/27172/diff/17416/Doc/library/inspect.rst File ...
1 year, 6 months ago #2
ryan.petrello
http://bugs.python.org/review/27172/diff/17416/Lib/test/test_inspect.py File Lib/test/test_inspect.py (right): http://bugs.python.org/review/27172/diff/17416/Lib/test/test_inspect.py#newcode2869 Lib/test/test_inspect.py:2869: class MyObj(object): On 2016/06/01 20:10:10, berkerpeksag wrote: > MyObj(object): ...
1 year, 6 months ago #3
SilentGhost
On 2016/06/01 20:48:15, ryan.petrello wrote: > http://bugs.python.org/review/27172/diff/17416/Lib/test/test_inspect.py > File Lib/test/test_inspect.py (right): > > http://bugs.python.org/review/27172/diff/17416/Lib/test/test_inspect.py#newcode2869 > ...
1 year, 6 months ago #4
berkerpeksag
On 2016/06/01 20:53:31, SilentGhost wrote: > On 2016/06/01 20:48:15, ryan.petrello wrote: > > http://bugs.python.org/review/27172/diff/17416/Lib/test/test_inspect.py > ...
1 year, 6 months ago #5
Martin Panter
1 year ago #6
https://bugs.python.org/review/27172/diff/19298/Doc/library/inspect.rst
File Doc/library/inspect.rst (right):

https://bugs.python.org/review/27172/diff/19298/Doc/library/inspect.rst#newco...
Doc/library/inspect.rst:820: returned. *args* is a list of the parameters names.
*varargs* and *keywords*
parameter [no S]

https://bugs.python.org/review/27172/diff/19298/Doc/library/inspect.rst#newco...
Doc/library/inspect.rst:843: *args* is a list of the parameter names accepted as
positional arguments.
Some of these changes seem to make things more awkward. To start, why can’t we
simplify this to:

*Args* is a list of the positional parameter names.

Or more precise but longer:

*Args* is a list of the parameter names bound to positional arguments.

(You don’t have to literally pass the parameter names as arguments.)

https://bugs.python.org/review/27172/diff/19298/Doc/library/inspect.rst#newco...
Doc/library/inspect.rst:846: *varkw* is the name of the ``**`` parameter or
``None`` arbitrary
``None`` [if] arbitrary . . .

https://bugs.python.org/review/27172/diff/19298/Doc/library/inspect.rst#newco...
Doc/library/inspect.rst:849: parameters that can be passed as positional
arguments, or ``None``
Passing parameters as arguments is confusing. I think the description from
getargspec() is clearer. Another option:

*Defaults* is an *n*-tuple of the last *n* default positional argument values,
or ``None`` . . .

Or matching another suggestion above:

*Defaults* is an *n*-tuple of default argument values bound to the last *n*
positional parameters, or ``None`` . . .

https://bugs.python.org/review/27172/diff/19298/Doc/library/inspect.rst#newco...
Doc/library/inspect.rst:851: *kwonlyargs* is a list of keyword-only parameter
names that must be
Supplying names as arguments confuses me again; these names are keywords, not
argument values. I suggest:

*Kwonlyargs* is a list of keyword-only parameter names.

(The original text, “keyword-only argument names”, is also fine IMO. The
keywords happen to match the parameter names in the function implementation.)

https://bugs.python.org/review/27172/diff/19298/Doc/library/inspect.rst#newco...
Doc/library/inspect.rst:855: *annotations* is a dictionary mapping parameters
names to annotations.
mapping [parameter] names
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7