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

raymond.hettinger python-checkins at python.org
Sun Apr 11 22:41:57 CEST 2010


Author: raymond.hettinger
Date: Sun Apr 11 22:41:56 2010
New Revision: 79964

Log:
Minor factoring

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 Apr 11 22:41:56 2010
@@ -453,12 +453,11 @@
 
         '''
         if iterable is not None:
+            self_get = self.get
             if isinstance(iterable, Mapping):
-                self_get = self.get
                 for elem, count in iterable.items():
                     self[elem] = self_get(elem, 0) - count
             else:
-                self_get = self.get
                 for elem in iterable:
                     self[elem] = self_get(elem, 0) - 1
         if kwds:


More information about the Python-checkins mailing list