[Python-ideas] compile() getting an optmize flag (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Fri Nov 26 11🔞48 CET 2010
- Previous message: [Python-ideas] Bring back callable()
- Next message: [Python-ideas] compile() getting an optmize flag
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
When using python to compile to bytecode, it is really inconvenient that the compiler is fixed into using whatever opmiziation level the interpreter was started with. This makes it impossible to create e.g. .zip libraries of different optimization levels from a single python session. What is more, a program that creates optimized .zip files cannot itself have active asserts and so on. Adding the optimize state to the compiler´s state outht not to be too difficult. We could then: compile(source, filename, mode[, flags[, dont_inherit[, optimize]]]) with optmize defaulting to the interpreter's current level.
Same with py_compile, and so on.
K -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20101126/a8ba752f/attachment.html>
- Previous message: [Python-ideas] Bring back callable()
- Next message: [Python-ideas] compile() getting an optmize flag
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]