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: namedtuples field_names sequence preferred
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Mariatta Nosy List: Mariatta, cheryl.sabella, docs@python, peentoon, rhettinger
Priority: normal Keywords:

Created on 2016-12-01 14:05 by peentoon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1274 merged cheryl.sabella, 2017-04-24 21:17
PR 1286 merged Mariatta, 2017-04-26 01:18
Messages (8)
msg282177 - (view) Author: Francesco Grondona (peentoon) Date: 2016-12-01 14:05
A change by mhettinger in the doc of Python 2 years ago implicitely stated a sequence of strings as preferred way to provide 'field_names' to a namedtuple:

https://github.com/python/cpython/commit/7be6326e09f2062315f995a18ab54baedfd0c0ff

Same change should be integrated in Python 3, I see no reason to prefer the single string version.
msg282197 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-12-01 16:34
Thanks for the reminder.  I'll make the doc updates after 3.6 is released (we're trying to not make any changes at all right now).
msg292240 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2017-04-24 21:18
Hope it's OK that I've made a PR for these changes.
msg292262 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-04-25 14:41
Mariatta, I've approved Cheryl's PR.  Would like to do the honors and apply it.
msg292268 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-04-25 16:14
New changeset 97bf722fcd1de1236824377e052369dc7686b644 by Mariatta (csabella) in branch 'master':
bpo-28851: Improve namedtuple documentation (GH-1274)
https://github.com/python/cpython/commit/97bf722fcd1de1236824377e052369dc7686b644
msg292269 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-04-25 16:15
My pleasure :) I merged the PR, and will do the backport later today.
msg292291 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-04-26 01:23
New changeset 16b6f971bd8afc72b439b83324eba744460adb67 by Mariatta in branch '3.6':
[3.6] bpo-28851: Improve namedtuple documentation (GH-1274) (GH-1286)
https://github.com/python/cpython/commit/16b6f971bd8afc72b439b83324eba744460adb67
msg292292 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-04-26 01:23
Backported to 3.6.

Thanks, everyone :)
History
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 73037
2017-04-26 01:23:57Mariattasetstatus: open -> closed
resolution: later -> fixed
messages: + msg292292

stage: backport needed -> resolved
2017-04-26 01:23:07Mariattasetmessages: + msg292291
2017-04-26 01:18:19Mariattasetpull_requests: + pull_request1394
2017-04-25 16:15:54Mariattasetmessages: + msg292269
stage: backport needed
2017-04-25 16:14:48Mariattasetmessages: + msg292268
2017-04-25 14:41:18rhettingersetassignee: rhettinger -> Mariatta

messages: + msg292262
nosy: + Mariatta
2017-04-24 21:18:56cheryl.sabellasetnosy: + cheryl.sabella
messages: + msg292240
2017-04-24 21:17:20cheryl.sabellasetpull_requests: + pull_request1385
2016-12-01 16:34:42rhettingersetresolution: later
messages: + msg282197
versions: - Python 3.3, Python 3.4, Python 3.5
2016-12-01 14:13:31serhiy.storchakasetassignee: docs@python -> rhettinger

nosy: + rhettinger
2016-12-01 14:05:35peentooncreate