I've done something similar on the past week, regarding RE's and NFA's: http://code.google.com/p/yaree/
The significant code is on re_fsa.py, on the svn repository. The implementation is also a dict, of the form: { Node -> { Character -> Set(Node) } }. That is, it is a mapping of Node's to a mapping M representing it's transitions. M is a mapping of characters to set's of nodes. That way, it supports both FA's and NFA's. -- http://mail.python.org/mailman/listinfo/python-list