compare types with is not ==
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 51b87d9..699ba5c 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -3517,12 +3517,12 @@
return (self.__class__, (str(self),))
def __copy__(self):
- if type(self) == Decimal:
+ if type(self) is Decimal:
return self # I'm immutable; therefore I am my own clone
return self.__class__(str(self))
def __deepcopy__(self, memo):
- if type(self) == Decimal:
+ if type(self) is Decimal:
return self # My components are also immutable
return self.__class__(str(self))