aiee

Python modules for common command line interfacing utils
git clone git://git.defalsify.org/aiee.git
Log | Files | Refs | LICENSE

commit bd2dfb3ad91d71567f8750dc7678943131ecf02a
parent f3c0005c67d3a11d16eb46bd0ea667dcbce183c5
Author: lash <dev@holbrook.no>
Date:   Thu, 12 May 2022 18:43:35 +0000

Add log for number handling

Diffstat:
Maiee/numbers.py | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/aiee/numbers.py b/aiee/numbers.py @@ -1,5 +1,9 @@ # standard imports import re +import logging + +logg = logging.getLogger(__name__) + re_number_postfix = r'^(\d+(\.\d+)?)(([kmgtpezyE])(-?\d+)?)?$' def postfix_to_int(s): @@ -39,4 +43,7 @@ def postfix_to_int(s): elif m[4] == 'E': p += int(m[5]) - return int(v * (10 ** p)) + r = int(v * (10 ** p)) + logg.debug('number {} translated to {}'.format(s, r)) + + return r