Home

I'm wondering if a generator that is within a 'with' scope exits the 'with'
when it encounters 'yield'.

I would like to use a generator to implement RAII without having to
syntactically enclose the code in the 'with' scope, and I am hoping that
the the yield does not exit the 'with' scope and release the resource.

previous
next

Re: interesting puzzle......try this you will be rewarded...
Re: understanding GUID
Re: a dict trick
Re: Peak-to-peak detection problem
Re: rand() chooses the same number after several trials
Wróżenie
rzeczoznawca majątkowy Oleśnica
news
blanquimorales.com
forum