Files
python-uncompyle6/test/simple_source/comprehension/05_dict_comp.py
rocky e2d7f01298 Handle 2-arg asserts in 3.6+ish
Changed files have also been reformatted via the blacken formatter
2019-06-18 22:09:16 -04:00

15 lines
366 B
Python

# Bug was in dictionary comprehension involving "if not"
# Issue #162
#
# This code is RUNNABLE!
def x(s):
return {k: v
for (k, v) in s
if not k.startswith('_')
}
# Yes, the print() is funny. This is
# to test though a 2-arg assert where
# the 2nd argument is not a string.
assert x((('_foo', None),)) == {}, print("See issue #162")