Confused compare function :)

Chris Angelico rosuav at gmail.com
Thu Dec 6 09:28:36 EST 2012


On Fri, Dec 7, 2012 at 1:21 AM, Hans Mulder <hansmu at xs4all.nl> wrote:
> Errhm, no.  Look again.  The do_stuff(value) call is in the "else:"
> clause, so it will only be done of there was no Exception of any
> kind, and in that case the assignment to value must have succeeded.

DOH! My bad. Sorry! I somehow didn't see your else, *and* didn't think
of that clause when doing up my "fixed" version. Yep, else is
precisely what this calls for, and (assuming the change I mentioned)
your code does indeed match the original.

ChrisA



More information about the Python-list mailing list