Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
CameronNemo
· 5y ago · 0 comments
Any way to lint this pattern away? Say what you will about the language and lexer complexity, backwards compatibility. This is a code smell if I have ever seen one.
Comments
[–]
tsbinz
5y ago
Enforce consistent formatting, e.g. with black (
https://github.com/psf/black
) this gets formatted to [0xF or x in (1, 2, 3)].
[–]
mywittyname
5y ago
This issue is caught by a linter and reports, "PEP 8: E225 missing whitespace around operator".
[–]
sco1
5y ago
Some cases are, but there are still plenty of patterns that (currently) are not. e.g. `1if 1else 2`
See also:
https://github.com/PyCQA/pycodestyle/issues/371