Message314220
Actually the precedence was a warning for an assert like:
assert(x % 2 == 0, "x is odd")
Currently it is the only syntax warning produced by the compiler.
> 1. Why 'chech' instead of 'check'?
Just a typo replicated with a copy-paste.
> 2. Will chech_index catch "[1,2] [3,4]"? (I am guessing that is the intent.)
Yes, it is. It could be extended to catch also "['foo','bar'] ['baz']".
> 3. Does Syntax Warning stop compilation, or at least execution, as at a >>> prompt?
No, it is just a warning unless you run Python with -Werror.
This patch was inspired by usability improvements in GCC 8 [1]. I haven't created a pull request because I have doubts about that this should be in the compiler rather of a third-party linter. But if several other core developers will support this idea I'll continue working in this direction.
[1] https://developers.redhat.com/blog/2018/03/15/gcc-8-usability-improvements/ |
|
Date |
User |
Action |
Args |
2018-03-21 18:59:34 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, ezio.melotti, eric.araujo, steven.daprano, docs@python, o11c |
2018-03-21 18:59:34 | serhiy.storchaka | set | messageid: <1521658774.29.0.467229070634.issue15248@psf.upfronthosting.co.za> |
2018-03-21 18:59:34 | serhiy.storchaka | link | issue15248 messages |
2018-03-21 18:59:34 | serhiy.storchaka | create | |
|