break in a module
Erik Max Francis
max at alcyone.com
Thu Jun 16 18:09:19 EDT 2011
More information about the Python-list mailing list
Thu Jun 16 18:09:19 EDT 2011
- Previous message (by thread): break in a module
- Next message (by thread): break in a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 && max at 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
- Previous message (by thread): break in a module
- Next message (by thread): break in a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list