Re: else in try/except

2011-11-15 Thread Robert Kern
On 11/15/11 2:31 PM, Grant Edwards wrote: On 2011-11-15, Barry W Brown wrote: I thought that the point of the else clause is that it is reached only if there is no exception in the try clause. Not really. If that's all you wanted, then you just put the code at the end of the try block. No

Re: else in try/except

2011-11-15 Thread Grant Edwards
On 2011-11-15, Barry W Brown wrote: > I thought that the point of the else clause is that it is reached > only if there is no exception in the try clause. Not really. If that's all you wanted, then you just put the code at the end of the try block. -- Grant Edwards grant.b.edwar

Re: else in try/except

2011-11-14 Thread Barry W Brown
I thought that the point of the else clause is that it is reached only if there is no exception in the try clause. -- http://mail.python.org/mailman/listinfo/python-list

Re: else in try/except

2011-11-14 Thread Ethan Furman
Thanks, all! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: else in try/except

2011-11-14 Thread Chris Kaynor
On Mon, Nov 14, 2011 at 2:59 PM, MRAB wrote: > On 14/11/2011 21:53, Ethan Furman wrote: >> >> The code in 'else' in a 'try/except/else[/finally]' block seems >> pointless to me, as I am not seeing any difference between having the >> code in the 'else' suite vs having the code in the 'try' suite.

Re: else in try/except

2011-11-14 Thread Arnaud Delobelle
On 14 November 2011 21:53, Ethan Furman wrote: > The code in 'else' in a 'try/except/else[/finally]' block seems pointless to > me, as I am not seeing any difference between having the code in the 'else' > suite vs having the code in the 'try' suite. > > Can anybody shed some light on this for me?

Re: else in try/except

2011-11-14 Thread MRAB
On 14/11/2011 21:53, Ethan Furman wrote: The code in 'else' in a 'try/except/else[/finally]' block seems pointless to me, as I am not seeing any difference between having the code in the 'else' suite vs having the code in the 'try' suite. Can anybody shed some light on this for me? The differe