Eric Snow wrote:
Like I said, my main motivation is to reduce my levels of indentation somewhat. I was trying to see if I could apply a pattern I use in functions and loops to modules.
If your sole goal here is to reduce clutter, then turn a repeated if/elif/else case into a dictionary lookup where the keys are functions, and execute the value. Even then, unless there are quite a lot of cases, this may be overkill.
-- Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis I am not afraid / To be a lone Bohemian -- Lamya -- http://mail.python.org/mailman/listinfo/python-list