From 880cce5505234b126b968e40f90a94f4fdd13317 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 6 Apr 2006 04:01:11 +0000 Subject: [PATCH] src/utils/str.format: Recognize digits before the '.' in %f formatting. --- src/utils/str.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/str.py b/src/utils/str.py index 884938a62..a1dff4d5a 100644 --- a/src/utils/str.py +++ b/src/utils/str.py @@ -355,7 +355,7 @@ def timestamp(t): t = time.time() return time.ctime(t) -_formatRe = re.compile('%(\.\d+f|[bfhiLnpqrstu%])') +_formatRe = re.compile('%((?:\d+)?\.\d+f|[bfhiLnpqrstu%])') def format(s, *args, **kwargs): """w00t.