Message37
__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... |
|
Date |
User |
Action |
Args |
2008-02-20 17:16:38 | admin | link | issue222800 messages |
2008-02-20 17:16:38 | admin | create | |
|