[New-bugs-announce] [issue25628] Make namedtuple "verbose" and "renanme" parameters into keyword only arguments
report at bugs.python.org
Sun Nov 15 14:21:13 EST 2015
New submission from Raymond Hettinger:
This is a usability and readability improvement made possible by Python 3's keyword only arguments.
Usability is improved by getting a much less confusing response from the following mistake:
namedtuple('Point', 'x', 'y')
^--- invisibly goes to the "verbose" argument
The "verbose" argument is normally used interactively (much like help() and dis()) or is used with a keyword argument, so it is unlikely that existing scripts will be much affected. For the rare cases, the remediation is simple and improves code clarity (replacing "True" with "verbose=True").
components: Library (Lib)
title: Make namedtuple "verbose" and "renanme" parameters into keyword only arguments
versions: Python 3.6
Added file: http://bugs.python.org/file41049/namedtuple_keywords.diff
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce