Re: [Tutor] general exception questions

2015-10-05 Thread Steven D'Aprano
On Mon, Oct 05, 2015 at 01:46:52PM -0400, richard kappler wrote: > I'm reading up on exception handling, and am a little confused. If you have > an exception that just has 'pass' in it, for example in a 'for line in > file:' iteration, what happens? Does the program just go to the next line? Yes.

Re: [Tutor] general exception questions

2015-10-05 Thread Laura Creighton
In a message of Mon, 05 Oct 2015 22:39:13 +0100, Mark Lawrence writes: >On 05/10/2015 18:46, richard kappler wrote: >> I'm reading up on exception handling, and am a little confused. If you have >> an exception that just has 'pass' in it, for example in a 'for line in >> file:' iteration, what happ

Re: [Tutor] general exception questions

2015-10-05 Thread Mark Lawrence
On 05/10/2015 18:46, richard kappler wrote: I'm reading up on exception handling, and am a little confused. If you have an exception that just has 'pass' in it, for example in a 'for line in file:' iteration, what happens? Does the program just go to the next line? EX: for line in file: tr

Re: [Tutor] general exception questions

2015-10-05 Thread richard kappler
> > > > how else do you skip the current line if the 'try' can't be done, and go on >> to the next line exiting the program with a trace error? >> > > That last sentence confused me. If you use pass (or continue) > you will NOT get any trace error. If you want to store the > error to report it at t

Re: [Tutor] general exception questions

2015-10-05 Thread Alan Gauld
On 05/10/15 18:46, richard kappler wrote: I'm reading up on exception handling, and am a little confused. If you have an exception that just has 'pass' in it, for example in a 'for line in file:' iteration, what happens? Does the program just go to the next line? Yes, in your example it would i

[Tutor] general exception questions

2015-10-05 Thread richard kappler
I'm reading up on exception handling, and am a little confused. If you have an exception that just has 'pass' in it, for example in a 'for line in file:' iteration, what happens? Does the program just go to the next line? EX: for line in file: try: do something except: pas