From 422872230f4c4bd00d03b3fee2a4fd87c2c35916 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Mar 2016 23:49:34 +0100 Subject: [PATCH] Fix modulo operator on ObjectProxy Modulo is computed with %, not ^. It is also not equal to xor. --- src/wrapt/wrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrapt/wrappers.py b/src/wrapt/wrappers.py index 7e183f6..56fe15b 100644 --- a/src/wrapt/wrappers.py +++ b/src/wrapt/wrappers.py @@ -230,7 +230,7 @@ class ObjectProxy(with_metaclass(_ObjectProxyMetaType)): return self.__wrapped__ // other def __mod__(self, other): - return self.__wrapped__ ^ other + return self.__wrapped__ % other def __divmod__(self, other): return divmod(self.__wrapped__, other)