为什么编译器包在 Python 3 中停产了?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/909092/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why is the compiler package discontinued in Python 3?
提问by Andrey Fedorov
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.
我只是惊喜地看到Python 的编译器包的文档,但注意到它在 Python 3.0 中消失了,没有任何明确的替换或解释。
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?
我似乎无法在 python-dev 上找到任何关于如何做出这个决定的讨论 - 有没有人对这个决定有任何了解?
回答by pfalcon
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:
而且,为了它的价值,我启动了编译器包的 Python3 端口,在 stdlib 之外进行维护:
回答by pfalcon
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.
对于它的价值,我开始将compiler
包移植到 Python3:https: //github.com/pfalcon/python-compiler。在撰写本文时,它生成与 CPython3.5 兼容的字节码,并且可以编译该版本的整个标准库。