Any possibility that (some of) the following can be done before Pycon?
Respectfully yours,
André Roberge
On 12/23/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
[http://mail.python.org/pipermail/python-3000/2006-December/005257.html]
> BTW, can someone clean up and check in the proto-PEP and star
On the 'using old semantics when you really want to' part, that's very
well possible with a decorator under the proposed semantics:
def caching(**cachevars):
def inner(func):
def wrapper(**argdict):
for var in cachevars:
The Java concept of dictionary views seems to have caught-on here while I
wasn't
looking. At the risk of covering some old ground, I would like to re-open the
question. Here are a few thoughts on the subject to kick-off the discussion:
* Maintaining a live (self-updating) view is a bit tricky
Raymond Hettinger wrote:
> The Java concept of dictionary views seems to have caught-on here while I
> wasn't
> looking. At the risk of covering some old ground, I would like to re-open
> the
> question. Here are a few thoughts on the subject to kick-off the discussion:
>
> * Maintaining a l
Jan Kanis wrote:
I just hope if
> python were designed today it would have done these.
If Python had done these, it wouldn't be Python ;)
There are many, many programming language design decisions which have
good arguments on each side (and some which seem obviously correct may
involve hidden
Andre Roberge wrote:
> Any possibility that (some of) the following can be done before Pycon?
> Respectfully yours,
> André Roberge
I've added the PEP as 3111. I made a few small modifications (and
committed it directly as Accepted) based on Guido's comments in this thread.
The actual change sti
On 2/20/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> * A dict is also one of Python's most basic APIs (along with lists). Ideally,
> we should keep those two APIs as simple as possible (getting rid of
> setdefault()
> and unneeded methods is a step in the right direction). IMO, the views w
On 2/20/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> * ISTM that views offer three benefits: re-iterability, set behavior, and
> self-updates. IMO, the first is not commonly needed and is trivially served
> by
> writing list(mydict.items()) or somesuch. The second is best served by an
> e
On 20/02/07, Steven Bethard <[EMAIL PROTECTED]> wrote:
> On 2/20/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> > My recommendation is to take a more conservative route. Let's make dicts as
> > simple as possible and then introduce a new collections module entry with
> > the
> > views bells a
On Tue, Feb 20, 2007, Raymond Hettinger wrote:
>
> My recommendation is to take a more conservative route. Let's make
> dicts as simple as possible and then introduce a new collections
> module entry with the views bells and whistles. If the collections
> version proves itself as enor
Why do you want this *before* PyCon? It would be much easier to do
this as part of the Py3k sprint.
On 2/20/07, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Andre Roberge wrote:
> > Any possibility that (some of) the following can be done before Pycon?
> > Respectfully yours,
> > André Roberge
>
> I'
Consider the PEP accepted.
Regarding the conversion, please do use the sandbox/2to3 framework.
Write me if you have trouble understanding the many examples already
in fixes/.
On 2/20/07, Andre Roberge <[EMAIL PROTECTED]> wrote:
> On 2/20/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > Why do
On 2/20/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Why do you want this *before* PyCon? It would be much easier to do
> this as part of the Py3k sprint.
>
My main interest was to have, prior to Pycon, the PEP recorded as
such; it had been close to 2 months since the last post on this issue
On 2/20/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Why do you want this *before* PyCon? It would be much easier to do
> this as part of the Py3k sprint.
>
My main interest was to have, prior to Pycon, the PEP recorded as
such; it had been close to 2 months since the last post on this issue
Raymond Hettinger wrote:
> * Maintaining a live (self-updating) view is a bit tricky from an
> implementation
> point-of-view.
I don't understand what the alternative is. If mutating the
underlying object doesn't affect the view, then you don't
really have a view, just a copy of the data -- no
On 2/20/07, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Raymond Hettinger wrote:
>
> > * Maintaining a live (self-updating) view is a bit tricky from an
> > implementation
> > point-of-view.
>
> I don't understand what the alternative is. If mutating the
> underlying object doesn't affect the view, th
On 2/20/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> The Java concept of dictionary views seems to have caught-on here while I
> wasn't
> looking. At the risk of covering some old ground, I would like to re-open the
> question.
Because it's coming from you I am reopening the discussion; di
On 2/20/07, Paul Moore <[EMAIL PROTECTED]> wrote:
> (I have similar concerns over the "new IO" proposals I've
> seen, but there's nothing concrete there yet, so I'll save that
> argument for another day...)
Then you should also have misgivings about the Unicode/str
unification. If you are cool wit
On 2/20/07, Steven Bethard <[EMAIL PROTECTED]> wrote:
> Just to clarfiy, you're suggesting that we still change .keys()
> .values() and .items() to iterators, right?
But this isn't really easier to explain to noobs than views, is it?
What's the advantage of
>>> {}.keys()
>>>
over
>>> {}.keys()
On 2/20/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 2/20/07, Steven Bethard <[EMAIL PROTECTED]> wrote:
> > Just to clarfiy, you're suggesting that we still change .keys()
> > .values() and .items() to iterators, right?
>
> But this isn't really easier to explain to noobs than views, is it?
On 2/20/07, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Raymond Hettinger wrote:
> > The Java concept of dictionary views seems to have caught-on here while I
> > wasn't
> > looking. At the risk of covering some old ground, I would like to re-open
> > the
> > question. Here are a few thoughts on
On 2/20/07, Steven Bethard <[EMAIL PROTECTED]> wrote:
> On 2/20/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > On 2/20/07, Steven Bethard <[EMAIL PROTECTED]> wrote:
> > > Just to clarfiy, you're suggesting that we still change .keys()
> > > .values() and .items() to iterators, right?
> >
> > B
On 2/20/07, Steven Bethard <[EMAIL PROTECTED]> wrote:
> Just to clarfiy, you're suggesting that we still change .keys()
> .values() and .items() to iterators, right?
On 2/20/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> But this isn't really easier to explain to noobs than views, is it?
On 2/
Steven Bethard wrote:
> The advantage is only in what you have to explain about the object. In
> the former case, you can simply say "it's an iterator over the keys"
> and they can understand it with their existing knowledge of iterators.
"it's an iterator over the keys"
They use their knowledge
On 2/20/07, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote:
> Steven Bethard wrote:
>
> > The advantage is only in what you have to explain about the object. In
> > the former case, you can simply say "it's an iterator over the keys"
> > and they can understand it with their existing knowledge of
Delaney, Timothy (Tim) wrote:
> A view is a lightweight object that implements an interface by
> delegating to an underlying object. The underlying object cannot be
> changed through the view, but could be changed directly, in which case
> the view will reflect the new contents of the object.
It ce
Larry Hastings wrote:
> Delaney, Timothy (Tim) wrote:
>> A view is a lightweight object that implements an interface by
>> delegating to an underlying object. The underlying object cannot be
>> changed through the view, but could be changed directly, in which
>> case the view will reflect the new
Guido van Rossum wrote:
>> Note that some changes to the underlying object may invalidate the
>> view, in which case using it will throw an exception.
>
> No, this only invalidates an in-progress iterator.
Yeah - that's what I meant - just couldn't think if there were any other
situations that m
(merging a few replies to reduce traffic)
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > You can also think of dict views as a straightforward application of
> > the GoF adapter pattern.
>
> Yep - and I think that would be a good secondary explanation, instantl
"Guido van Rossum" <[EMAIL PROTECTED]> wrote:
> On 2/20/07, Paul Moore <[EMAIL PROTECTED]> wrote:
> > (I have similar concerns over the "new IO" proposals I've
> > seen, but there's nothing concrete there yet, so I'll save that
> > argument for another day...)
>
> Then you should also have misgiv
On 2/20/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> I was "eh, why bother?" prior to reading the updated PEP 3106, but now
> can see the benefit to keys(), values(), and items() returning views.
> I'm not sure I would use the added features (I don't believe I've ever
> compared the equalities o
[Note: changed subject]
On 2/20/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> "Guido van Rossum" <[EMAIL PROTECTED]> wrote:
> > On 2/20/07, Paul Moore <[EMAIL PROTECTED]> wrote:
> > > (I have similar concerns over the "new IO" proposals I've
> > > seen, but there's nothing concrete there yet,
"Guido van Rossum" <[EMAIL PROTECTED]> wrote:
> [Note: changed subject]
> On 2/20/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> > I'm not so sure. The return type on socket.recv and os.read could be
> > changed to bytes (seemingly without much difficulty),
>
> Yes, that's the plan anyway.
Bet
On 2/20/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> "Guido van Rossum" <[EMAIL PROTECTED]> wrote:
> > [Note: changed subject]
> > On 2/20/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> > > I'm not so sure. The return type on socket.recv and os.read could be
> > > changed to bytes (seemingly
34 matches
Mail list logo