Commit bc873417 authored by Christian Heimes's avatar Christian Heimes

Fixed #1573: Improper use of the keyword-only syntax makes the parser crash

>>> def f(*, **kw):
...   pass
...
python: Python/ast.c:652: handle_keywordonly_args: Assertion 'kwonlyargs
!= ((void *)0)' failed.
parent da65f607
...@@ -4,7 +4,27 @@ Python News ...@@ -4,7 +4,27 @@ Python News
(editors: check NEWS.help for information about editing NEWS using ReST.) (editors: check NEWS.help for information about editing NEWS using ReST.)
What's New in Python 3.0a3?
===========================
*Release data: XX-XXX-2008*
Core and Builtins
-----------------
- Issue #1573: Improper use of the keyword-only syntax makes the parser crash
Extension Modules
-----------------
Library
-------
What's New in Python 3.0a2? What's New in Python 3.0a2?
===========================
*Release date: 07-Dec-2007* *Release date: 07-Dec-2007*
......
...@@ -649,8 +649,8 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start, ...@@ -649,8 +649,8 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
arg_ty arg; arg_ty arg;
int i = start; int i = start;
int j = 0; /* index for kwdefaults and kwonlyargs */ int j = 0; /* index for kwdefaults and kwonlyargs */
assert(kwonlyargs != NULL); assert((kwonlyargs != NULL && kwdefaults != NULL) ||
assert(kwdefaults != NULL); TYPE(CHILD(n, i)) == DOUBLESTAR);
while (i < NCH(n)) { while (i < NCH(n)) {
ch = CHILD(n, i); ch = CHILD(n, i);
switch (TYPE(ch)) { switch (TYPE(ch)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment