Mark Lawrence <breamore...@yahoo.co.uk>:
>>> A return statement inside a finally block is code smell.
>> Not to my nose. It seems like a perfectly reasonable thing to do.
> I agree, the code smell is the return in the except block.
Here's a regular pattern that I use for nonblocking I/O:
message = self.sock.recv(0x10000)
except IOError as e:
if e.errno == errno.EAGAIN:
if errcode == errno.EINTR:
Does anyone have an example motivating a return from finally? It seems
to me it would always be a bad idea as it silently clears all unexpected