From: skaller <sk...@us...> - 2005-10-25 13:50:45
|
On Tue, 2005-10-25 at 13:07 +0100, Amit Dubey wrote: > On 10/25/05, Brian Brunswick <bri...@gm...> wrote: > On 25/10/05, Amit Dubey <ami...@gm...> wrote: > > I see the problem. I think there may be another problem if > first < -(length > > s). Is it best to fix these bugs, or change the > documentation? > > > > My opinion would be fix the problem, since we already have > String.sub > to throw exceptions. > > > OK, but this raises two questions: > (1) what would be the behaviour when (length s) <= i < 2 * (length > s). Similar to when 0 > i > -1 * (length s) (i.e. substact length s)? > (2) what about when i < -2 * (length s) or i >= 2 * (length s)? > (Where i = first/last) > What Python does. See the Python reference manual. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net |