[Python-ideas] Retain string form of AST Numbers

Ryan rymg19 at gmail.com
Sat Apr 5 15:32:45 CEST 2014


I could probably try that if you give a slightly clearer description.

Chris Angelico <rosuav at gmail.com> wrote:
>On Sat, Apr 5, 2014 at 8:25 PM, Nick Coghlan <ncoghlan at gmail.com>
>wrote:
>> Articles like
>http://time-loop.tumblr.com/post/47664644/python-ast-preserving-whitespace-and-comments
>> suggest to me that we may need to start pushing people *away* from
>the
>> ast module and add a lib2to3 inspired API specifically for lossless
>> transformations based on the *actual* grammar of the running Python
>> version
>
>Ooh that looks promising. I might try to knock up a recipe for some
>sort of "interactive Python in decimal mode", which would cover one of
>the important cases for which people ask for decimal literals. It'd
>not be perfect without some monkey-patch for int/int -> float, unless
>simply every non-complex number becomes a Decimal.
>
>Or if I don't get around to it, maybe someone else can?
>
>ChrisA
>_______________________________________________
>Python-ideas mailing list
>Python-ideas at python.org
>https://mail.python.org/mailman/listinfo/python-ideas
>Code of Conduct: http://python.org/psf/codeofconduct/

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140405/67c5ce7c/attachment.html>


More information about the Python-ideas mailing list