Brett Cannon added the comment:

The closing of this issue inspired me to think of a better way to do this, and 
I think providing something in importlib.util that accepted a NodeTransformer 
as an argument to a function that compiled source files to bytecode files would 
fill this issue thanks to PEP 488. It would mean that nothing is done 
dynamically and everything is done offline, but that also means startup costs 
are gone in regards to bytecode generation and it gets people to actually think 
about optimizations of Python instead of it just being an afterthought.

importlib.util.compile(path: Union[str, pathlib.Path], transformer: 
ast.NodeTransformer = None, *, optimization: Union[str, int] = None) -> 
pathlib.Path

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to