On Apr 10, 7:19 pm, Terry Reedy <tjre...@udel.edu> wrote:
> Sylvain Thénault wrote:
> > Hi there,
>
> > I've encountered the following behaviour which I found surprising:
-
> If you say 'print test()', you shoud see None printed after 'end' (at
> least with 3.0) from the function falling off the end.
>
> The 'if True:' line make no difference.
>
> > 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?
>
> Neither, but it s a bit subtle.  If you replace 'break' with 'return 2'

Ha!  Brilliant.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to