Against my better judgement, I'm going to ask... On Tue, Dec 5, 2017 at 9:22 AM, Rick Johnson <rantingrickjohn...@gmail.com> wrote: > Terry Reedy wrote: > > [...] > >> try: >> item = seq[n] >> except IndexError >> do_without_item() >> else: >> process(item) >> >> item = seq[n:n+1] >> if item: >> process(item) >> else: >> do_without_item() >> >> Many prefer the second. > > And they'll prefer it even more when they realize the entire ELSE > clause of your latter example is superfluous.
... how is it superfluous? ChrisA -- https://mail.python.org/mailman/listinfo/python-list