On 4/23/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> - contextlib.contextmanager()
> - is actually used to define contexts according to the current docs
> - but returns a GeneratorContextManager object
You may just be trying to avoid overcomplicating things by adding too
much detail
Phillip J. Eby wrote:
> Read the first sentence again:
>
> "EXPRESSION returns a value that the with statement uses to *create* a
> context" (emphasis added).
>
> It doesn't say that the value *is* the context, and if anything, the
> second excerpt supports that by implying that the context man
At 01:33 PM 4/23/2006 +1000, Nick Coghlan wrote:
>Phillip J. Eby wrote:
>>At 09:25 AM 4/22/2006 -0700, Aahz wrote:
>>> EXPRESSION returns a value that the with statement uses to create a
>>> context (a special kind of namespace). The context is used to
>>> execute the BLOCK. The block
Phillip J. Eby wrote:
> At 09:25 AM 4/22/2006 -0700, Aahz wrote:
>> EXPRESSION returns a value that the with statement uses to create a
>> context (a special kind of namespace). The context is used to
>> execute the BLOCK. The block might end normally, get terminated by
>> a break
At 09:25 AM 4/22/2006 -0700, Aahz wrote:
> EXPRESSION returns a value that the with statement uses to create a
> context (a special kind of namespace). The context is used to
> execute the BLOCK. The block might end normally, get terminated by
> a break or return, or raise an exce
On Sat, Apr 22, 2006, Phillip J. Eby wrote:
> At 09:05 AM 4/22/2006 -0700, Aahz wrote:
>>
>>I've been following the with/context discussion, not that closely, but
>>reading all the posts. I also have to write docs on this for Python for
>>Dummies, which I think is going to be the first book out af
At 09:05 AM 4/22/2006 -0700, Aahz wrote:
>I've been following the with/context discussion, not that closely, but
>reading all the posts. I also have to write docs on this for Python for
>Dummies, which I think is going to be the first book out after 2.5. So
>far, my take is that I want the block
I've been following the with/context discussion, not that closely, but
reading all the posts. I also have to write docs on this for Python for
Dummies, which I think is going to be the first book out after 2.5. So
far, my take is that I want the block of code to be executed in a
context. I'm pro