On 3 March 2016 at 15:12, Random832 wrote:
> On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote:
>> This is because the last generator uf = upperfile(...) is not garbage-
>> collected and wasn't explicitly closed either.
>
> But the program hasn't ended yet when you run your assertion.
>
> import sy
Random832 wrote:
> On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote:
>> This is because the last generator uf = upperfile(...) is not garbage-
>> collected and wasn't explicitly closed either.
>
> But the program hasn't ended yet when you run your assertion.
If your expectations are in line with
On Fri, 4 Mar 2016 02:00 am, Random832 wrote:
> On Thu, Mar 3, 2016, at 06:52, 刘琦帆 wrote:
>> I have just saw PEP 255, and it says that
>>
>> "A yield statement is not allowed in the try clause of a try/finally
>> construct. The difficulty is that there's no guarantee the generator
>> will ever b
On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote:
> This is because the last generator uf = upperfile(...) is not garbage-
> collected and wasn't explicitly closed either.
But the program hasn't ended yet when you run your assertion.
import sys
_open = open
files = []
def myclose(self):
pri
On Thu, Mar 3, 2016, at 06:52, 刘琦帆 wrote:
> I have just saw PEP 255, and it says that
>
> "A yield statement is not allowed in the try clause of a try/finally
> construct. The difficulty is that there's no guarantee the generator
> will ever be resumed, hence no guarantee that the finally block
刘琦帆 wrote:
> 在 2016年3月3日星期四 UTC+8下午8:14:29,Oscar Benjamin写道:
>> On 3 March 2016 at 11:52, 刘琦帆 wrote:
>> >
>> > "A yield statement is not allowed in the try clause of a try/finally
>> > construct. The difficulty is that there's no guarantee the generator
>> > will ever be resumed, hence no guaran
在 2016年3月3日星期四 UTC+8下午8:14:29,Oscar Benjamin写道:
> On 3 March 2016 at 11:52, 刘琦帆 wrote:
> >
> > "A yield statement is not allowed in the try clause of a try/finally
> > construct. The difficulty is that there's no guarantee the generator will
> > ever be resumed, hence no guarantee that the fina
On 3 March 2016 at 11:52, 刘琦帆 wrote:
>
> "A yield statement is not allowed in the try clause of a try/finally
> construct. The difficulty is that there's no guarantee the generator will
> ever be resumed, hence no guarantee that the finally block will ever get
> executed; that's too much a vio
I have just saw PEP 255, and it says that
"A yield statement is not allowed in the try clause of a try/finally construct.
The difficulty is that there's no guarantee the generator will ever be
resumed, hence no guarantee that the finally block will ever get executed;
that's too much a violati