machine control script ( parameterless method? )
Sat Mar 6 17:05:57 CET 2004
I'm thinking of rewriting some vb code in python, its a
program currently using a simple script to define an action
but if i directly use python for the action sequence ( the
most flexible approach.) means each action ( method ) having
brackets, which is a bit redundant and confusing to the
user, since i'm separating the parameters all actions are
calls to parameterless methods,
so the question is, is there any way to call a method when a
name is referenced ( like __repr__ in interactive mode.)
why do i separate the parameters?
well a parameter can be changed often, can occur in several
actions and is unlikely to cause major problems if wrongly
entered, whilst the actions have more serious consequences
if wrongly arranged , so they are differently accessed. This
arrangement seems to me to be quite common, like a washing
machine, dial to select a predefined sequence and then
buttons or dials to tailor it to more refined requirements.
thanks in advance.
More information about the Python-list