Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
resolution: invalid -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16545
___
Changes by Jesús Cea Avión j...@jcea.es:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16545
___
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16545
___
___
Daniel Urban added the comment:
If I understand correctly, the invariant is that len(kw_defaults) ==
len(kwonlyargs). I think the reason is that the following is valid syntax (an
argument without a default after one with a default):
def f(*, a=0, b): pass
...
And None is used as a
Brett Cannon added the comment:
Ah, I see it now. I didn't realize that we allowed people to define
keyword-only arguments in any order they wanted in terms of default values,
allowing interleaving of default and non-default values. So this is correct,
just different from everything else.
New submission from Brett Cannon:
When there are no keyword-only arguments, the value of kw_defaults for
FunctionDef is []. But when keyword-only arguments are present with no default
values, it becomes [None]. That's bad as every other value in FunctionDef has a
default of [] when there is