Message339091
Similar to how `-OO` currently strips docstrings from compiled bytecode, it would be nice if there were a way to strip annotations as well to further compact the bytecode.
Attached is my initial attempt. From some simple manual testing, Python with this patch applied will generate the same bytecode (verified with `marshal` and `dis`) for two files with the same logic, but with annotations manually removed from one of them.
This will probably need some new flag/optimization level rather than relying on `-OO` (as it would be a breaking change).
Open to initial reviews of the patch and idea in general, and suggestions on how to best thread the option through to the module. |
|
Date |
User |
Action |
Args |
2019-03-29 02:11:47 | cary | set | recipients:
+ cary |
2019-03-29 02:11:47 | cary | set | messageid: <1553825507.66.0.407362572806.issue36466@roundup.psfhosted.org> |
2019-03-29 02:11:47 | cary | link | issue36466 messages |
2019-03-29 02:11:47 | cary | create | |
|