Taro Ogawa taroso at gmail.com writes:
Nick Coghlan ncoghlan at gmail.com writes:
There are three big use cases:
...
delurk
...
Apologies - this was posted via gmane and the post I responded to appeared in
the gmane.comp.python.devel.3000 tree... I'll repost there (and check gmane a
Nick Coghlan ncoghlan at gmail.com writes:
There are three big use cases:
dict.keys
dict.values
dict.items
Currently these all return lists, which may be expensive in terms of copying.
They all have iter* variants which while memory efficient, are far less
convenient to work with.
Paul Moore wrote:
On 3/29/06, Brett Cannon [EMAIL PROTECTED] wrote:
Without a direct reason in terms of the language needing a
standardization of an interface, perhaps we just don't need views. If
people want their iterator to have a __len__ method, then fine, they
can add it without
Nick Coghlan wrote:
a message to the wrong list
Darn, I'd hoped I'd caught that in time :(
Sorry folks.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---
Greg Ewing wrote:
Guido van Rossum wrote:
Its maps have methods to
return keys, values and items, but these return neither new lists nor
iterators; they return views which obey set (or multiset, in the
case of items) semantics.
I'd like to explore this as an alternative to making keys()
On 3/24/06, Nick Coghlan [EMAIL PROTECTED] wrote:
I do find it somewhat interesting that we're considering moving the standard
containers to a more numpy-ish view of the world, though (i.e. one where
multiple mutable views of a data structure are common in order to avoid
unnecessary copying)