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 ncoghlan
Recipients ncoghlan, serhiy.storchaka
Date 2017-11-22.23:18:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511392699.69.0.213398074469.issue32055@psf.upfronthosting.co.za>
In-reply-to
Content
If we do decide to do this, I'm inclined to eventually make the change at the Grammar level rather than the AST level.

Current:

    comparison: expr (comp_op expr)*
    comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not'

Future:

    comparison: expr (comp_op expr)* | (containment_check)
    comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'is'|'is' 'not'
    containment_check: ('in'|'not' 'in') expr

However, we'd still need an intermediate step like your PR in order to emit SyntaxWarning while still retaining the current semantics.
History
Date User Action Args
2017-11-22 23:18:19ncoghlansetrecipients: + ncoghlan, serhiy.storchaka
2017-11-22 23:18:19ncoghlansetmessageid: <1511392699.69.0.213398074469.issue32055@psf.upfronthosting.co.za>
2017-11-22 23:18:19ncoghlanlinkissue32055 messages
2017-11-22 23:18:19ncoghlancreate