array next pointer

Armin feng.shaun at gmail.com
Mon Mar 16 20:02:35 EDT 2009


On Tuesday 17 March 2009 19:04:25 Luis Zarrabeitia wrote:
> On Tuesday 17 March 2009 03:17:02 pm R. David Murray wrote:
> > > > (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 ;)
>
> Yep, that's what I meant, I forgot the parameter name.

Could you give an example of next() with a sentinel and describe its use case 
please?  I have a little trouble understanding what you guys mean!

thanks,
-- 
Armin Moradi



More information about the Python-list mailing list