nested list comprehension with brackets: parser failed; fixes #26

This commit is contained in:
David Halter committed 2012-10-16 13:56:10 +02:00
1 parent 172b297b59
commit 6a8b160e1b
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -134,6 +134,14 @@ b = [b for arr in [[[1.0]]] for a in arr for b in a]
#? float()
b[0]
# jedi issue #26
#? list()
a = [[int(v) for v in line.strip().split() if v] for line in ["123", "123", "123"] if line]
#? list()
a[0]
#? int()
a[0][0]
# -----------------
# ternary operator
# -----------------