From 5f0a7bdfa0bfe34ee261aa05aac6d31043d35695 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Mon, 10 Oct 2022 15:49:34 -0600 Subject: [PATCH 1/2] switching to use `__truediv__` --- source/function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/function.cpp b/source/function.cpp index 182d04fa..74fc5c1e 100644 --- a/source/function.cpp +++ b/source/function.cpp @@ -44,7 +44,7 @@ static std::map const cpp_python_operator_map{ {"operator+", "__add__"}, // {"operator-", "__sub__"}, // {"operator*", "__mul__"}, // - {"operator/", "__div__"}, // + {"operator/", "__truediv__"}, // {"operator+=", "__iadd__"}, // {"operator-=", "__isub__"}, // From 2a61164e04e95437503e650556c77ce2e4864e84 Mon Sep 17 00:00:00 2001 From: Sergey Lyskov Date: Mon, 10 Oct 2022 15:51:59 -0600 Subject: [PATCH 2/2] switching to `__itruediv__` --- source/function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/function.cpp b/source/function.cpp index 74fc5c1e..306a3a92 100644 --- a/source/function.cpp +++ b/source/function.cpp @@ -49,7 +49,7 @@ static std::map const cpp_python_operator_map{ {"operator+=", "__iadd__"}, // {"operator-=", "__isub__"}, // {"operator*=", "__imul__"}, // - {"operator/=", "__idiv__"}, // + {"operator/=", "__itruediv__"}, // {"operator()", "__call__"}, // {"operator==", "__eq__"}, //