[New-bugs-announce] [issue16319] optional comma inside function argument list triggers syntax error

Inyeol Lee report at bugs.python.org
Thu Oct 25 08:24:20 CEST 2012


New submission from Inyeol Lee:

Ubuntu 12.04, python 3.2.3

Optional trailing comma causes syntax error if used for keyword-only argument list:

These are OK --
def f(a, b,): pass
def f(a, b=None,): pass

These triggers syntax error --
def f(a, *, b,): pass
def f(a, *, b=None,): pass

python 3.1 and 3.2 shows this error, not tested for 3.3 yet.

----------
components: Interpreter Core
messages: 173735
nosy: Inyeol.Lee
priority: normal
severity: normal
status: open
title: optional comma inside function argument list triggers syntax error
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16319>
_______________________________________


More information about the New-bugs-announce mailing list