Re:In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
by CameronNemo on Tuesday April 13, 2021 @04:16PM
(#26798599)
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.
[ Parent
| on HN ]
Re:In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
by tsbinz on Tuesday April 13, 2021 @05:21PM
(#26799487)
Enforce consistent formatting, e.g. with black (https://github.com/psf/black) this gets formatted to [0xF or x in (1, 2, 3)].
Re:In Python, `[0xfor x in (1, 2, 3)]` returns `[15]`
by mywittyname on Tuesday April 13, 2021 @05:56PM
(#26799865)
This issue is caught by a linter and reports, "PEP 8: E225 missing whitespace around operator".