Message37

Author bckfnn
Recipients
Date 2000-11-18.18:54:51
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
__getitem__ has a bug at boundaries.

Example:
>>> "012345"[-100:-100:-1]
'0' # should be ''

The problem appears to be in getStop and(?) getStart in PySequence. These
functions 
should return values in [0,length] for positive steps and [-1,length-1] for
negative
steps. Currently, getStart always returns values in [0,length] and getStop 
returns values between [0, length] and [-1, length] for positive and negative
values of step respectively. I believe the above problem is due to getStart, and
I 
haven't found a problem related to getStop, but it probably wouldn't hurt to
fix
it too...
History
Date User Action Args
2008-02-20 17:16:38adminlinkissue222800 messages
2008-02-20 17:16:38admincreate