On Thu., 21 Nov. 2019, 3:30 am Brett Cannon, <brett@python.org> wrote:
Victor Stinner wrote:
> > It's mostly to minimize the number of imports on "import ast". unparse
> requires extra imports like tokenize which has also tons of
> dependencies.

Why are you specifically worried about that? If you're doing AST transformations you're probably either doing it offline/AOT or you're already doing extra processing which means you probably aren't stressing over how quickly an initial import will take if this is all worries surrounding doing live AST transformations on the way to writing out bytecode or loading a module on the fly.

The AST module is also the home of "ast.literal_eval", and that is going to be used in a much wider variety of situations.

Cheers,
Nick.