File: fstrings.py

package info (click to toggle)
python-pegen 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,980 kB
  • sloc: python: 15,064; makefile: 89
file content (70 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
a = 10
f'{a * x()}'



f'no formatted values'
f'eggs {a * x()} spam {b + y()}'



a = 10
f'{a * x()} {a * x()} {a * x()}'



a = 10
f'''
  {a
     *
       x()}
non-important content
'''



a = f'''
          {blech}
    '''



x = (
    f" {test(t)}"
)



x = (
    u'wat',
    u"wat",
    b'wat',
    b"wat",
    f'wat',
    f"wat",
)
y = (
    u'''wat''',
    u"""wat""",
    b'''wat''',
    b"""wat""",
    f'''wat''',
    f"""wat""",
)



x = (
        'PERL_MM_OPT', (
            f'wat'
            f'some_string={f(x)} '
            f'wat'
        ),
)



f'{expr:}'
f'{expr:d}'
foo = 3.14159
verbosePrint(f'Foo {foo:.3} bar.')