[Python-checkins] r84749 - python/branches/py3k/Lib/collections.py

raymond.hettinger python-checkins at python.org
Sun Sep 12 20:16:01 CEST 2010


Author: raymond.hettinger
Date: Sun Sep 12 20:16:01 2010
New Revision: 84749
Log:
Put tests in more logical order.
Modified:
 python/branches/py3k/Lib/collections.py
Modified: python/branches/py3k/Lib/collections.py
==============================================================================
--- python/branches/py3k/Lib/collections.py	(original)
+++ python/branches/py3k/Lib/collections.py	Sun Sep 12 20:16:01 2010
@@ -169,10 +169,10 @@
 
 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()))


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /