-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Description
str.format allows to use the comma or the underscore as a digit group separator:
'{:,}'.format(1234567890)
'1,234,567,890'
'{:_}'.format(1234567890)
'1_234_567_890'
'{:_b}'.format(1234567890)
'100_1001_1001_0110_0000_0010_1101_0010'
'{:_x}'.format(1234567890)
'4996_02d2'
'{:_}'.format(123456789.123456789)
'123_456_789.12345679'
'{:.,}'.format(123456789.123456789)
'123456789.123,456,79'
'{:,._}'.format(123456789.123456789)
'123,456,789.123_456_79'However, when using a format string like "{:,d}" in parse, I get the following error: ValueError: format spec ',d' not recognised.
I guess extract_format needs to be told about this, and then Parser._handle_field.
I did some experimentation, but this is not yet done:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels