June 3, 2017
11:59 p.m.
On Sat, Jun 3, 2017 at 6:59 AM, Daniel Bershatsky <bepshatsky@yandex.ru> wrote: Or with usage defer keyword
``` fin = open(filename) defer fin.close() # some stuff
IMHO, a block in which the intention of a `finally: is not well understood, needs refactoring. Some *old* code is like that, but it doesn’t mean it’s *bad*. Then, as a matter of personal preference, I’m not comfortable with that the *defer* idiom talks first about things that should be done last. It’s a debt acquired without enough syntactic evidence (Oh! Mi gosh!, There were those defers at the start of the function I just changed).
From import this:
Explicit is better than implicit. -- Juancarlo *Añez*