[Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)
stefan at bytereef.org
Sat Mar 19 13:24:30 EDT 2016
Guido van Rossum <guido <at> python.org> writes:
> I don't care too much either way, but I think passing underscores to the
constructor shouldn't be affected by the context -- the underscores are just
removed before parsing the number. But if it's too complicated to implement
I'm fine with punting.
Just removing the underscores would be fine. The problem is that per
the PEP the conversion should happen according the Python float grammar
but the actual decimal grammar is the one from the IBM specification.
I'd much rather express the problem like you did above: A preprocessing
step followed by the IBM specification grammar.
More information about the Python-Dev