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)]
57 {i for i in (1, 2, 3)}
58 {(i ** 2) for i in (1, 2, 3)}
59 {(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
60 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
61 [i for i in (1, 2, 3)]
62 [(i ** 2) for i in (1, 2, 3)]
63 [(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
64 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
65 {i: 0 for i in (1, 2, 3)}
66 {i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
67 {a: b * 2 for a, b in dictionary.items()}
68 {a: b * -2 for a, b in dictionary.items()}
69 {k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
70 Python3 > Python2 > COBOL
75 call(arg, kwarg='hey')
76 call(arg, another, kwarg='hey', **kwargs)
77 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
79 call(**self.screen_kwargs)
88 tuple[str, int, float, dict[str, int],]
89 very_long_variable_name_filters: t.List[
90 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
110 numpy[:, (0, 1, 2, 5)]
118 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
119 {'2.7': dead, '3.7': long_live or die_hard}
120 {'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
121 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
125 (i for i in (1, 2, 3))
126 ((i ** 2) for i in (1, 2, 3))
127 ((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
128 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
135 what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
136 what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
137 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()
139 authors.łukasz.say_thanks()
142 yield from outside_of_generator
146 await some.complicated[0].call(with_args=(True or (1 is not 1)))
147 for x, in (1,), (2,), (3,): ...
149 for z in (i for i in (1, 2, 3)): ...
150 for i in (call()): ...
151 for j in (1 + (2 + 3)): ...
152 while(this and that): ...
154 threading.current_thread() != threading.main_thread() and
155 threading.current_thread() != threading.main_thread() or
156 signal.getsignal(signal.SIGINT) != signal.default_int_handler
160 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
161 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
165 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
166 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
170 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
171 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
175 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
176 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
180 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
181 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
185 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
186 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
190 # standalone comment at ENDMARKER
207 True or False or None
209 True and False and None
210 (Name1 and Name2) or Name3
211 Name1 and Name2 or Name3
212 Name1 or (Name2 and Name3)
213 Name1 or Name2 and Name3
214 (Name1 and Name2) or (Name3 and Name4)
215 Name1 and Name2 or Name3 and Name4
216 Name1 or (Name2 and Name3) or Name4
217 Name1 or Name2 and Name3 or Name4
221 1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
222 ((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
227 ~int and not v1 ^ 123 + v2 | True
228 (~int) and (not ((v1 ^ (123 + v2)) | True))
229 flags & ~select.EPOLLIN and waiters.write_task is not None
232 lambda a, b, c=True: a
233 lambda a, b, c=True, *, d=(1 << v2), e="str": a
234 lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
236 str or None if True else str or bytes or None
237 (str or None) if True else (str or bytes or None)
238 str or None if (1 if True else 2) else str or bytes or None
239 (str or None) if (1 if True else 2) else (str or bytes or None)
240 {"2.7": dead, "3.7": (long_live or die_hard)}
241 {"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
243 {"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
244 ({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
250 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
252 {i for i in (1, 2, 3)}
253 {(i ** 2) for i in (1, 2, 3)}
254 {(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
255 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
256 [i for i in (1, 2, 3)]
257 [(i ** 2) for i in (1, 2, 3)]
258 [(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
259 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
260 {i: 0 for i in (1, 2, 3)}
261 {i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
262 {a: b * 2 for a, b in dictionary.items()}
263 {a: b * -2 for a, b in dictionary.items()}
266 for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
268 Python3 > Python2 > COBOL
273 call(arg, kwarg="hey")
274 call(arg, another, kwarg="hey", **kwargs)
276 this_is_a_very_long_variable_which_will_force_a_delimiter_split,
281 ) # note: no trailing comma pre-3.6
283 call(**self.screen_kwargs)
292 tuple[str, int, float, dict[str, int]]
293 very_long_variable_name_filters: t.List[
294 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
314 numpy[:, (0, 1, 2, 5)]
322 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
323 {"2.7": dead, "3.7": long_live or die_hard}
324 {"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
325 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
329 (i for i in (1, 2, 3))
330 ((i ** 2) for i in (1, 2, 3))
331 ((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
332 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
339 what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
342 what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
345 result = session.query(models.Customer.id).filter(
346 models.Customer.account_id == account_id, models.Customer.email == email_address
348 models.Customer.id.asc()
351 authors.łukasz.say_thanks()
355 yield from outside_of_generator
361 await some.complicated[0].call(with_args=(True or (1 is not 1)))
364 for (x,) in (1,), (2,), (3,):
368 for z in (i for i in (1, 2, 3)):
372 for j in 1 + (2 + 3):
377 threading.current_thread() != threading.main_thread()
378 and threading.current_thread() != threading.main_thread()
379 or signal.getsignal(signal.SIGINT) != signal.default_int_handler
384 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
385 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
390 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
391 & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
396 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
397 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
402 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
403 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
408 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
409 * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
414 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
415 / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
420 # standalone comment at ENDMARKER