This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Update string.Formatter.vformat documentation to say "**kwargs"
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: docs@python, eric.araujo, ezio.melotti, python-dev, taavi-burns
Priority: normal Keywords: patch

Created on 2012-11-26 04:11 by taavi-burns, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
kwds_kwargs.diff taavi-burns, 2012-11-26 04:11 review
Messages (8)
msg176393 - (view) Author: Taavi Burns (taavi-burns) Date: 2012-11-26 04:11
The documentation says "**kwds" instead of "**kwargs", which is what the function signature uses.

I noticed some other (internally-consistent) occurrences in string.rst. Is there any interest in replacing "**kwds" generally with "**kwargs"? It looks like 327 vs 932 ratio in the docs, and closer to 1185 vs 2361 in the source tree as a whole.

Thanks!
msg176396 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-11-26 05:00
Hello Taavi!  It seems to me there is little value in changing all docs to use “**kwargs” instead of “**kwds”, given that this cannot cause actual problems.  The interesting thing is that the function takes keyword args.

For string.Formatter.vformat, I see no harm in changing it, but also no value.  Core developers tend to resist to aesthetic/cleanup/perfectionism-only changes for the sake of minimizing diff churn, avoiding divergences between versions and not taking unneeded risks (less so for doc changes, but a real concern for code cleanups).  Ezio, what do you think?
msg176402 - (view) Author: Taavi Burns (taavi-burns) Date: 2012-11-26 06:40
The issue of churn is totally fair.

I'd still advocate for the attached patch, as it's tiny and fixes an inconsistency between the function signature and the docs that are referring to that signature.

Thanks!
msg176481 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-11-27 17:19
New changeset d805982336a0 by Ezio Melotti in branch '2.7':
#16556: Fix inconsistency between kwds and kwargs.  Patch by Taavi Burns.
http://hg.python.org/cpython/rev/d805982336a0

New changeset 565c3bbed7d3 by Ezio Melotti in branch '3.2':
#16556: Fix inconsistency between kwds and kwargs.  Patch by Taavi Burns.
http://hg.python.org/cpython/rev/565c3bbed7d3

New changeset ae19d86b71c8 by Ezio Melotti in branch '3.3':
#16556: merge with 3.2.
http://hg.python.org/cpython/rev/ae19d86b71c8

New changeset c28f593ea0cb by Ezio Melotti in branch 'default':
#16556: merge with 3.3.
http://hg.python.org/cpython/rev/c28f593ea0cb
msg176482 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-11-27 17:22
The patch looked OK, so I committed it.
Regarding similar cleanups I think it's OK to do them only if the inconsistency is in the same function.  If different functions use kwds or kwargs in different places but they do it consistently, then it doesn't matter.
msg176483 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-11-27 17:30
Oh, I had totally missed that the mismatch was between the function signature in the docs and another part of the doc (I thought it was between the real function signature and the doc).  Good catch!
msg176795 - (view) Author: Taavi Burns (taavi-burns) Date: 2012-12-02 15:28
Ah, yes, I could have been more clear that I wasn't even looking at the source code itself. :)

Thanks!
msg176796 - (view) Author: Taavi Burns (taavi-burns) Date: 2012-12-02 15:50
Gak, sorry, didn't mean to change the status and resolution!
History
Date User Action Args
2022-04-11 14:57:38adminsetgithub: 60760
2012-12-02 15:50:23taavi-burnssetstatus: open -> closed
resolution: fixed
messages: + msg176796
2012-12-02 15:28:05taavi-burnssetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg176795

versions: - Python 3.2, Python 3.4
2012-11-27 17:30:18eric.araujosetmessages: + msg176483
2012-11-27 17:22:29ezio.melottisetstatus: open -> closed
versions: + Python 3.2, Python 3.4
messages: + msg176482

assignee: docs@python -> ezio.melotti
resolution: fixed
stage: resolved
2012-11-27 17:19:14python-devsetnosy: + python-dev
messages: + msg176481
2012-11-26 06:40:52taavi-burnssetmessages: + msg176402
2012-11-26 05:00:38eric.araujosetnosy: + ezio.melotti, eric.araujo
messages: + msg176396
2012-11-26 04:11:33taavi-burnscreate