Re: outsmarting context managers with coroutines

2013-12-29 Thread Ian Kelly
On Sun, Dec 29, 2013 at 7:44 AM, Burak Arslan wrote: > On 12/29/13 07:06, Ian Kelly wrote: >> On Sat, Dec 28, 2013 at 5:35 PM, Burak Arslan >> wrote: >>> On 12/29/13 00:13, Burak Arslan wrote: Hi, Have a look at the following code snippets: https://gist.github.com/plq/8164035

Re: outsmarting context managers with coroutines

2013-12-29 Thread Burak Arslan
On 12/29/13 07:06, Ian Kelly wrote: > On Sat, Dec 28, 2013 at 5:35 PM, Burak Arslan > wrote: >> On 12/29/13 00:13, Burak Arslan wrote: >>> Hi, >>> >>> Have a look at the following code snippets: >>> https://gist.github.com/plq/8164035 >>> >>> Observations: >>> >>> output2: I can break out of outer

Re: outsmarting context managers with coroutines

2013-12-28 Thread Ian Kelly
On Sat, Dec 28, 2013 at 5:35 PM, Burak Arslan wrote: > On 12/29/13 00:13, Burak Arslan wrote: >> Hi, >> >> Have a look at the following code snippets: >> https://gist.github.com/plq/8164035 >> >> Observations: >> >> output2: I can break out of outer context without closing the inner one >> in Pyth

Re: outsmarting context managers with coroutines

2013-12-28 Thread Burak Arslan
On 12/29/13 00:13, Burak Arslan wrote: > Hi, > > Have a look at the following code snippets: > https://gist.github.com/plq/8164035 > > Observations: > > output2: I can break out of outer context without closing the inner one > in Python 2 > output3: Breaking out of outer context closes the inner on