On Dec 30, 2007 10:55 PM, Robert Klemme <shortcutter / googlemail.com> wrote:
> Again, this semantic difference you are talking about is still not clear
> to me.  The semantic between #last and #last= and #first and #first= I
> can see at the moment is the lack of a parameter as has been mentioned:
> while you can make #last and #first return a sub array you can only
> assign to a single element with the assignment variants.  But that seems
> ok to me.

I think I'm sold on the idea.  I don't see the extra semantics of
#first and #last over the standard attribute behavior as a problem
either; the getters are just overloaded with a second meaning.

The only slight weirdness I see in it is that [].first = 1 would raise
an IndexError, which seems odd since it doesn't look like there's any
indexing going on.  But I'm not sure what would make more sense, and
it's probably best to keep consistent with #[] anyway.

Regards,
George.