Commit 2bfa878a authored by Stefan Behnel's avatar Stefan Behnel

Py3 fixes

parent e1939379
......@@ -7,7 +7,6 @@
#=======================================================================
import sys
from sys import maxint
from Transitions import TransitionMap
......@@ -116,7 +115,9 @@ class Node(object):
priority = self.action_priority
if action is not None:
file.write(" %s [priority %d]\n" % (action, priority))
def __lt__(self, other):
return self.number < other.number
class FastMachine(object):
"""
......@@ -167,7 +168,7 @@ class FastMachine(object):
def make_initial_state(self, name, state):
self.initial_states[name] = state
def add_transitions(self, state, event, new_state):
def add_transitions(self, state, event, new_state, maxint=sys.maxint):
if type(event) is tuple:
code0, code1 = event
if code0 == -maxint:
......
......@@ -110,6 +110,7 @@ class TransitionMap(object):
if set:
result.append((event, set))
return iter(result)
items = iteritems
# ------------------- Private methods --------------------
......
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