In code, list.clear doesn't throw error - it's just ignored
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Nov 14 00:12:23 EST 2022
On 14/11/22 3:13 pm, MRAB wrote:
> But if it's an expression where it's expecting a statement and it's not
> a call, then it's probably a bug.
The key word there is "probably". If there's any chance it
could be not a bug, it can't be an error. At most it should
be a warning, and that's what linters are for. I wouldn't
like the core interpreter to be producing a bunch of warnings
for things like this.
--
Greg
More information about the Python-list
mailing list