3 ms·
I was reminded of this by the post on the goto statement -- having used the AST module recently in a limited capacity[1], I was really impressed by how easy it
by motter 15y ago
I was reminded of this by the post on the goto statement -- having used the AST module recently in a limited capacity[1], I was really impressed by how easy it was to use. There's a good pycon talk for those interested specifically in this part of the process[2], and you can also see the full grammar[3].
[1] http://blueprintforge.com/blog/2012/02/27/static-modification-of-python-with-python-the-ast-module/ http://blueprintforge.com/blog/2012/02/27/static-modificatio...
[2] http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-what-would-you-do-with-an-ast-4898264 http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-wha...
[3] http://docs.python.org/library/ast.html#abstract-grammar http://docs.python.org/library/ast.html#abstract-grammar