You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
come_from_opt handles and/or precidence properly
main.py: give a better error message when file is not found.
This commit is contained in:
BIN
test/bytecode_3.5/10-list-ifnot.pyc
Normal file
BIN
test/bytecode_3.5/10-list-ifnot.pyc
Normal file
Binary file not shown.
17
test/simple_source/comprehension/10-list-ifnot.py
Normal file
17
test/simple_source/comprehension/10-list-ifnot.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Test semantic handling of
|
||||
# [x for x in names if not y]
|
||||
import os
|
||||
|
||||
def bug(dirname, pattern):
|
||||
if not dirname:
|
||||
if isinstance(pattern, bytes):
|
||||
dirname = bytes(os.curdir, 'ASCII')
|
||||
else:
|
||||
dirname = os.curdir
|
||||
try:
|
||||
names = os.listdir(dirname)
|
||||
except os.error:
|
||||
return []
|
||||
if not _ishidden(pattern):
|
||||
names = [x for x in names if not _ishidden(x)]
|
||||
return fnmatch.filter(names, pattern)
|
Reference in New Issue
Block a user