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 Jeremy.Hylton, Trundle, alex, benjamin.peterson, brett.cannon, daniel.urban, dmalcolm, eltoder, eric.snow, georg.brandl, gregory.p.smith, jcon, mark.dickinson, meador.inge, nadeem.vawda, ncoghlan, pitrou, rhettinger, santoso.wijaya, techtonik, terry.reedy, vstinner
Date 2012-09-06.00:40:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Any stdlib AST optimiser would need to be substantially more conservative by default.

FYI The test suite of Python 2.7 and 3.3 pass with astoptimizer... except some "minor" (?) failures:

 * test_math fails for the reason explained above
 * test_pdb: it looks to be an issue with line number (debuggers don't like optimizers :-))
 * test_xml_etree and test_xml_etree_c: reference count of the None singleton

The test suite helped me to find bugs in my optimizer :-)

I also had to add some hacks (hasattr) for test_ast (test_ast generates invalid AST trees). The configuration should also be adapted for test_peepholer, because CPython peepholer uses a limit of 20 items, whereas astoptimizer uses a limit of 4096 bytes/characters for string by default. All these minor nits are now handled in a specific "cpython_tests" config.
Date User Action Args
2012-09-06 00:40:50vstinnersetrecipients: + vstinner, brett.cannon, georg.brandl, rhettinger, terry.reedy, gregory.p.smith, mark.dickinson, ncoghlan, pitrou, techtonik, nadeem.vawda, benjamin.peterson, alex, Trundle, dmalcolm, meador.inge, daniel.urban, Jeremy.Hylton, santoso.wijaya, eltoder, eric.snow, jcon
2012-09-06 00:40:50vstinnersetmessageid: <>
2012-09-06 00:40:49vstinnerlinkissue11549 messages
2012-09-06 00:40:49vstinnercreate