View Single Post
Old 12-09-2010, 11:26 AM   #98
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 4,702
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by kovidgoyal View Post
It would be nice to support negative indices for substr for "length from the end"
It does.

The result is x[start:end]. As it makes no sense for end to be zero, I used zero to indicate x[start:]. There is no ambiguity with the start field, so no hack was required.
chaley is offline   Reply With Quote