in reply to Re: Re: Fringe case slice behavior
in thread Fringe case slice behavior
Was any conclusion reached as a) whether there would be such a keyword?Not by me. :-)
b) What it is likely to be?I suspect a pop should be made to do the expected thing, in which case you have your keyword (or at least, method name). But as I said, a [-1] subscript will certainly work. It may well become the idiom of choice for when you really do want to select the last value.
But note that many uses of the C-style comma operator are in fact in void context, in which case you don't much care whether it returns the last value or a reference to the list, since it's just going to throw it away anyway. So you can just use comma in those cases.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Fringe case slice behavior
by BrowserUk (Patriarch) on Jan 14, 2004 at 02:37 UTC |