Skip to content

Commit

Permalink
fixed backwards compatibility issue with dict comprehensions in Pytho…
Browse files Browse the repository at this point in the history
…n 2.6
  • Loading branch information
Chris NeJame committed Jun 22, 2017
1 parent 61533ce commit 032645f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contextional/contextional.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ def test(case):
(name, method) for name, method in set(c_funcs + c_meths_funcs)
)
elif isinstance(container, list) or isinstance(container, set):
assert_methods = {method.__name__: method for method in container}
assert_methods = dict(
(method.__name__, method) for method in container
)
elif isinstance(container, dict):
assert_methods = container
elif isinstance(container, FunctionType):
Expand Down

0 comments on commit 032645f

Please sign in to comment.