tools: make dump_fp_fields a bit more pythonic