Python code written in 1998, how to improve/change it?

Petr Jakes petr at tpc.cz
Thu Jan 19 18:53:54 EST 2006


Thanks for your comments,
The mentioned "8 years old" code actually works somehow.

I am trying to solve very similar problem about FSM as the code in the
example does and I do not want to be overburden by the if/elif stuff or
by declaring state functions (which IMHO is very similar approach as
if/elif).

Because of above mentioned, something like FSM-generator looks as a way
to go for me (if I can judge with my poor skills).

I am using Steve's book "Python Web Programming" which is actually the
best I have found about OOP, classes etc. but as a newbie I am just
lost with subclass and mapping attributes etc. while trying to study
the code in the example (http://tinyurl.com/a4zkn).

All I wanted to know, if, thanks to the improvements in the Python
functionality over the years, it is possible to simplify somhow the old
code.

Otherwise I have to dig through :)

Petr Jakes

PS:
I agree and I do understand the reasons why NOT to use GOTO statements
in the code (aka spaghetti code).




More information about the Python-list mailing list