One function

_format in astanin/python-tabulate

The author described this change as fix #176 - implement Decimal fixed-point support. It counts as a record because the check below fails on the code as it stood at 8f3208666 and passes on 5373ebfa9, with nothing else changed between the two runs.

Fix saved2026-03-05
Sharing licenceMIT · LICENSE
Change size+2 0

What the code was meant to do, written into the code itself as a docstring

Format a value according to its deduced type. Empty values are deemed valid for any type. Unicode is supported:

The change

4747 else:
4848 if isinstance(val, str) and "," in val:
4949 val = val.replace(",", "") # handle thousands-separators
50+ if isinstance(val, Decimal):
51+ return format(val, floatfmt)
5052 try:
5153 return format(float(val), floatfmt)
5254 except (ValueError, TypeError):

The check that tells the two apart

failpass·test/test_output.py::test_floatfmt_decimal

Check file test/test_output.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it8f32086665760bcb2bd729623dc58a8da259a68b
Broken version dated2026-03-05
Moduletabulate.__init__
Units changed_format
Fingerprint511bc4cdf1a66a5d
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in astanin/python-tabulate