![](https://secure.gravatar.com/avatar/d67ab5d94c2fed8ab6b727b62dc1b213.jpg?s=120&d=mm&r=g)
On Sat, Apr 5, 2014 at 8:25 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
Articles like http://time-loop.tumblr.com/post/47664644/python-ast-preserving-whitespace-a... 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