def dollar_field(fieldName, short_description):
    def newFunc(self, obj):
        try:
            x = float(getattr(obj, fieldName, 0.0)) % "$ %0.2f"
        except:
            x = getattr(obj, fieldName, 0.0)
        return x
    newFunc.short_description = short_description
    return newFunc
dataset/ETHPy150Open open-cloud/xos/xos/core/admin.py/dollar_field/swapped operands of `%`