A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-December/106782.html below:

[Python-Dev] A grammatical oddity: trailing commas in argument lists -- continuation

[Python-Dev] A grammatical oddity: trailing commas in argument lists -- continuation [Python-Dev] A grammatical oddity: trailing commas in argument lists -- continuationAlexander Belopolsky alexander.belopolsky at gmail.com
Mon Dec 13 20:09:02 CET 2010
On Mon, Dec 13, 2010 at 11:54 AM, Guido van Rossum <guido at python.org> wrote:
> I'm at least +0 on
> allowing trailing commas in the situation the OP mentioned.
>

FWIW, I am also about +0.5 on allowing trailing comma.  Note that in a
similar situation,  the C standardization committee has erred on the
side of consistency:

"""
A new feature of C99: a common extension in many implementations
allows a trailing comma after the list of enumeration constants. The
Committee decided to adopt this feature as an innocuous extension that
mirrors the trailing commas allowed in initializers.
""" http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf

Similarly, I find allowing trailing comma in keyword only arguments
lists to be an innocuous extension that mirrors the trailing commas
allowed in the positional arguments lists.   A possible benefit that I
have not seen mentioned is that if developer decides to convert some
of the trailing arguments in her function to keyword only, she does
not have to worry about removing the trailing comma.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4