"bob gailer" <bgai...@gmail.com> wrote
You can collect functions in a sequence, then iterate over it. This
allows for easy expansion (when you decide to add another function).
funcs = (dosomething(), dosomethingelse())
I suspect Bob meant to leave off the (). You would normally just
use the function name. (Unless these are factory functions
returning another function but I don't think that was the intent! :-)
funcs = (doSomething, doSomethingElse)
for func in funcs:
getid()
func()
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor