Benjamin Peterson <benja...@python.org> wrote: > Luis Zarrabeitia <kyrie <at> uh.cu> schrieb: > > > > Works for python2.4 and 2.5 also. > > > > In python3, this should be used instead: > > > > >>> b = iter(a) > > >>> c = next(b) > > > > (btw, I love the new sentinel argument for the next function in python3!) > > next() doesn't have a sentinel argument. It's iter() which does, and that's in > 2.x also.
But it does have a 'default' argument, and you can pass that a sentinel, so it amounts to the same thing ;) -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list