projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6608bae
)
fix for dict literals that end with ','
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 12 Dec 2008 18:30:27 +0000
(19:30 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 12 Dec 2008 18:30:27 +0000
(19:30 +0100)
Cython/Compiler/Parsing.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Parsing.py
b/Cython/Compiler/Parsing.py
index 553c1e2aa11f13aa4591fd67c44096b6506d9900..c95de0eaf84d755587815dbca61673c0b6d8aaa8 100644
(file)
--- a/
Cython/Compiler/Parsing.py
+++ b/
Cython/Compiler/Parsing.py
@@
-761,6
+761,8
@@
def p_dict_or_set_maker(s):
values = [item]
while s.sy == ',':
s.next()
+ if s.sy == '}':
+ break
values.append( p_simple_expr(s) )
s.expect('}')
return ExprNodes.SetNode(pos, args=values)
@@
-789,6
+791,8
@@
def p_dict_or_set_maker(s):
items = [ExprNodes.DictItemNode(key.pos, key=key, value=value)]
while s.sy == ',':
s.next()
+ if s.sy == '}':
+ break
key = p_simple_expr(s)
s.expect(':')
value = p_simple_expr(s)