summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-05 21:54:10 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-05 21:54:10 (GMT)
commit14acf5f41d2c9b4ec9c0f3219bc9553c31fd9a9f (patch)
treecdeed9e5dc49aaa22c8596304a1284d4135c9036 /Modules
parentcedef652fa94f28e9d37eefd8ce6a2f0401f5f45 (diff)
downloadcpython-14acf5f41d2c9b4ec9c0f3219bc9553c31fd9a9f.zip
cpython-14acf5f41d2c9b4ec9c0f3219bc9553c31fd9a9f.tar.gz
cpython-14acf5f41d2c9b4ec9c0f3219bc9553c31fd9a9f.tar.bz2
Issue #24791: Fix grammar regression for call syntax: 'g(*a or b)'.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/parsermodule.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index 2a16dba..8023558 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -2859,8 +2859,8 @@ validate_arglist(node *tree)
/* argument: ( test [comp_for] |
* test '=' test |
- * '**' expr |
- * star_expr )
+ * '**' test |
+ * '*' test )
*/
static int
validate_argument(node *tree)
@@ -2873,8 +2873,11 @@ validate_argument(node *tree)
if (TYPE(CHILD(tree, 0)) == DOUBLESTAR) {
res = validate_test(CHILD(tree, 1));
}
+ else if (TYPE(CHILD(tree, 0)) == STAR) {
+ res = validate_test(CHILD(tree, 1));
+ }
else if (nch == 1) {
- res = validate_test_or_star_expr(CHILD(tree, 0));
+ res = validate_test(CHILD(tree, 0));
}
else if (nch == 2) {
res = (validate_test(CHILD(tree, 0))