Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/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.



They're having the discussion on Discuss: https://discuss.python.org/t/preparing-for-new-python-parsin...


Thanks a lot! That led me to find this November thread:

https://discuss.python.org/t/switch-pythons-parsing-tech-to-...

And I posted here about it:

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!


Huh interesting. I've been using parsimonious for cases like this, didn't know python had a stdlib for it...


It appears that the ast module is the recommended one now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: