diff --git a/bin/loopy b/bin/loopy
index 57dac8038ca638269249783151e4b195b05db223..ef4be07444d742ab9059674661f60b1fb6262467 100644
--- a/bin/loopy
+++ b/bin/loopy
@@ -24,6 +24,15 @@ def to_python_literal(value):
         # It's a float
         return repr(float(value))
 
+    if value.endswith("f"):
+        try:
+            float(value[:-1])
+        except ValueError:
+            pass
+        else:
+            # It's a float
+            return repr(float(value[:-1]))
+
     return repr(value)