gh-151464: exclude '<>' token from tokenize output - #154854
Conversation
Was: ``` $ echo '1 <> 2' | python -m tokenize 1,0-1,1: NUMBER '1' 1,2-1,4: OP '<>' 1,5-1,6: NUMBER '2' 1,6-1,7: NEWLINE '\n' 2,0-2,0: ENDMARKER '' ``` Now (regardless on ``__future__.barry_as_FLUFL`` import): ``` $ echo '1 <> 2' | ./python -m tokenize 1,0-1,1: NUMBER '1' 1,2-1,3: OP '<' 1,3-1,4: OP '>' 1,5-1,6: NUMBER '2' 1,6-1,7: NEWLINE '\n' 2,0-2,0: ENDMARKER '' ``` in accordance with the Grammar: https://docs.python.org/3.14/reference/lexical_analysis.html#operators-and-delimiters Also adds a custom error message for ``<>`` ("not equal" in Pascal and Python 2).
Aniketsy
left a comment
There was a problem hiding this comment.
Thanks for this work :)
I've just gone through these changes and changes looks good as per my understanding ofcourse i'm not expert 😀 , and it was really interesting to going through these changes, at first I found its bit tricky to understand some portion.
I'm excited to see the review process in this from experts and try to understand how it goes, also if you feel this comment as noise please feel free to mark as off-topic.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @pablogsal: please review the changes made to this pull request. |
Documentation build overview
|
Was:
Now (regardless on
__future__.barry_as_FLUFLimport):in accordance with the Grammar:
https://docs.python.org/3.14/reference/lexical_analysis.html#operators-and-delimiters
Also adds a custom error message for
<>("not equal" in Pascal and Python 2).