All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
14 True and False and None
15 (Name1 and Name2) or Name3
16 Name1 and Name2 or Name3
17 Name1 or (Name2 and Name3)
18 Name1 or Name2 and Name3
19 (Name1 and Name2) or (Name3 and Name4)
20 Name1 and Name2 or Name3 and Name4
21 Name1 or (Name2 and Name3) or Name4
22 Name1 or Name2 and Name3 or Name4
26 1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
27 ((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
32 ~int and not v1 ^ 123 + v2 | True
33 (~int) and (not ((v1 ^ (123 + v2)) | True))
36 lambda a, b, c=True: a
37 lambda a, b, c=True, *, d=(1 << v2), e='str': a
38 lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
40 str or None if True else str or bytes or None
41 (str or None) if True else (str or bytes or None)
42 str or None if (1 if True else 2) else str or bytes or None
43 (str or None) if (1 if True else 2) else (str or bytes or None)
44 {'2.7': dead, '3.7': (long_live or die_hard)}
45 {'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
47 {'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
48 ({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
54 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
55 {i for i in (1, 2, 3)}
56 {(i ** 2) for i in (1, 2, 3)}
57 {(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
58 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
59 [i for i in (1, 2, 3)]
60 [(i ** 2) for i in (1, 2, 3)]
61 [(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
62 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
63 {i: 0 for i in (1, 2, 3)}
64 {i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
65 Python3 > Python2 > COBOL
70 call(arg, kwarg='hey')
71 call(arg, another, kwarg='hey', **kwargs)
80 tuple[str, int, float, dict[str, int]]
88 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
89 f'f-string without formatted values is just a string'
90 f'{{NOT a formatted value}}'
91 f'some f-string with {a} {few():.2f} {formatted.values!r}'
92 f"{f'{nested} inner'} outer"
93 f'space between opening braces: { {a for a in (1, 2, 3)}}'
94 {'2.7': dead, '3.7': long_live or die_hard}
95 {'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
96 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
100 (i for i in (1, 2, 3))
101 ((i ** 2) for i in (1, 2, 3))
102 ((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
103 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
112 yield from outside_of_generator
117 await some.complicated[0].call(with_args=(True or (1 is not 1)))
134 True or False or None
136 True and False and None
137 (Name1 and Name2) or Name3
138 Name1 and Name2 or Name3
139 Name1 or (Name2 and Name3)
140 Name1 or Name2 and Name3
141 (Name1 and Name2) or (Name3 and Name4)
142 Name1 and Name2 or Name3 and Name4
143 Name1 or (Name2 and Name3) or Name4
144 Name1 or Name2 and Name3 or Name4
148 1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
149 ((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
154 ~int and not v1 ^ 123 + v2 | True
155 (~int) and (not ((v1 ^ (123 + v2)) | True))
158 lambda a, b, c=True: a
159 lambda a, b, c=True, *, d=(1 << v2), e='str': a
160 lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
162 str or None if True else str or bytes or None
163 (str or None) if True else (str or bytes or None)
164 str or None if (1 if True else 2) else str or bytes or None
165 (str or None) if (1 if True else 2) else (str or bytes or None)
166 {'2.7': dead, '3.7': (long_live or die_hard)}
167 {'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
169 {'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
170 ({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
176 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
177 {i for i in (1, 2, 3)}
178 {(i ** 2) for i in (1, 2, 3)}
179 {(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
180 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
181 [i for i in (1, 2, 3)]
182 [(i ** 2) for i in (1, 2, 3)]
183 [(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
184 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
185 {i: 0 for i in (1, 2, 3)}
186 {i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
187 Python3 > Python2 > COBOL
192 call(arg, kwarg='hey')
193 call(arg, another, kwarg='hey', **kwargs)
202 tuple[str, int, float, dict[str, int]]
210 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
211 f'f-string without formatted values is just a string'
212 f'{{NOT a formatted value}}'
213 f'some f-string with {a} {few():.2f} {formatted.values!r}'
214 f"{f'{nested} inner'} outer"
215 f'space between opening braces: { {a for a in (1, 2, 3)}}'
216 {'2.7': dead, '3.7': long_live or die_hard}
217 {'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
218 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
222 (i for i in (1, 2, 3))
223 ((i ** 2) for i in (1, 2, 3))
224 ((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
225 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
234 yield from outside_of_generator
240 await some.complicated[0].call(with_args=(True or (1 is not 1)))