diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-01-25 03:58:21 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-01-25 03:58:21 (GMT) |
commit | 28e369a8f8a5fe416159a2a5604321574ea148b3 (patch) | |
tree | c62f93190e29085b4b0b1609cd5b119b011647e9 /Lib/decimal.py | |
parent | a617e208fc9fcb8022f429bca20818c472ad9a4e (diff) | |
download | cpython-28e369a8f8a5fe416159a2a5604321574ea148b3.zip cpython-28e369a8f8a5fe416159a2a5604321574ea148b3.tar.gz cpython-28e369a8f8a5fe416159a2a5604321574ea148b3.tar.bz2 |
compare types with is not ==
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ class Decimal(object): 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)) |