This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Anthony Sottile, barry, gregory.p.smith, jwilk, miss-islington, nascheme, njs, rhettinger, serhiy.storchaka, steven.daprano, user30111, vstinner, xiang.zhang
Date 2019-06-10.04:28:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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.
Date User Action Args
2019-06-10 04:28:14serhiy.storchakasetrecipients: + serhiy.storchaka, barry, nascheme, rhettinger, gregory.p.smith, vstinner, jwilk, steven.daprano, njs, xiang.zhang, Anthony Sottile, miss-islington, user30111
2019-06-10 04:28:14serhiy.storchakasetmessageid: <>
2019-06-10 04:28:14serhiy.storchakalinkissue34850 messages
2019-06-10 04:28:14serhiy.storchakacreate