[Python-checkins] r77740 - python/trunk/Lib/decimal.py
benjamin.peterson
python-checkins at python.org
Mon Jan 25 04:58:21 CET 2010
Author: benjamin.peterson
Date: Mon Jan 25 04:58:21 2010
New Revision: 77740
Log:
compare types with is not ==
Modified:
python/trunk/Lib/decimal.py
Modified: python/trunk/Lib/decimal.py
==============================================================================
--- python/trunk/Lib/decimal.py (original)
+++ python/trunk/Lib/decimal.py Mon Jan 25 04:58:21 2010
@@ -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))
More information about the Python-checkins
mailing list