dict literals are now working (at least the parser)
This commit is contained in:
1 parent
387319fde5
commit
1f7e4ca637
3 files changed
+10
-11
No files matched your search
@@ -132,11 +132,11 @@ a = [a if 1.0 else '' for a in [1] if [1.0]]
|
||||
a[0]
|
||||
|
||||
# with a dict literal
|
||||
#? int()
|
||||
[a for a,b in {1:2}.items()][0]
|
||||
|
||||
#? str()
|
||||
{a:b for a,b in {1:'a', 3:1.0}.items()}[1]
|
||||
[a for a in {1:'x'}][0]
|
||||
|
||||
##? str()
|
||||
{a-1:b for a,b in {1:'a', 3:1.0}.items()}[0]
|
||||
|
||||
# -----------------
|
||||
# nested list comprehensions
|
||||
|
||||
Reference in new issue
Block a user