1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-06-18 08:29:32 +00:00

Replace iteritems() with items()

This commit is contained in:
Mike Naberezny 2013-10-26 13:18:01 -07:00
parent 8a7119b540
commit 78d8852e18
2 changed files with 4 additions and 4 deletions

View File

@ -169,7 +169,7 @@ class Monitor(cmd.Cmd):
line = self._shortcuts['~'] + ' ' + line[1:]
# command shortcuts
for shortcut, command in self._shortcuts.iteritems():
for shortcut, command in self._shortcuts.items():
if line == shortcut:
line = command
break
@ -452,14 +452,14 @@ class Monitor(cmd.Cmd):
if args != '':
new = args[0].lower()
changed = False
for name, radix in radixes.iteritems():
for name, radix in radixes.items():
if name[0].lower() == new:
self._address_parser.radix = radix
changed = True
if not changed:
self._output("Illegal radix: %s" % args)
for name, radix in radixes.iteritems():
for name, radix in radixes.items():
if self._address_parser.radix == radix:
self._output("Default radix is %s" % name)

View File

@ -30,7 +30,7 @@ class AddressParser(object):
def label_for(self, address, default=None):
"""Given an address, return the corresponding label or a default.
"""
for label, label_address in self.labels.iteritems():
for label, label_address in self.labels.items():
if label_address == address:
return label
return default