S
Stephan Diehl
I just found out by accident, that slice indices can be larger than
the length of the object. For example
I'd rather expected to be confronted with an IndexError.
(This is actually described in
http://docs.python.org/lib/typesseq.html, so my expectation was wrong )
Does anybody know, why this is preferred to just raising an error?
the length of the object. For example
'''test'[:50] 'test'
'test'[40:50]
I'd rather expected to be confronted with an IndexError.
(This is actually described in
http://docs.python.org/lib/typesseq.html, so my expectation was wrong )
Does anybody know, why this is preferred to just raising an error?