On Mar 2, 8:15 am, Giles Brown <[EMAIL PROTECTED]> wrote:
> On Mar 2, 2:08 pm, Preben Randhol <randhol
>
> [EMAIL PROTECTED]> wrote:
> > On Sun, 2 Mar 2008 15:06:17 +0100
>
> > Preben Randhol <[EMAIL PROTECTED]> wrote:
> > >    class dbase(list):
>
> > Sorry the definition of the class is:
>
> >         class dbase(object):
>
> > it doesn't derive from the list class.
>
> > Preben
>
> http://docs.python.org/lib/typeiter.html

Be careful on your descision to return an ordered iterator or not--
that is, whether it iterates over the dictionary or the list (if I
understand you correctly).  If the order's unimportant then please
disregard.

You can also use:

>>> a= [2,3,4]
>>> b= iter( a )
>>> next( b )
2
>>> next( b )
3
>>> next( b )
4
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to