Commit a0ad4c94 authored by Jason R. Coombs's avatar Jason R. Coombs

Rewrite init/loop/extend as dual-for generator expression.

parent fc28df6e
...@@ -187,14 +187,14 @@ class build_py(orig.build_py, Mixin2to3): ...@@ -187,14 +187,14 @@ class build_py(orig.build_py, Mixin2to3):
self.exclude_package_data.get('', []) self.exclude_package_data.get('', [])
+ self.exclude_package_data.get(package, []) + self.exclude_package_data.get(package, [])
) )
bad = [] bad = dict.fromkeys(
for pattern in globs: item
bad.extend( for pattern in globs
fnmatch.filter( for item in fnmatch.filter(
files, os.path.join(src_dir, convert_path(pattern)) files,
os.path.join(src_dir, convert_path(pattern)),
) )
) )
bad = dict.fromkeys(bad)
seen = {} seen = {}
return [ return [
f for f in files if f not in bad f for f in files if f not in bad
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment