[Python-Dev] PEP 515: Underscores in Numeric Literals (original) (raw)

Ethan Furman ethan at stoneleaf.us
Wed Feb 10 19:14:18 EST 2016


On 02/10/2016 04:04 PM, Steven D'Aprano wrote:

change to a single rule "one or more underscores may appear between two (hex)digits, but otherwise nowhere else". That's much simpler to understand than a series of restrictions as given above.

I like the simpler rule, but I would also allow for an underscore between the base and the first digit:

0x_1ef9_ab22

is easier (at least, for me ;) to parse than

0x1ef9_ab22

However, since Georg is doing the work, I'm not going to argue too hard.

-- Ethan



More information about the Python-Dev mailing list