You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
15 lines
366 B
Python
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")
|