Slicing beyond list -- bug or featurette?
Pierre Fortin
Pierre.Fortin at p98.f112.n480.z2.fidonet.org
Fri Jul 2 16:38:34 EDT 1999
More information about the Python-list mailing list
Fri Jul 2 16:38:34 EDT 1999
- Previous message (by thread): Slicing beyond list -- bug or featurette?
- Next message (by thread): Slicing beyond list -- bug or featurette?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Pierre Fortin <pfortin at cisco.com> Just ran into a situation which can be summarized as follows: list = [ 0,1,2,3,4 ] list[<0..4>] returns the appropriate item list[m] where m is >= len(list) expectedly fails list[2:50] returns [ 2,3,4 ] list[20:] or list[20:30] returns [] Can I count on this, or should I code try/except for the day it's fixed? This 'feature' reduces the error situations; but is it correct/intended? Curious, Pierre -- Linux -- The C(r)ash-Free Operating System
- Previous message (by thread): Slicing beyond list -- bug or featurette?
- Next message (by thread): Slicing beyond list -- bug or featurette?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list