Commit 96d3bacb authored by Stefan Behnel's avatar Stefan Behnel

avoid using builtin names as local variables

parent 7e89fa7a
......@@ -93,14 +93,16 @@ def extended_iglob(pattern):
for path in iglob(pattern):
yield path
def nonempty(iter, error_msg="expected non-empty iterator"):
any = False
for file in iter:
any = True
yield file
if not any:
def nonempty(it, error_msg="expected non-empty iterator"):
empty = True
for value in it:
empty = False
yield value
if empty:
raise ValueError(error_msg)
@cached_function
def file_hash(filename):
path = os.path.normpath(filename.encode("UTF-8"))
......
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