[New-bugs-announce] [issue16967] Keyword keyword only default parameters are evaluated before po
Kay Hayen
report at bugs.python.org
Mon Jan 14 20:37:14 CET 2013
New submission from Kay Hayen:
Suprisingly, keyword only arguments become evaluated first:
>>> def f(a=undefined1,*,b=undefined2):pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'undefined2' is not defined
It should be "undefined1".
I am sure, this is going to surprise developers and breaks assumptions, people tend to make. So far (to my knowledge) nothing that was separated by a "," could be evaluated in a mixed order.
Please consider to change this around.
----------
components: Interpreter Core
messages: 179970
nosy: Kay.Hayen
priority: normal
severity: normal
status: open
title: Keyword keyword only default parameters are evaluated before po
versions: Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16967>
_______________________________________
More information about the New-bugs-announce
mailing list