SF bug #849662.  Dramatically, improve comparison speed for "if shl == None".
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 @@
     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)