]> granicus.if.org Git - python/commitdiff
Put tests in more logical order.
authorRaymond Hettinger <python@rcn.com>
Sun, 12 Sep 2010 18:16:01 +0000 (18:16 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 12 Sep 2010 18:16:01 +0000 (18:16 +0000)
Lib/collections.py

index e849296cdd81ab9fd001db0d8acdc4bf1655ad52..9120ab69d566f0a66b010e27b13aef3428cf0829 100644 (file)
@@ -169,10 +169,10 @@ class OrderedDict(dict, MutableMapping):
 
     def __repr__(self):
         'od.__repr__() <==> repr(od)'
-        if self.__in_repr:
-            return '...'
         if not self:
             return '%s()' % (self.__class__.__name__,)
+        if self.__in_repr:
+            return '...'
         self.__in_repr = True
         try:
             result = '%s(%r)' % (self.__class__.__name__, list(self.items()))