Slicing beyond list -- bug or featurette?
Aahz Maruch
aahz at netcom.com
Thu Jul 8 00:18:55 EDT 1999
In article <37841B00.D37920A2 at compaq.com>,
Greg Ewing <greg.ewing at compaq.com> wrote:
>Konrad Hinsen wrote:
>>
>> Sequences also support slicing: a[i:j]selects all items with index k
>> such that i <=k < j.
>
>That definition could apply to dictionaries, too! Pity it doesn't...
You could easily subclass UserDict to create this effect, I think.
--
--- Aahz (@netcom.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
More information about the Python-list
mailing list