From 690251c13084a4b60f86cae3398b3ff439557150 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Tue, 12 Nov 2024 12:14:33 -0600 Subject: [PATCH] scripts: csv.py: Added float mod support Mainly for consistency with int operators, though it's unclear if either mod is useful in the context of csv.py and related scripts. This may be worth reverting at some point. --- scripts/csv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/csv.py b/scripts/csv.py index 7154bcc2..7fc856c6 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -182,6 +182,8 @@ class RFloat(co.namedtuple('RFloat', 'x')): def __div__(self, other): return self.__class__(self.x / other.x) + __mod__ = RInt.__mod__ + # fractional fields, a/b class RFrac(co.namedtuple('RFrac', 'a,b')): __slots__ = ()