From dd7ea6355b8bbdfa743e347f5321302df0ae6831 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Tue, 3 Mar 2015 12:50:00 -0800 Subject: Remove use of has_key() for Python 3 compat. (nw) --- src/emu/cpu/m6809/m6809make.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emu/cpu/m6809/m6809make.py b/src/emu/cpu/m6809/m6809make.py index 63f27084fa0..8d00c36bbf4 100644 --- a/src/emu/cpu/m6809/m6809make.py +++ b/src/emu/cpu/m6809/m6809make.py @@ -77,7 +77,7 @@ while count < len(lines): next_dispatch = lines[count+1][percent_pos+1:].strip("\t\n; ") # If there is no state number associated with the next dispatch, make one - if not dispatch_to_states.has_key(next_dispatch): + if next_dispatch not in dispatch_to_states: dispatch_to_states[next_dispatch] = state states_to_dispatch[state] = next_dispatch state = state + 1 @@ -113,7 +113,7 @@ while count < len(lines): # Output the case labels for i in range(0, state): - print "\tcase %d: goto %s;" % (i, states_to_dispatch[i] if states_to_dispatch.has_key(i) else "state_%s" % str(i)) + print("\tcase %d: goto %s;" % (i, states_to_dispatch.get(i, "state_%d" % i))) # Output a default case print "\tdefault:" -- cgit v1.2.3