3 ms·
Since the parser module is documented as deprecated since Python 2.5 and a new parsing technology is planned for 3.9, the parser module is scheduled for removal
by chubot 7y ago
Since the parser module is documented as deprecated since Python 2.5 and a new parsing technology is planned for 3.9, the parser module is scheduled for removal in 3.9.
Hm interesting comment. Does anybody know what the new approach to parsing Python in 3.9 is ? I searched python-dev@ but couldn't find any references to it.
I found an interesting tidbit about Rust "switching" from LL to LR here:
https://www.reddit.com/r/ProgrammingLanguages/comments/brhdt2/notes_on_rusts_grammar_ll_vs_lr/ https://www.reddit.com/r/ProgrammingLanguages/comments/brhdt...
And I noticed some rules in Python's grammar that are awkward in LL parsing (set and dict literals, and comprehensions).
I wonder if those things motivated the switch? They certainly work though.
- why_only_15 7y agoIt appears that the ast module is the recommended one now.
- ivoflipse 7y agoThey're having the discussion on Discuss: https://discuss.python.org/t/preparing-for-new-python-parsing/1550/42 https://discuss.python.org/t/preparing-for-new-python-parsin...
- chubot 7y agoThanks a lot! That led me to find this November thread: https://discuss.python.org/t/switch-pythons-parsing-tech-to-something-more-powerful-than-ll-1/379 https://discuss.python.org/t/switch-pythons-parsing-tech-to-... And I posted here about it: https://www.reddit.com/r/ProgrammingLanguages/comments/brz2yj/switch_pythons_parsing_tech_to_something_more/ https://www.reddit.com/r/ProgrammingLanguages/comments/brz2y... It looks like the set and dict literals I noticed weren't so much the motivating use cases, but even more fundamentally assignments and keyword args!
- scrollaway 7y agoHuh interesting. I've been using parsimonious for cases like this, didn't know python had a stdlib for it...