tests for list comprehensions with included dict literals

This commit is contained in:
Dave Halter
2014-03-05 14:23:53 +01:00
parent 14aca9708e
commit 7d7a86239c
2 changed files with 11 additions and 6 deletions

View File

@@ -131,6 +131,13 @@ a = [a if 1.0 else '' for a in [1] if [1.0]]
#? int() str()
a[0]
# with a dict in between
#? int()
[a for a,b in {1:2}.items()][0]
#? str()
{a:b for a,b in {1:'a', 3:1.0}.items()}[1]
# -----------------
# nested list comprehensions
# -----------------