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 <rep...@bugs.python.org>
<http://bugs.python.org/issue16967>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to