[issue17515] Add sys.setasthook() to allow to use a custom AST optimizer

Brett Cannon report at bugs.python.org
Fri Mar 22 18:09:41 CET 2013


Brett Cannon added the comment:

And that's fine as it allows for more explicit control over what gets optimized. Basically if there is a global hook directly into the compiler there needs to be more control over detecting it's being optimized, what to do about .pyo files, etc. At least at the loader level it's much more modular and controlled as to what will and will not get the optimizations.

So if you want to pursue this I think there needs to be more thought than just a global sys hook for this sort of thing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17515>
_______________________________________


More information about the Python-bugs-list mailing list