refactor dumpsmach.python_case
refactor dumpsmach.python_case

add:
- make start node a keyword argument
- explain howto in class docstring
- bugfix: deal with dead-end nodes

change:
- PEP 8: space between operators, continuation lines, operator last on line
- PEP 3101: use format, instead of adding strings (more readable, see also last "Note" here: http://docs.python-guide.org/en/latest/writing/structure/)
- format reduces repetition of tab multiples
- group strings together
- use `'` as string delimiter to reduce visual density and avoid the need to escape `"` in code generation containing strings
- use lists, instead of incremental string addition, because it is faster

- use itertools to generate the infinite sequence 'if', 'elif', 'elif', ...
- use cached generators (created on demand with an arg-less lambda)
- name local variables per (implicit) `networkx` conventions for local variables
- also naming as u, v, w is graph-theoretic and "state"-agnostic" (in
  anticipation of `transys` changes)
- use `dict.iteritems` instead of `dict.items` (automatic translation to
  python3 can handle this)
- use new-style class for machine
- mv common exception printing code to method, in order to avoid duplication (times the number of states, which can be very large). As a side-effect, the deepest indentation level is also reduced
- raise ValueError instead of Exception when given unexpected input values

tulip-control/tulip-control,necozay/tulip-control,tulip-control/tulip-control,tulip-control/tulip-control,necozay/tulip-control,tulip-control/tulip-control,necozay/tulip-control,necozay/tulip-control,necozay/tulip-control