Whole file

gaogaotiantian/objprint

The author described this change as Fix empty multi-line object (#4). It counts as a record because the check below fails on the code as it stood at b32a19541 and passes on 866616163, with nothing else changed between the two runs.

Fix saved2021-03-10
Sharing licenceApache-2.0 · LICENSE
Change size+1 1

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

Fix empty multi-line object (#4)

The change

120120 elems = first_elems
121121
122122 multiline = False
123- if len(header) > 1:
123+ if len(header) > 1 and len(elems) > 0:
124124 # If it's not built in, always do multiline
125125 multiline = True
126126 elif any(("\n" in elem for elem in elems)):

The check that tells the two apart

failpass·tests/test_objstr.py::TestObjStr::test_one_line_object

Check file tests/test_objstr.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 itb32a19541cad65ab6f9ac446555666d69dfc4e19
Broken version dated2021-03-09
Moduleobjprint.objprint
Units changedObjPrint
Fingerprint5eced7d12d9656a3
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 gaogaotiantian/objprint