array next pointer

Benjamin Peterson benjamin at python.org
Tue Mar 17 14:23:38 EDT 2009


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.







More information about the Python-list mailing list