[Python-ideas] Incorporating something like byteplay into the stdlib

Andrew Barnert abarnert at yahoo.com
Fri Feb 12 17:38:31 EST 2016


On Feb 12, 2016, at 13:57, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
> 
> Also, AFAIK, FAT Python analyzes/transforms AST.  I'm not sure how byteplay could help FAT Python specifically.

So far, all three people who've responded have acted like I invented the idea that PEP 511 might include bytecode optimizers. Even Victor, who wrote the PEP. 

Am I going crazy here? I'm looking right at http://www.python.org/dev/peps/pep-0511/. 
It has a "Usage 4" section that has a rationale for why we should allow writing bytecode optimizers in Python, and an example of something that can't be done by an AST optimizer. It has a "code_transformer() method" section, showing the API designed for writing those optimizers. It has an "API to get/set code transformers" section that explains when and how those transformers get run. It has a "Bytecode transformer" section that gives a toy example. 

Assuming I'm not imagining all that, why are people demanding that I provide a rationale for why we should add bytecode optimizers, or telling me that adding bytecode optimizers isn't going to help FAT Python, etc.?

My proposal is that if we add bytecode optimizers, we should make it possible to write them. I don't need to justify that "if". If nobody things we should add bytecode optimizers, not even the author of the PEP that suggests them, then the answer is simple: just remove them from the PEP, and then my proposal becomes void.


More information about the Python-ideas mailing list