Parcourir la source

Add odds formatting

betbetter il y a 2 jours
Parent
commit
2dc387b0d0
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      format.py

+ 5 - 0
format.py

@@ -0,0 +1,5 @@
+def fmt_american(a):
+    return ("+%d" % a) if a > 0 else str(a)
+
+def fmt_decimal(d):
+    return "%.2f" % d