On Sep 23, 2010, at 12:32 PM, Jacek Kałucki wrote:

> Yes I did assume that bizobj iterator is the same as Python iterator.

        It is. A Python iterator supports the __iter__() and next() methods, 
and raises a StopIteration exception. The thing you are so intently focused on 
is the "container" aspect, which is defined for each iterable class. For 
bizobjs, it is a sequence of record numbers.

> If I was wrong, sorry for that. Now it's clear for me.
> But I still see no sense in such iterator and in multiplying iterator 
> entity existence.
> Could you show me an example, where current iterator
> approach is better than Python approach, please?


        [biz.Record.sales_amount for rec in biz.bizIterator()
                if biz.Record.stateprov == "NJ"]


-- Ed Leafe



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to