[Checkins] SVN: zc.buildout/branches/python-3/src/zc/buildout/buildout.py slight refactoring to make emacs happier. :)

Jim Fulton jim at zope.com
Wed Mar 16 10:41:33 EDT 2011


Log message for revision 120977:
  slight refactoring to make emacs happier. :)
  

Changed:
  U   zc.buildout/branches/python-3/src/zc/buildout/buildout.py

-=-
Modified: zc.buildout/branches/python-3/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/python-3/src/zc/buildout/buildout.py	2011-03-16 14:32:53 UTC (rev 120976)
+++ zc.buildout/branches/python-3/src/zc/buildout/buildout.py	2011-03-16 14:41:33 UTC (rev 120977)
@@ -24,12 +24,7 @@
 try:
     from UserDict import DictMixin
 except ImportError:
-    import collections
-    class DictMixin(collections.MutableMapping):
-        def __iter__(self):
-            return iter(self.keys())
-        def __len__(self):
-            return len(self.keys())
+    from collections import MutableMapping as DictMixin
 
 import copy
 import distutils.errors
@@ -1286,6 +1281,11 @@
         raw = self._raw
         return list(self._raw) + [k for k in self._data if k not in raw]
 
+    def __iter__(self):
+        return iter(self.keys())
+    def __len__(self):
+        return len(self.keys())
+
     def copy(self):
         result = self._raw.copy()
         result.update(self._cooked)



More information about the checkins mailing list