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)]
61 [this_is_a_very_long_variable_which_will_force_a_delimiter_split, element, another, *more]
62 {i for i in (1, 2, 3)}
63 {(i ** 2) for i in (1, 2, 3)}
64 {(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
65 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
66 [i for i in (1, 2, 3)]
67 [(i ** 2) for i in (1, 2, 3)]
68 [(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))]
69 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
70 {i: 0 for i in (1, 2, 3)}
71 {i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
72 {a: b * 2 for a, b in dictionary.items()}
73 {a: b * -2 for a, b in dictionary.items()}
74 {k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
75 Python3 > Python2 > COBOL
80 call(arg, kwarg='hey')
81 call(arg, another, kwarg='hey', **kwargs)
82 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
85 call(**self.screen_kwargs)
86 call(b, **self.screen_kwargs)
95 tuple[str, int, float, dict[str, int],]
96 very_long_variable_name_filters: t.List[
97 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
117 numpy[:, (0, 1, 2, 5)]
125 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
126 {'2.7': dead, '3.7': long_live or die_hard}
127 {'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
128 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
132 (i for i in (1, 2, 3))
133 ((i ** 2) for i in (1, 2, 3))
134 ((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
135 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
137 {"id": "1","type": "type","started_at": now(),"ended_at": now() + timedelta(days=10),"priority": 1,"import_session_id": 1,**kwargs}
143 what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove)
144 what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove)
145 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()
147 authors.łukasz.say_thanks()
149 A: 0.25 * (10.0 / 12),
150 B: 0.1 * (10.0 / 12),
151 C: 0.1 * (10.0 / 12),
152 D: 0.1 * (10.0 / 12),
156 yield from outside_of_generator
160 await some.complicated[0].call(with_args=(True or (1 is not 1)))
162 print(**{1: 3} if False else {x: x for x in range(3)})
164 for x, in (1,), (2,), (3,): ...
166 for z in (i for i in (1, 2, 3)): ...
167 for i in (call()): ...
168 for j in (1 + (2 + 3)): ...
169 while(this and that): ...
171 threading.current_thread() != threading.main_thread() and
172 threading.current_thread() != threading.main_thread() or
173 signal.getsignal(signal.SIGINT) != signal.default_int_handler
177 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
178 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
182 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
183 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
187 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
188 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
192 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
193 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
197 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
198 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
202 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
203 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
207 # standalone comment at ENDMARKER
224 True or False or None
226 True and False and None
227 (Name1 and Name2) or Name3
228 Name1 and Name2 or Name3
229 Name1 or (Name2 and Name3)
230 Name1 or Name2 and Name3
231 (Name1 and Name2) or (Name3 and Name4)
232 Name1 and Name2 or Name3 and Name4
233 Name1 or (Name2 and Name3) or Name4
234 Name1 or Name2 and Name3 or Name4
238 1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
239 ((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
244 ~int and not v1 ^ 123 + v2 | True
245 (~int) and (not ((v1 ^ (123 + v2)) | True))
246 flags & ~select.EPOLLIN and waiters.write_task is not None
249 lambda a, b, c=True: a
250 lambda a, b, c=True, *, d=(1 << v2), e="str": a
251 lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
253 str or None if True else str or bytes or None
254 (str or None) if True else (str or bytes or None)
255 str or None if (1 if True else 2) else str or bytes or None
256 (str or None) if (1 if True else 2) else (str or bytes or None)
257 {"2.7": dead, "3.7": (long_live or die_hard)}
258 {"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
260 {"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
261 ({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
267 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
274 this_is_a_very_long_variable_which_will_force_a_delimiter_split,
279 {i for i in (1, 2, 3)}
280 {(i ** 2) for i in (1, 2, 3)}
281 {(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
282 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
283 [i for i in (1, 2, 3)]
284 [(i ** 2) for i in (1, 2, 3)]
285 [(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
286 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
287 {i: 0 for i in (1, 2, 3)}
288 {i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
289 {a: b * 2 for a, b in dictionary.items()}
290 {a: b * -2 for a, b in dictionary.items()}
293 for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
295 Python3 > Python2 > COBOL
300 call(arg, kwarg="hey")
301 call(arg, another, kwarg="hey", **kwargs)
303 this_is_a_very_long_variable_which_will_force_a_delimiter_split,
308 ) # note: no trailing comma pre-3.6
310 call(a, *gidgets[:2])
311 call(**self.screen_kwargs)
312 call(b, **self.screen_kwargs)
321 tuple[str, int, float, dict[str, int]]
322 very_long_variable_name_filters: t.List[
323 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
343 numpy[:, (0, 1, 2, 5)]
351 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
352 {"2.7": dead, "3.7": long_live or die_hard}
353 {"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
354 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
358 (i for i in (1, 2, 3))
359 ((i ** 2) for i in (1, 2, 3))
360 ((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
361 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
367 "ended_at": now() + timedelta(days=10),
369 "import_session_id": 1,
377 what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
380 what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
383 result = session.query(models.Customer.id).filter(
384 models.Customer.account_id == account_id, models.Customer.email == email_address
386 models.Customer.id.asc()
389 authors.łukasz.say_thanks()
391 A: 0.25 * (10.0 / 12),
392 B: 0.1 * (10.0 / 12),
393 C: 0.1 * (10.0 / 12),
394 D: 0.1 * (10.0 / 12),
399 yield from outside_of_generator
405 await some.complicated[0].call(with_args=(True or (1 is not 1)))
409 print(**{1: 3} if False else {x: x for x in range(3)})
411 for (x,) in (1,), (2,), (3,):
415 for z in (i for i in (1, 2, 3)):
419 for j in 1 + (2 + 3):
424 threading.current_thread() != threading.main_thread()
425 and threading.current_thread() != threading.main_thread()
426 or signal.getsignal(signal.SIGINT) != signal.default_int_handler
431 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
432 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
437 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
438 & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
443 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
444 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
449 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
450 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
455 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
456 * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
461 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
462 / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
467 # standalone comment at ENDMARKER