From ee3bd24768c801b213f4815a999af25d43ae26a5 Mon Sep 17 00:00:00 2001 From: Wurzeldrei Date: Fri, 20 Sep 2024 15:48:13 +0200 Subject: [PATCH] Fix division of PerlScalar The division operator has to be defined by __truediv__, not by __div__ --- template/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/util.py b/template/util.py index c78b35c..9c9b2c7 100644 --- a/template/util.py +++ b/template/util.py @@ -311,7 +311,7 @@ def __sub__(self, other): def __mul__(self, other): return PerlScalar(self.__numify() * other.__numify(), self.__truth) - def __div__(self, other): + def __truediv__(self, other): return PerlScalar(self.__numify() / other.__numify(), self.__truth) def __mod__(self, other):