"...Regarding your program, instead of writing long sequences of repetitive
if
conditions, I would write one function for each of the different operations
and store them in a dict, mapping each host name to a function (and
multiple host names may map to the same function). Then, look up the host
name in the dict and call the corresponding function to run the right
operations on that host..."

Thank you Stefan for your input. Would please be willing to provide an
example?
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to