On May 21, 12:52 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
[...]
> Yes, something like peek() or any() would be useful. But you're not
> restricted by the builtin methods, you could write your own:
>
> def peek(iterable):
>return iter(iterable).next()
Yes, but that's not getting rid
En Sun, 20 May 2007 17:27:20 -0300, Arnaud Delobelle
<[EMAIL PROTECTED]> escribió:
> Hi all,
>
> I often find myself needing to get (non-destructively) the value of
> the member of a singleton set. Is there a good way to do this (as an
> expression?) None of the ones I can think of satisfy me,