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?

Craig McQueen's user avatar

Craig McQueen

43.9k32 gold badges139 silver badges189 bronze badges

asked May 26, 2009 at 5:54

Andrey Fedorov's user avatar

1

3 Answers

I believe the functionality is now built in:

metakermit's user avatar

metakermit

22.6k16 gold badges90 silver badges97 bronze badges

answered May 26, 2009 at 6:24

Paul's user avatar

Paul

6096 silver badges4 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.

answered Jan 1, 2019 at 15:06

pfalcon's user avatar

pfalcon

7,0775 gold badges40 silver badges45 bronze badges

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.

answered Feb 24, 2019 at 21:04

pfalcon's user avatar

pfalcon

7,0775 gold badges40 silver badges45 bronze badges

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question