Slicing beyond list -- bug or featurette?
Ivan Van Laningham
Ivan.Van.Laningham at p98.f112.n480.z2.fidonet.org
Fri Jul 2 18:22:10 EDT 1999
More information about the Python-list mailing list
Fri Jul 2 18:22:10 EDT 1999
- Previous message (by thread): XML-RPC and firewall [solution]
- Next message (by thread): Slicing beyond list -- bug or featurette?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Ivan Van Laningham <ivanlan at callware.com> Hi All-- Pierre Fortin wrote: > > Just ran into a situation which can be summarized as follows: > [bobbitt] > 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? > I don't presume to speak for Guido, but the way slicing is implemented it seems likely that you can count on it: list[:] is implemented as if it were list[0:MAXINT]. I doubt that Guido will change it, but then, the Guido is the Guido. <but-they-don't-call-him-guido-svetz-for-nothing>-ly y'rs, Ivan;-) ---------------------------------------------- Ivan Van Laningham Callware Technologies, Inc. ivanlan at callware.com ivanlan at home.com http://www.pauahtun.org See also: http://www.foretec.com/python/workshops/1998-11/proceedings.html Army Signal Corps: Cu Chi, Class of '70 ----------------------------------------------
- Previous message (by thread): XML-RPC and firewall [solution]
- 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