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.
2 +++ <stdin> (formatted)
18 ~int and not v1 ^ 123 + v2 | True
19 (~int) and (not ((v1 ^ (123 + v2)) | True))
20 -flags & ~ select.EPOLLIN and waiters.write_task is not None
21 +flags & ~select.EPOLLIN and waiters.write_task is not None
24 lambda a, b, c=True: a
25 -lambda a, b, c=True, *, d=(1 << v2), e='str': a
26 -lambda a, b, c=True, *vararg, d=(v1 << 2), e='str', **kwargs: a + b
27 +lambda a, b, c=True, *, d=(1 << v2), e="str": a
28 +lambda a, b, c=True, *vararg, d=(v1 << 2), e="str", **kwargs: a + b
30 str or None if True else str or bytes or None
31 (str or None) if True else (str or bytes or None)
32 str or None if (1 if True else 2) else str or bytes or None
33 (str or None) if (1 if True else 2) else (str or bytes or None)
34 -{'2.7': dead, '3.7': (long_live or die_hard)}
35 -{'2.7': dead, '3.7': (long_live or die_hard), **{'3.6': verygood}}
36 +{"2.7": dead, "3.7": (long_live or die_hard)}
37 +{"2.7": dead, "3.7": (long_live or die_hard), **{"3.6": verygood}}
39 -{'2.7', '3.6', '3.7', '3.8', '3.9', ('4.0' if gilectomy else '3.10')}
40 -({'a': 'b'}, (True or False), (+value), 'string', b'bytes') or None
41 +{"2.7", "3.6", "3.7", "3.8", "3.9", ("4.0" if gilectomy else "3.10")}
42 +({"a": "b"}, (True or False), (+value), "string", b"bytes") or None
48 [1, 2, 3, 4, 5, 6, 7, 8, 9, (10 or A), (11 or B), (12 or C)]
51 {i for i in (1, 2, 3)}
52 {(i ** 2) for i in (1, 2, 3)}
53 -{(i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c'))}
54 +{(i ** 2) for i, _ in ((1, "a"), (2, "b"), (3, "c"))}
55 {((i ** 2) + j) for i in (1, 2, 3) for j in (1, 2, 3)}
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) 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: 0 for i in (1, 2, 3)}
62 -{i: j for i, j in ((1, 'a'), (2, 'b'), (3, 'c'))}
63 +{i: j for i, j in ((1, "a"), (2, "b"), (3, "c"))}
64 {a: b * 2 for a, b in dictionary.items()}
65 {a: b * -2 for a, b in dictionary.items()}
66 -{k: v for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension}
69 + for k, v in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension
71 Python3 > Python2 > COBOL
76 -call(arg, kwarg='hey')
77 -call(arg, another, kwarg='hey', **kwargs)
78 -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
80 +call(arg, kwarg="hey")
81 +call(arg, another, kwarg="hey", **kwargs)
83 + this_is_a_very_long_variable_which_will_force_a_delimiter_split,
88 +) # note: no trailing comma pre-3.6
90 call(**self.screen_kwargs)
99 -tuple[str, int, float, dict[str, int],]
100 +tuple[str, int, float, dict[str, int]]
101 very_long_variable_name_filters: t.List[
102 t.Tuple[str, t.Union[str, t.List[t.Optional[str]]]],
106 @@ -114,71 +123,90 @@
111 (str or None) if (sys.version_info[0] > (3,)) else (str or bytes or None)
112 -{'2.7': dead, '3.7': long_live or die_hard}
113 -{'2.7', '3.6', '3.7', '3.8', '3.9', '4.0' if gilectomy else '3.10'}
114 +{"2.7": dead, "3.7": long_live or die_hard}
115 +{"2.7", "3.6", "3.7", "3.8", "3.9", "4.0" if gilectomy else "3.10"}
116 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 or A, 11 or B, 12 or C]
120 (i for i in (1, 2, 3))
121 ((i ** 2) for i in (1, 2, 3))
122 -((i ** 2) for i, _ in ((1, 'a'), (2, 'b'), (3, 'c')))
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()
134 +what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(
137 +what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(
140 +result = session.query(models.Customer.id).filter(
141 + models.Customer.account_id == account_id, models.Customer.email == email_address
143 + models.Customer.id.asc()
148 yield from outside_of_generator
154 await some.complicated[0].call(with_args=(True or (1 is not 1)))
157 - threading.current_thread() != threading.main_thread() and
158 - threading.current_thread() != threading.main_thread() or
159 - signal.getsignal(signal.SIGINT) != signal.default_int_handler
163 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
164 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
168 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
169 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
173 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
174 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
178 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -
179 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
183 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
184 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
188 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /
189 - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
194 + threading.current_thread() != threading.main_thread()
195 + and threading.current_thread() != threading.main_thread()
196 + or signal.getsignal(signal.SIGINT) != signal.default_int_handler
201 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
202 + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
207 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
208 + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
213 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
214 + + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
219 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
220 + - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
225 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
226 + * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
231 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
232 + / aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
237 # standalone comment at ENDMARKER