Use items instead of iteritems for Python 3 compatibility
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
65052b8450
commit
4d729bf986
@@ -184,7 +184,7 @@ class SettingGroup(object):
|
|||||||
.format(self, SettingGroup._current))
|
.format(self, SettingGroup._current))
|
||||||
SettingGroup._current = None
|
SettingGroup._current = None
|
||||||
if globs:
|
if globs:
|
||||||
for name, obj in globs.iteritems():
|
for name, obj in globs.items():
|
||||||
if isinstance(obj, Setting):
|
if isinstance(obj, Setting):
|
||||||
assert obj.name is None, obj.name
|
assert obj.name is None, obj.name
|
||||||
obj.name = name
|
obj.name = name
|
||||||
@@ -761,7 +761,7 @@ class InstructionFormat(object):
|
|||||||
all the InstructionFormat objects and set their name from the dict key.
|
all the InstructionFormat objects and set their name from the dict key.
|
||||||
This is used to name a bunch of global variables in a module.
|
This is used to name a bunch of global variables in a module.
|
||||||
"""
|
"""
|
||||||
for name, obj in globs.iteritems():
|
for name, obj in globs.items():
|
||||||
if isinstance(obj, InstructionFormat):
|
if isinstance(obj, InstructionFormat):
|
||||||
assert obj.name is None
|
assert obj.name is None
|
||||||
obj.name = name
|
obj.name = name
|
||||||
|
|||||||
Reference in New Issue
Block a user