Asked
Viewed 18k times
I was just pleasantly surprised to came across the documentation of Python's compiler package, but noticed that it's gone in Python 3.0, without any clear replacement or explanation.
I can't seem to find any discussion on python-dev about how this decision was made - does anyone have any insight inot this decision?
43.9k32 gold badges139 silver badges189 bronze badges
1
3 Answers
22.6k16 gold badges90 silver badges97 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
To expand on this answer: the compiler package was an absolute pain to maintain and almost always either slightly out of date or subtly different from the "real" compiler. Making it easier to work with the real compiler via the ast module made maintenance a lot easier while still providing similar functionality.
Comments
For what it's worth, I started a port of the compiler package to Python3: https://github.com/pfalcon/python-compiler . At the time of writing, it generates bytecode compatible with CPython3.5, and can compiler entire standard library of that version.