The problem is that n is integer and integer do not have different representations for 0 and -0 (while floats do).
Therefore it is impossible to disambiguate the following two case scenarios:
>> b[:n] # take the first n
>> b[:-n] # take all but the last n
when n ==0.
One possible solution (you decide whether it is elegant :-D ):
>> b[:len(b)-n]