from foo import bar and the ast module

Dan Stromberg drsalists at gmail.com
Sun Aug 22 10:07:07 EDT 2021


In 'from foo import bar':

With the ast module, I see how to get bar, but I do not yet see how to get
the foo.

There are clearly ast.Import and ast.ImportFrom, but I do not see the foo
part in ast.ImportFrom.

?

Thanks!


More information about the Python-list mailing list