Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the compiler package discontinued in Python 3?

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?

like image 979
Andrey Fedorov Avatar asked May 26 '09 05:05

Andrey Fedorov


2 Answers

I believe the functionality is now built in:

  • compile
  • ast
like image 77
Paul Avatar answered Oct 22 '22 21:10

Paul


To provide specific references to the decision trail:

  • https://mail.python.org/pipermail/python-3000/2007-May/007577.html
  • PEP 3108

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

  • https://github.com/pfalcon/python-compiler
  • https://pypi.org/project/python-compiler/
like image 27
pfalcon Avatar answered Oct 22 '22 21:10

pfalcon