Yes, there is a to_source function which allows AST to source conversation.

On Wed, Nov 20, 2019, 9:02 AM Guido van Rossum <[email protected]> wrote:

> On Tue, Nov 19, 2019 at 10:24 PM Nathaniel Smith <[email protected]> wrote:
>
>> On Mon, Nov 18, 2019 at 4:41 PM Pablo Galindo Salgado
>> <[email protected]> wrote:
>> >
>> > Hi,
>> >
>> > What do people feel about exposing Tools/parser/unparse.py in the
>> standard library? Here is my initial rationale:
>> >
>> > * The tool already needs to be maintained and updated as is tested as
>> part of the test suite.
>> > * I have used the tool almost all the time I needed to deal with AST
>> transformations.
>> > * The public interface will have a very low surface API, keeping
>> maintaining it (the public interface) a very small burden IMHO.
>> >
>> > We could add the public interface to the ast.py module or a new one if
>> people feel strongly about it.
>>
>> How does it compare to Berker's popular and well-maintained PyPI
>> package for this? https://github.com/berkerpeksag/astor
>>
>
> Does that even have unparse() functionality? From the README it seems to
> focus on a nicer ast.dump(), which is quite different (in behavior and how
> it's used) from unparse().
>
> --
> --Guido van Rossum (python.org/~guido)
> *Pronouns: he/him **(why is my pronoun here?)*
> <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
> _______________________________________________
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/3Z34GG2B2REAR7JHIBZJCKDGL7656NBB/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/EA5ZN4IONDV5AIXSAGT4YRINY64AYIW6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to