At 04:31 PM 4/25/2006 -0700, Aahz wrote:
>Right -- I've already been chastised for that. Unless someone has a
>better idea, I'm going to call it a "wrapper".
Better idea: just delete the parenthetical about a namespace and leave the
rest of your text alone, at least until the dust settles. I th
On Tue, Apr 25, 2006, Guido van Rossum wrote:
> On 4/24/06, Aahz <[EMAIL PROTECTED]> wrote:
>>
>> Let's go back to a pseudo-coded with statement:
>>
>> with EXPRESSION [as NAME]:
>> BLOCK
>>
>> What happens while BLOCK is being executed? Again, here's what I said
>> originally:
>>
>>
On 4/24/06, Aahz <[EMAIL PROTECTED]> wrote:
> Let's go back to a pseudo-coded with statement:
>
> with EXPRESSION [as NAME]:
> BLOCK
>
> What happens while BLOCK is being executed? Again, here's what I said
> originally:
>
> EXPRESSION returns a value that the with statement uses t
Phillip J. Eby wrote:
> If qualification of "context" is the only problem, I propose:
>
> context manager -- thing with __context__ method
> execution context object -- thing with __enter__/__exit__/__context__
> execution context -- the abstract thing set up and torn down by the ECO
>
> "When re
At 07:24 PM 4/25/2006 +1000, Nick Coghlan wrote:
>So things like decimal.Context get left trying to find a sane name for what
>their __context__ method returns. decimal.Context.__context__() returns a . .
>. context? What? Wasn't it already a context? Oh, so it actually returns a
>"with statement c
Paul Moore wrote:
> On 4/25/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> I still found the alpha 1 terminology and documentation completely
> natural and intuitive. Completely. Not "acceptable", but "completely
> natural". From the perspective of someone with limited understanding
> of the design,
On 4/25/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> PEP 343 made a *deliberate, conscious design decision* to copy the semantics
> of iterators by making the context management protocol a superset of the
> context protocol (or rather, the context specification protocol in alpha 2).
OK. It's poss
Phillip J. Eby wrote:
> At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
>> Wanting to have two names for the same function tells me there's a
>> problem
>> with the terminology, not that we should actually have two names for
>> the same
>> function :)
>
> It is purely an implementation detail o
Phillip J. Eby wrote:
> At 12:24 PM 4/24/2006 -0700, Aahz wrote:
>> On Mon, Apr 24, 2006, Phillip J. Eby wrote:
>>> At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
Using two names to describe three different things isn't intuitive for
anybody.
>>> Um, what three things? I only count two
Paul Moore wrote:
> In the documentation of contextmanager, consider the examples:
>
> @contextmanager
> def tag(name):
> ...
>
> class Tag:
> ...
> @contextmanager
> def __context__(self):
> ...
>
> Now, tag should be a function which retu
At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
>Wanting to have two names for the same function tells me there's a problem
>with the terminology, not that we should actually have two names for the same
>function :)
It is purely an implementation detail of @contextmanager that it can be
used to
At 01:19 PM 4/24/2006 -0700, Aahz wrote:
>What is EXPRESSION, then? Not the value it returns, but EXPRESSION
>itself -- does it have a name? What about the kinds of things we use
>for EXPRESSION?
I read "EXPRESSION returns a value" as simply meaning that "value =
EXPRESSION", i.e. that the resu
On 4/24/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Paul Moore wrote:
> > I've proposed splitting it into
> > two, but that seems not to suit you (you've never responded to it
> > specifically, so I may be misreading your silence here).
>
> Wanting to have two names for the same function tells me
On Mon, Apr 24, 2006, Phillip J. Eby wrote:
> At 12:49 PM 4/24/2006 -0700, Aahz wrote:
>>On Mon, Apr 24, 2006, Phillip J. Eby wrote:
>>> At 12:24 PM 4/24/2006 -0700, Aahz wrote:
On Mon, Apr 24, 2006, Phillip J. Eby wrote:
> At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
>>
>>Using
At 12:49 PM 4/24/2006 -0700, Aahz wrote:
>On Mon, Apr 24, 2006, Phillip J. Eby wrote:
> > At 12:24 PM 4/24/2006 -0700, Aahz wrote:
> >>On Mon, Apr 24, 2006, Phillip J. Eby wrote:
> >>> At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
>
> Using two names to describe three different things i
On Mon, Apr 24, 2006, Phillip J. Eby wrote:
> At 12:24 PM 4/24/2006 -0700, Aahz wrote:
>>On Mon, Apr 24, 2006, Phillip J. Eby wrote:
>>> At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
Using two names to describe three different things isn't intuitive for
anybody.
>>>
>>> Um, what thr
At 12:24 PM 4/24/2006 -0700, Aahz wrote:
>On Mon, Apr 24, 2006, Phillip J. Eby wrote:
> > At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
> >>
> >>Using two names to describe three different things isn't intuitive for
> >>anybody.
> >
> > Um, what three things? I only count two:
> >
> > 1. Object
On Mon, Apr 24, 2006, Phillip J. Eby wrote:
> At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
>>
>>Using two names to describe three different things isn't intuitive for
>>anybody.
>
> Um, what three things? I only count two:
>
> 1. Objects with __context__
> 2. Objects with __enter__ and __ex
At 04:48 AM 4/25/2006 +1000, Nick Coghlan wrote:
>Using two names to describe three different things isn't intuitive for
>anybody.
Um, what three things? I only count two:
1. Objects with __context__
2. Objects with __enter__ and __exit__
What's the third thing?
__
Paul Moore wrote:
> 2. Nick, what can we do to persuade you to go back to the a1 version,
> and simply look at @contextmanager?
Using two names to describe three different things isn't intuitive for
anybody. You might persuade me to change the names around, but you aren't
going to persuade me to
On 4/24/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 10:26 AM 4/24/2006 +0100, Paul Moore wrote:
> >OK. At this point, the discussion seems to have mutated from a
> >"Phillip vs Nick" debate to a "Paul vs Nick" debate.
>
> I only stepped aside so that other people would chime in. I still don
At 10:26 AM 4/24/2006 +0100, Paul Moore wrote:
>OK. At this point, the discussion seems to have mutated from a
>"Phillip vs Nick" debate to a "Paul vs Nick" debate.
I only stepped aside so that other people would chime in. I still don't
think the new terminology makes anything clearer, and would
On 4/24/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> > I think I've now read enough on the subject that my value as an
> > unbiased reader is being lost...
>
> Your input really helped me figure out where the problem was, though. Trying
> to describe 3 different things using only 2 distinct terms
Paul Moore wrote:
> Right. I'll still do as I promised, and have a better look through the
> latest documentation, but my gut feel is that this whole thing is
> getting way out of proportion. Naming and terminology is important,
> but we've now on our 3rd version of the docuentation.
Only the 2nd,
On 4/24/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
[...]
> The __iter__ method isn't called __iterator__, so why would the __context__
> method need to be called "__contextmgr__"?
Because. Hmm, Oleg already responded to this, and to be
honest, I think the whole issue is a nitpick. Apologi
On Mon, Apr 24, 2006 at 12:44:09PM +1000, Nick Coghlan wrote:
> Paul Moore wrote:
> > - Surely the __context__ method should be called __contextmgr__ now
> > that it's producing a context manager? (Same naming issue, just the
> > other side of it...)
>
> The __iter__ method isn't called __iterator
Paul Moore wrote:
>> Aside from the What's New document, this has now been done. My modifications
>> consisted of terminology changes in the contextlib docs and the language
>> reference to match the 2.5a1 implementation, a Context Types addition to the
>> library reference similar to that for Iter
> Aside from the What's New document, this has now been done. My modifications
> consisted of terminology changes in the contextlib docs and the language
> reference to match the 2.5a1 implementation, a Context Types addition to the
> library reference similar to that for Iterator Types, and a very
Nick Coghlan wrote:
> For those not following along at home, I've now updated PEP 343 to clarify my
> originally intended meanings for various terms, and to record the fact that
> we
> don't currently have a consensus on python-dev that those are the right
> definitions.
>
> As written up in t
Paul Moore wrote:
> On 4/23/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>> For those not following along at home, I've now updated PEP 343 to clarify my
>> originally intended meanings for various terms, and to record the fact that
>> we
>> don't currently have a consensus on python-dev that those
30 matches
Mail list logo