From: Raymond Hettinger Date: Fri, 24 Dec 2010 11:24:00 +0000 (+0000) Subject: Keep helper functions private. X-Git-Tag: v3.2rc1~348 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efbcb1b038080ccb49851d0c88da740525f2f022;p=thirdparty%2FPython%2Fcpython.git Keep helper functions private. --- diff --git a/Lib/unittest/util.py b/Lib/unittest/util.py index 9dd147a70fee..ccdf0b81fa88 100644 --- a/Lib/unittest/util.py +++ b/Lib/unittest/util.py @@ -116,7 +116,7 @@ def _count_diff_all_purpose(actual, expected): 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 ordered_count(iterable): 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)