S
Sylvain Thénault
Hi there,
I've encountered the following behaviour which I found surprising:
.... for x in ('test', 'tests'):
.... try:
.... if True:
.... print 'return'
.... return 1
.... finally:
.... print 'break'
.... break
.... print 'end'
.... return
break
end
As you can see, the 'break' in the finally block makes the 'return 1' beeing ignored.
Is this a known caveat or should it be considered as a bug?
I've encountered the following behaviour which I found surprising:
.... for x in ('test', 'tests'):
.... try:
.... if True:
.... print 'return'
.... return 1
.... finally:
.... print 'break'
.... break
.... print 'end'
.... return
break
end
As you can see, the 'break' in the finally block makes the 'return 1' beeing ignored.
Is this a known caveat or should it be considered as a bug?