[Python-ideas] Including the unparse module in the standard library

Brett Cannon brett at python.org
Mon Jul 16 15:24:43 EDT 2018


On Thu, 12 Jul 2018 at 11:21 Andre Roberge <andre.roberge at gmail.com> wrote:

> In the cPython repository, there is an unparse module in the Tools section.
> https://github.com/python/cpython/blob/master/Tools/parser/unparse.py
>
> However, as it is not part of the standard library, it cannot be easily
> used; to do so, one needs to make a local copy in a place from where it can
> be imported.
>
> This module can be useful for people using the ast module to create and
> parse trees, modify them ... and who want to convert the result back into
> source code.  Since it is obviously maintained to be compatible with the
> current Python version,
>

Maintained doesn't mean it's check on very often, nor designed well or
updated. ;)


> would it be possible to include the unparse module in the standard library?
>

Since it isn't necessary for Python to function, I would say we probably
don''t want to pull it up. Then the maintenance burden grows much more.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180716/ef3cec4d/attachment.html>


More information about the Python-ideas mailing list