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

Chris Angelico <rosuav@gmail.com> wrote:
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-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@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.