Antoon Pardon wrote:

> I sometimes think python should have been more explicite here,
> using a marker for the start-index and end-index, may '^' and
> '$'. So if you wanted the last element you had to write:
> 
>   lst[$]
> 
> And for the next to last element:
> 
>   lst[$ - 1]
> 
> 
> This would make accessing list elements counted from the rear
> almost just as easy as it is now but wouldn't interfere with
> the ask forgiveness programming style.

How would you pass this argument to __getitem__?
What would be allowed, only '$-x' or also '$+x' or what else?
What type would '$' be?

Reinhold
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to