On Mon, Nov 30, 2020 at 11:33 PM David Gow wrote:
>
> On Tue, Dec 1, 2020 at 7:33 AM Daniel Latypov wrote:
> >
> > The use of manual open() and .close() calls seems to be an attempt to
> > keep the contents in scope.
> > But Python doesn't restrict variables like that, so we can introduce new
> >
On Tue, Dec 1, 2020 at 7:33 AM Daniel Latypov wrote:
>
> The use of manual open() and .close() calls seems to be an attempt to
> keep the contents in scope.
> But Python doesn't restrict variables like that, so we can introduce new
> variables inside of a `with` and use them outside.
>
> Do so to
The use of manual open() and .close() calls seems to be an attempt to
keep the contents in scope.
But Python doesn't restrict variables like that, so we can introduce new
variables inside of a `with` and use them outside.
Do so to make the code more Pythonic.
Signed-off-by: Daniel Latypov
---
t
3 matches
Mail list logo