45

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?

1

3 Answers 3

44

I believe the functionality is now built in:

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

To provide specific references to the decision trail:

And, for what it's worth, I started Python3 port of the compiler package, to be maintained outside of the stdlib:

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.