Alan Gauld schreef:
> list [-3:3]
>
> which is an error but is not reported as such, rathger it returns
> an empty list!
I don't think this is an error, and whether it returns an empty list or
not depends on the length of the list:
>>> for i in range(10):
print i, range(i)[-3:3]
0 []
1 [0]
2 [0, 1]
3 [0, 1, 2]
4 [1, 2]
5 [2]
6 []
7 []
8 []
9 []
--
If I have been able to see further, it was only because I stood
on the shoulders of giants. -- Isaac Newton
Roel Schroeven
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor