19 Mar
2020
19 Mar
'20
6:23 a.m.
Andrew Barnert via Python-ideas writes:
[A] context manager seems perfect. It allows you to hint any statement, including a loop statement, by adding whatever code you want that gets run before and after the statement.
I wonder: The analogy "decorator : function :: with : suite" seems useful here. Is it useful in general? Steve