Author lukasz.langa
Recipients Mark.Shannon, benjamin.peterson, flherne, georg.brandl, inada.naoki, lukasz.langa, ned.deily, rhettinger, serhiy.storchaka, vstinner
Date 2018-04-21.20:28:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524342504.69.0.682650639539.issue32911@psf.upfronthosting.co.za>
In-reply-to
Content
Oh, and Francis, you might actually want to use lib2to3.pytree instead, which will provide you with a Concrete Syntax Tree ("lossless AST").  That tree will keep information like whitespace, comments, and other semantically insignificant tokens like commas and parentheses.

This tree will never modify your input whereas in the AST we might be doing more modifications in the future (like cutting `if` branches that we statically know are always False, and so on).

Granted, the lib2to3 tree is a bit awkward to query since the concrete tree exposes the raw Python grammar and not the simplified AST grammar.
History
Date User Action Args
2018-04-21 20:28:24lukasz.langasetrecipients: + lukasz.langa, georg.brandl, rhettinger, vstinner, benjamin.peterson, ned.deily, inada.naoki, Mark.Shannon, serhiy.storchaka, flherne
2018-04-21 20:28:24lukasz.langasetmessageid: <1524342504.69.0.682650639539.issue32911@psf.upfronthosting.co.za>
2018-04-21 20:28:24lukasz.langalinkissue32911 messages
2018-04-21 20:28:24lukasz.langacreate