Skip to content

Commit 029c8b5

Browse files
committed
Supporting Python 2.6
1 parent 952e917 commit 029c8b5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

source_py2/python_toolbox/logic_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def get_equivalence_classes(iterable, key=None, container=set,
123123
key_function = comparison_tools.process_key_function_or_attribute_name(
124124
key
125125
)
126-
d = set((key, key_function(key)) for key in iterable)
126+
d = dict((key, key_function(key)) for key in iterable)
127127
# #
128128
### Finished pre-processing input. ########################################
129129

source_py2/test_python_toolbox/test_cute_iter_tools/test_get_single_if_any.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ def test_get_single_if_any():
1313
get_single_if_any('') is None
1414

1515
assert get_single_if_any(('g',)) == get_single_if_any(['g']) == \
16-
get_single_if_any({'g'}) == get_single_if_any(iter({'g'})) == \
16+
get_single_if_any(set(('g'))) == \
17+
get_single_if_any(iter(set(('g', )))) == \
1718
get_single_if_any('g') == 'g'
1819

1920
with cute_testing.RaiseAssertor():

source_py2/test_python_toolbox/test_cute_profile/test_cute_profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def func(x, y, z=3):
1818
'''Function that does some meaningless number-juggling.'''
1919
sum([1, 2, 3])
20-
{1, 2} | {2, 3}
20+
set((1, 2)) | set((2, 3))
2121
return x, y, z
2222

2323

0 commit comments

Comments
 (0)