Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
> Should this also produce warnings for `list` / `dict` / `set` literals? No, because these cases are useless expressions, but they are not hidden bugs. The result is always False and does not rely on the implementation. > SyntaxWarnings should be raised on problems with the *syntax* not for > ProgrammerMightBeDumb errors. There are a whole lot of things a programmer > not knowing the language could do wrong. But these are syntactically valid > expressions and it is not the purpose of a compiler to teach. SyntaxErrors should be raised on problems with the syntax. SyntaxWarnings *can* be raised for the syntax which is valid but is definitely a bug. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34850> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com