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.
This commit is contained in:
@@ -182,6 +182,8 @@ class RFloat(co.namedtuple('RFloat', 'x')):
|
|||||||
def __div__(self, other):
|
def __div__(self, other):
|
||||||
return self.__class__(self.x / other.x)
|
return self.__class__(self.x / other.x)
|
||||||
|
|
||||||
|
__mod__ = RInt.__mod__
|
||||||
|
|
||||||
# fractional fields, a/b
|
# fractional fields, a/b
|
||||||
class RFrac(co.namedtuple('RFrac', 'a,b')):
|
class RFrac(co.namedtuple('RFrac', 'a,b')):
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|||||||
Reference in New Issue
Block a user