This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | vstinner |
|---|---|
| Recipients | methane, vstinner |
| Date | 2017年02月07日.08:55:30 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1486457731.28.0.702396640425.issue29469@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I suggest you to look at my AST optimizer, especially the constant folding part: https://github.com/haypo/fatoptimizer/blob/master/fatoptimizer/const_fold.py And the unit tests, search for BaseConstantFoldingTests: https://github.com/haypo/fatoptimizer/blob/master/test_fatoptimizer.py#L1980 IHMO we must have a long test suite on this AST optimizer, because it's common that the AST changes in subtle ways, AST is complex and so we should prevent regressions. You may simply copy my unit tests. My optimizer implements more optimization: just remove unit tests on cases which you don't want to optimize. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017年02月07日 08:55:31 | vstinner | set | recipients: + vstinner, methane |
| 2017年02月07日 08:55:31 | vstinner | set | messageid: <1486457731.28.0.702396640425.issue29469@psf.upfronthosting.co.za> |
| 2017年02月07日 08:55:31 | vstinner | link | issue29469 messages |
| 2017年02月07日 08:55:30 | vstinner | create | |