>> Does that mean that first() and next() are undefined for sets?
[Stephen J. Turnbull <[email protected]>]
> first() is undefined. next() is defined by reference to iterating
> over the set (that's why I don't have a problem with iterating over a
> set).
Every suggestion here so far has satisfied that, if S is a non-empty set,
assert next(iter(S)) is first(S)
succeeds. That is, `first()` is _defined_ by reference to iteration
order. It's "the first" in that order (hence the name).
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/VEGJZW6KSL75P6YK522KIYHNNKPXDE5N/
Code of Conduct: http://python.org/psf/codeofconduct/