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)))
161 for x, in (1,), (2,), (3,): ...
163 for z in (i for i in (1, 2, 3)): ...
164 for i in (call()): ...
165 for j in (1 + (2 + 3)): ...
166 while(this and that): ...
168 threading.current_thread() != threading.main_thread() and
169 threading.current_thread() != threading.main_thread() or
170 signal.getsignal(signal.SIGINT) != signal.default_int_handler
174 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
175 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
179 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
180 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
184 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
185 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
189 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
190 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
194 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
195 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
199 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
200 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
204 # standalone comment at ENDMARKER
221 True or False or None
223 True and False and None
224 (Name1 and Name2) or Name3
225 Name1 and Name2 or Name3
226 Name1 or (Name2 and Name3)
227 Name1 or Name2 and Name3
228 (Name1 and Name2) or (Name3 and Name4)
229 Name1 and Name2 or Name3 and Name4
230 Name1 or (Name2 and Name3) or Name4
231 Name1 or Name2 and Name3 or Name4
235 1 + v2 - v3 * 4 ^ 5 ** v6 / 7 // 8
236 ((1 + v2) - (v3 * 4)) ^ (((5 ** v6) / 7) // 8)
241 ~int and not v1 ^ 123 + v2 | True
242 (~int) and (not ((v1 ^ (123 + v2)) | True))
243 flags & ~select.EPOLLIN and waiters.write_task is not None
246 lambda a, b, c=True: a
247 lambda a, b, c=True, *, d=(1 << v2), e="str": a
248 lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
250 str or None if True else str or bytes or None
251 (str or None) if True else (str or bytes or None)
252 str or None if (1 if True else 2) else str or bytes or None
253 (str or None) if (1 if True else 2) else (str or bytes or None)
254 {"2.7": dead, "3.7": (long_live or die_hard)}
255 {"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
257 {"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
258 ({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
264 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
271 this_is_a_very_long_variable_which_will_force_a_delimiter_split,
276 {i for i in (1, 2, 3)}
277 {(i ** 2) for i in (1, 2, 3)}
278 {(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
279 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
280 [i for i in (1, 2, 3)]
281 [(i ** 2) for i in (1, 2, 3)]
282 [(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))]
283 [((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)]
284 {i: 0 for i in (1, 2, 3)}
285 {i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
286 {a: b * 2 for a, b in dictionary.items()}
287 {a: b * -2 for a, b in dictionary.items()}
290 for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
292 Python3 > Python2 > COBOL
297 call(arg, kwarg="hey")
298 call(arg, another, kwarg="hey", **kwargs)
300 this_is_a_very_long_variable_which_will_force_a_delimiter_split,
305 ) # note: no trailing comma pre-3.6
307 call(a, *gidgets[:2])
308 call(**self.screen_kwargs)
309 call(b, **self.screen_kwargs)
318 tuple[str, int, float, dict[str, int]]
319 very_long_variable_name_filters: t.List[
320 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
340 numpy[:, (0, 1, 2, 5)]
348 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
349 {"2.7": dead, "3.7": long_live or die_hard}
350 {"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
351 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
355 (i for i in (1, 2, 3))
356 ((i ** 2) for i in (1, 2, 3))
357 ((i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c")))
358 (((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3))
364 "ended_at": now() + timedelta(days=10),
366 "import_session_id": 1,
374 what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
377 what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
380 result = session.query(models.Customer.id).filter(
381 models.Customer.account_id == account_id, models.Customer.email == email_address
383 models.Customer.id.asc()
386 authors.łukasz.say_thanks()
388 A: 0.25 * (10.0 / 12),
389 B: 0.1 * (10.0 / 12),
390 C: 0.1 * (10.0 / 12),
391 D: 0.1 * (10.0 / 12),
396 yield from outside_of_generator
402 await some.complicated[0].call(with_args=(True or (1 is not 1)))
405 for (x,) in (1,), (2,), (3,):
409 for z in (i for i in (1, 2, 3)):
413 for j in 1 + (2 + 3):
418 threading.current_thread() != threading.main_thread()
419 and threading.current_thread() != threading.main_thread()
420 or signal.getsignal(signal.SIGINT) != signal.default_int_handler
425 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
426 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
431 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
432 & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
437 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
438 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
443 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
444 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
449 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
450 * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
455 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
456 / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
461 # standalone comment at ENDMARKER