>
> I've changed the behaviour to throw a ValueError if a negative step is
> provided with increasing range and accept negative steps for decreasing
> ranges.
>

I am not sure this is better. This would introduce a BC break because now
it's not as easy to avoid the error as you can't just wrap the variable in
abs() call.
I am not sure why we are even treating this as an error. It looks to me
like PHP already copes with this whether it's a positive or negative
number. If we just want to inform the user that the sign has no meaning, we
can raise a Notice and leave it at that. It's not wrong that the step is
negative, it's just a pointless sign.

Reply via email to