Fix lookahead of soft keywords in the PEG parser by pablogsal · Pull Request #20436 · python/cpython
When were soft keywords added? I can't remember us implementing that.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, everything else LGTM. I now remember noticing this (during my hack to add a print statement) and thinking "oh, I need to add _PyPegen_lookahead_with_string" -- and then forgetting about it.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
When were soft keywords added? I can't remember us implementing that.
Nice.
There's one caveat: we need to remind people to use 'single' quotes for keywords, not "double" quotes. This happens to be the current convention but it may be surprising to people that it matters, and some folks may just automatically type "double" quotes.
There's one caveat: we need to remind people to use
'single'quotes for keywords, not"double"quotes. This happens to be the current convention but it may be surprising to people that it matters, and some folks may just automatically type"double"quotes.
That could be on the "new parser guide" on the dev guide. I was preparing something for that, but I am currently waiting to see how we want to approach #19969 first.
@pablogsal: Status check is done, and it's a success ✅ .