Previous 199869 Revisions Next

r36225 Tuesday 3rd March, 2015 at 21:04:49 UTC by Mike Naberezny
Remove use of has_key() for Python 3 compat. (nw)
[src/emu/cpu/m6809]m6809make.py

trunk/src/emu/cpu/m6809/m6809make.py
r244736r244737
7777         next_dispatch = lines[count+1][percent_pos+1:].strip("\t\n; ")
7878
7979         # If there is no state number associated with the next dispatch, make one
80         if not dispatch_to_states.has_key(next_dispatch):
80         if next_dispatch not in dispatch_to_states:
8181            dispatch_to_states[next_dispatch] = state
8282            states_to_dispatch[state] = next_dispatch
8383            state = state + 1
r244736r244737
113113
114114# Output the case labels
115115for i in range(0, state):
116   print "\tcase %d:   goto %s;" % (i, states_to_dispatch[i] if states_to_dispatch.has_key(i) else "state_%s" % str(i))
116   print("\tcase %d:   goto %s;" % (i, states_to_dispatch.get(i, "state_%d" % i)))
117117
118118# Output a default case
119119print "\tdefault:"


Previous 199869 Revisions Next


© 1997-2024 The MAME Team