[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FDs will be closed after exception automatically in python2.7?

On 2019-06-10 15:46, Alan Bawden wrote:
> D'Arcy Cain <darcy at VybeNetworks.com> writes:
>> with open("file","w+") as fd:
> That makes the window smaller, but it doesn't actually eliminate it.  Look
> at the generated byte code.  In both cases the call to open() is over and
> the open file is created _before_ the SETUP_WITH instruction is executed.

Am I correct in assuming that the window is there for process interrupts
but not threads?

D'Arcy J.M. Cain
Vybe Networks Inc.
IM:darcy at Vex.Net VoIP: sip:darcy at VybeNetworks.com