Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
943cab2f
Commit
943cab2f
authored
May 07, 2012
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Plain Diff
Issue #14741: Merge fix from 3.2.
parents
72f6095d
da029fb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
Lib/test/test_parser.py
Lib/test/test_parser.py
+2
-0
Misc/NEWS
Misc/NEWS
+2
-0
Modules/parsermodule.c
Modules/parsermodule.c
+1
-5
No files found.
Lib/test/test_parser.py
View file @
943cab2f
...
...
@@ -110,6 +110,8 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self
.
check_expr
(
"lambda x, *y, **z: 0"
)
self
.
check_expr
(
"(x for x in range(10))"
)
self
.
check_expr
(
"foo(x for x in range(10))"
)
self
.
check_expr
(
"..."
)
self
.
check_expr
(
"a[...]"
)
def
test_simple_expression
(
self
):
# expr_stmt
...
...
Misc/NEWS
View file @
943cab2f
...
...
@@ -20,6 +20,8 @@ Core and Builtins
Library
-------
- Issue #14741: Fix missing support for Ellipsis ('
...
') in parser module.
- Issue #14697: Fix missing support for set displays and set comprehensions in
parser module.
...
...
Modules/parsermodule.c
View file @
943cab2f
...
...
@@ -2419,17 +2419,13 @@ validate_atom(node *tree)
break
;
case
NAME
:
case
NUMBER
:
case
ELLIPSIS
:
res
=
(
nch
==
1
);
break
;
case
STRING
:
for
(
pos
=
1
;
res
&&
(
pos
<
nch
);
++
pos
)
res
=
validate_ntype
(
CHILD
(
tree
,
pos
),
STRING
);
break
;
case
DOT
:
res
=
(
nch
==
3
&&
validate_ntype
(
CHILD
(
tree
,
1
),
DOT
)
&&
validate_ntype
(
CHILD
(
tree
,
2
),
DOT
));
break
;
default:
res
=
0
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment