Commit a4801a71 authored by Stefan Behnel's avatar Stefan Behnel

fix some dict iteration usages in Py3

parent 33c79ea3
...@@ -146,7 +146,7 @@ def cython_inline(code, ...@@ -146,7 +146,7 @@ def cython_inline(code,
# Parsing from strings not fully supported (e.g. cimports). # Parsing from strings not fully supported (e.g. cimports).
print("Could not parse code as a string (to extract unbound symbols).") print("Could not parse code as a string (to extract unbound symbols).")
cimports = [] cimports = []
for name, arg in kwds.items(): for name, arg in list(kwds.items()):
if arg is cython_module: if arg is cython_module:
cimports.append('\ncimport cython as %s' % name) cimports.append('\ncimport cython as %s' % name)
del kwds[name] del kwds[name]
...@@ -274,7 +274,7 @@ except ImportError: ...@@ -274,7 +274,7 @@ except ImportError:
all[varargs] = arg_values[len(args):] all[varargs] = arg_values[len(args):]
for name, value in zip(args, arg_values): for name, value in zip(args, arg_values):
all[name] = value all[name] = value
for name, value in kwd_values.items(): for name, value in list(kwd_values.items()):
if name in args: if name in args:
if name in all: if name in all:
raise TypeError("Duplicate argument %s" % name) raise TypeError("Duplicate argument %s" % name)
......
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