Re: Not cathing nested StopIteration

2017-07-21 Thread Antoon Pardon
Thanks Peter and Chris for helping to resolve the knot in my brain. -- https://mail.python.org/mailman/listinfo/python-list

Re: Not cathing nested StopIteration

2017-07-21 Thread Peter Otten
Antoon Pardon wrote: > This is python 3.4 on a debian box > > In the code below, line 36 raises a StopIteration, I would have > thought that this exception would be caught by line 39 but instead > I get a traceback. > > Did I miss something or is this a bug? Your code structure is try: rai

Re: Not cathing nested StopIteration

2017-07-21 Thread Chris Angelico
On Fri, Jul 21, 2017 at 6:32 PM, Antoon Pardon wrote: > This is python 3.4 on a debian box > > In the code below, line 36 raises a StopIteration, I would have > thought that this exception would be caught by line 39 but instead > I get a traceback. > > Did I miss something or is this a bug? > > Th

Not cathing nested StopIteration

2017-07-21 Thread Antoon Pardon
This is python 3.4 on a debian box In the code below, line 36 raises a StopIteration, I would have thought that this exception would be caught by line 39 but instead I get a traceback. Did I miss something or is this a bug? This is the code: try: