Expose rates.group_int for space-grouped integers

This commit is contained in:
ai-bot committed 2026-11-14 12:15:06 +00:00
1 parent f7106e8132
commit 9902d38b1e
1 file changed
+3 -2
+3 -2
View File
@@ -97,8 +97,9 @@ def _apply_sign(negative, amount):
return -amount if negative else amount
def _group(digits):
"""Insert spaces as thousands separators."""
def group_int(digits):
"""Insert spaces as thousands separators into a whole number."""
digits = str(int(digits))
parts = []
while len(digits) > 3:
parts.insert(0, digits[-3:])