[Python-3000-checkins] r59432 - in python/branches/py3k: Misc/NEWS Python/ast.c

christian.heimes python-3000-checkins at python.org
Sat Dec 8 23:11:32 CET 2007


Author: christian.heimes
Date: Sat Dec  8 23:11:32 2007
New Revision: 59432

Modified:
   python/branches/py3k/Misc/NEWS
   python/branches/py3k/Python/ast.c
Log:
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.


Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Sat Dec  8 23:11:32 2007
@@ -4,7 +4,27 @@
 
 (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?
+===========================
 
 *Release date: 07-Dec-2007*
 

Modified: python/branches/py3k/Python/ast.c
==============================================================================
--- python/branches/py3k/Python/ast.c	(original)
+++ python/branches/py3k/Python/ast.c	Sat Dec  8 23:11:32 2007
@@ -649,8 +649,8 @@
     arg_ty arg;
     int i = start;
     int j = 0; /* index for kwdefaults and kwonlyargs */
-    assert(kwonlyargs != NULL);
-    assert(kwdefaults != NULL);
+    assert((kwonlyargs != NULL && kwdefaults != NULL) ||
+           TYPE(CHILD(n, i)) == DOUBLESTAR);
     while (i < NCH(n)) {
         ch = CHILD(n, i);
         switch (TYPE(ch)) {


More information about the Python-3000-checkins mailing list