aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/python/comprehensions.py
blob: 53c3961e148d7f549f661bce89e11973bcdf506d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# list
a = [
    x + 1 for x in range(3)
]

# dict
b = {
    x: x + 1 for x in range(3)
}

# generator
c = (
    x * x for x in range(3)
)

# set
d = {
    x + x for x in range(3)
}

# other styles
e = [
    x + 1 for x
    in range(3)
]