summaryrefslogtreecommitdiff
path: root/grammar/python/input.py
blob: a63800680631022ae34027e8521d6dbe3595c72c (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# dude, this is a comment
 # some more
hello
def dude():
    yes
    awesome;

    # Here we have a comment
    def realy_awesome(): # hi there
      in_more

      same_level 
      def one_liner(): first; second # both inside one_liner

    back_down

last_statement

# dude, this is a comment
 # some more
hello
if 1:
    yes
    awesome;

    # Here we have a comment
    if ('hello'): # hi there
      in_more

      same_level 
      if ['dude', 'dudess'].horsie(): first; second # both inside one_liner
      1

    back_down

last_statement

hello = 1.1(20);

# subscription
a[1] = b[2];

# simple slicing
c[1:1] = d[2:2];

# simple slicing
e[1:1, 2:2] = f[3:3, 4:4];