Re: [Tutor] for loops and exceptions

2006-03-30 Thread Kent Johnson
Matthew White wrote: > Hello, > >>From a general style and/or programmatic perspective, which is a "better" > way to write this bit of code? Hmm, neither? > > try: > (dn, attrs) = conn.search_s(search_base, search_scope, search_filter, > search_attrs): > except Exception, e: > warn_

[Tutor] for loops and exceptions

2006-03-29 Thread Matthew White
Hello, >From a general style and/or programmatic perspective, which is a "better" way to write this bit of code? try: (dn, attrs) = conn.search_s(search_base, search_scope, search_filter, search_attrs): except Exception, e: warn_the_user(e) do_something_useful() for (name, d