[Python-checkins] r87475 - python/branches/py3k/Lib/unittest/util.py

raymond.hettinger python-checkins at python.org
Fri Dec 24 12:24:00 CET 2010


Author: raymond.hettinger
Date: Fri Dec 24 12:24:00 2010
New Revision: 87475

Log:
Keep helper functions private.

Modified:
   python/branches/py3k/Lib/unittest/util.py

Modified: python/branches/py3k/Lib/unittest/util.py
==============================================================================
--- python/branches/py3k/Lib/unittest/util.py	(original)
+++ python/branches/py3k/Lib/unittest/util.py	Fri Dec 24 12:24:00 2010
@@ -116,7 +116,7 @@
         result.append(diff)
     return result
 
-def ordered_count(iterable):
+def _ordered_count(iterable):
     'Return dict of element counts, in the order they were first seen'
     c = OrderedDict()
     for elem in iterable:
@@ -126,7 +126,7 @@
 def _count_diff_hashable(actual, expected):
     'Returns list of (cnt_act, cnt_exp, elem) triples where the counts differ'
     # elements must be hashable
-    s, t = ordered_count(actual), ordered_count(expected)
+    s, t = _ordered_count(actual), _ordered_count(expected)
     result = []
     for elem, cnt_s in s.items():
         cnt_t = t.get(elem, 0)


More information about the Python-checkins mailing list