summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/UserDict.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/UserDict.py b/Lib/UserDict.py
index 6b5c9da..35f86fc 100644
--- a/Lib/UserDict.py
+++ b/Lib/UserDict.py
@@ -155,6 +155,8 @@ class DictMixin:
def __repr__(self):
return repr(dict(self.iteritems()))
def __cmp__(self, other):
+ if other is None:
+ return 1
if isinstance(other, DictMixin):
other = dict(other.iteritems())
return cmp(dict(self.iteritems()), other)