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)
files: namedtuple_keywords.diff
keywords: patch
messages: 254689
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Make namedtuple "verbose" and "renanme" parameters into keyword only 
arguments
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41049/namedtuple_keywords.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25628>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to