From dec2d01553525c24ad72d7f9737502d94178b842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Wed, 13 Mar 2024 10:50:37 +0100 Subject: [PATCH] Update README.rst Update example for Python 3 --- README.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 4ec1670..c119fbf 100644 --- a/README.rst +++ b/README.rst @@ -66,10 +66,8 @@ Or as an object:: The statement lines between the header and the footer can be iterated:: >>> # TODO: use an interator, and hide the parse_amount in the object - >>> from cfonb.parser.common import parse_amount >>> for line in statement.lines: - ... l = line.as_obj() - ... print parse_amount(l.amount, l.nb_of_dec) + ... print(round(line.amount, int(line.nb_of_dec))) -2000.0 -1000.0 4000.0