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))
34 flags & ~ select.EPOLLIN and waiters.write_task is not None
37 lambda a, b, c=True: a
38 lambda a, b, c=True, *, d=(1 << v2), e='str': a
39 lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
41 str or None if True else str or bytes or None
42 (str or None) if True else (str or bytes or None)
43 str or None if (1 if True else 2) else str or bytes or None
44 (str or None) if (1 if True else 2) else (str or bytes or None)
45 {'2.7': dead, '3.7': (long_live or die_hard)}
46 {'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
48 {'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
49 ({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
55 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
56 {i for i in (1, 2, 3)}
57 {(i ** 2) for i in (1, 2, 3)}
58 {(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
59 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
60 [i for i in (1, 2, 3)]
61 [(i ** 2) for i in (1, 2, 3)]
62 [(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
63 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
64 {i: 0 for i in (1, 2, 3)}
65 {i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
66 {a: b * 2 for a, b in dictionary.items()}
67 {a: b * -2 for a, b in dictionary.items()}
68 {k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
69 Python3 > Python2 > COBOL
74 call(arg, kwarg='hey')
75 call(arg, another, kwarg='hey', **kwargs)
76 call(this_is_a_very_long_variable_which_will_force_a_delimiter_split, arg, another, kwarg='hey', **kwargs) # note: no trailing comma pre-3.6
78 call(**self.screen_kwargs)
87 tuple[str, int, float, dict[str, int]]
106 numpy[:, (0, 1, 2, 5)]
114 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
115 {'2.7': dead, '3.7': long_live or die_hard}
116 {'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
117 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
121 (i for i in (1, 2, 3))
122 ((i ** 2) for i in (1, 2, 3))
123 ((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
124 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
131 what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
132 what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
133 result = session.query(models.Customer.id).filter(models.Customer.account_id == account_id, models.Customer.email == email_address).order_by(models.Customer.id.asc(),).all()
136 yield from outside_of_generator
140 await some.complicated[0].call(with_args=(True or (1 is not 1)))
143 threading.current_thread() != threading.main_thread() and
144 threading.current_thread() != threading.main_thread() or
145 signal.getsignal(signal.SIGINT) != signal.default_int_handler
149 # standalone comment at ENDMARKER
166 True or False or None
168 True and False and None
169 (Name1 and Name2) or Name3
170 Name1 and Name2 or Name3
171 Name1 or (Name2 and Name3)
172 Name1 or Name2 and Name3
173 (Name1 and Name2) or (Name3 and Name4)
174 Name1 and Name2 or Name3 and Name4
175 Name1 or (Name2 and Name3) or Name4
176 Name1 or Name2 and Name3 or Name4
180 1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
181 ((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
186 ~int and not v1 ^ 123 + v2 | True
187 (~int) and (not ((v1 ^ (123 + v2)) | True))
188 flags & ~select.EPOLLIN and waiters.write_task is not None
191 lambda a, b, c=True: a
192 lambda a, b, c=True, *, d=(1 << v2), e='str': a
193 lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
195 str or None if True else str or bytes or None
196 (str or None) if True else (str or bytes or None)
197 str or None if (1 if True else 2) else str or bytes or None
198 (str or None) if (1 if True else 2) else (str or bytes or None)
199 {'2.7': dead, '3.7': (long_live or die_hard)}
200 {'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
202 {'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
203 ({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
209 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
210 {i for i in (1, 2, 3)}
211 {(i ** 2) for i in (1, 2, 3)}
212 {(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
213 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
214 [i for i in (1, 2, 3)]
215 [(i ** 2) for i in (1, 2, 3)]
216 [(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
217 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
218 {i: 0 for i in (1, 2, 3)}
219 {i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
220 {a: b * 2 for a, b in dictionary.items()}
221 {a: b * -2 for a, b in dictionary.items()}
224 for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
226 Python3 > Python2 > COBOL
231 call(arg, kwarg='hey')
232 call(arg, another, kwarg='hey', **kwargs)
234 this_is_a_very_long_variable_which_will_force_a_delimiter_split,
239 ) # note: no trailing comma pre-3.6
241 call(**self.screen_kwargs)
250 tuple[str, int, float, dict[str, int]]
269 numpy[:, (0, 1, 2, 5)]
277 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
278 {'2.7': dead, '3.7': long_live or die_hard}
279 {'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
280 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
284 (i for i in (1, 2, 3))
285 ((i ** 2) for i in (1, 2, 3))
286 ((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
287 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
294 what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
297 what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
300 result = session.query(models.Customer.id).filter(
301 models.Customer.account_id == account_id, models.Customer.email == email_address
303 models.Customer.id.asc()
308 yield from outside_of_generator
314 await some.complicated[0].call(with_args=(True or (1 is not 1)))
318 threading.current_thread() != threading.main_thread()
319 and threading.current_thread() != threading.main_thread()
320 or signal.getsignal(signal.SIGINT) != signal.default_int_handler
325 # standalone comment at ENDMARKER