In a program, I want to set some kind of variable or object to indicate what
"mode" the program is currently in.
What is the most elegant way of doing this?
Jim
---------------------------------------------------------------------------
constant: moving = "m"
constant: inserting = "i"
constant:jumping = "j"
.
.
action = moving
.
.
.
if action == jumping:
jumpSomewhere()
elseif action == moving:
moveSomewhere()
elseif action == inserting:
insertSomething()
------------------------------------------------------------------------
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor