[Python-ideas] with expression

Ethan Furman ethan at stoneleaf.us
Thu Feb 20 22:49:27 CET 2014


On 02/20/2014 01:33 PM, Yann Kaiser wrote:
>
>      with open('name') as f:
>          for line in f:
>              yield line.split()
>
> (Which is, unfortunately, a __del__ in disguise, which is frowned upon.)

How is that a __del__ in disguise?

--
~Ethan~


More information about the Python-ideas mailing list