On Thursday, September 16, 2010 08:18:32 am Ed Leafe wrote:
> On Sep 16, 2010, at 10:38 AM, John Fabiani wrote:
> > First I did not know you could pass 'param' to gather data.  So my
> > understanding of the use of scan maybe completely wrong.  Is that param
> > used by the function/method to place data into?
> 
>       You can pass any parameters (args and/or kwargs) to scan(), and they 
> will
> be passed as arguments to the function on each scan iteration.
> 
> > I thought the second parameter of the scan method was to determine the
> > direction of the scan (forward vs reverse).
> 
>       def scan(self, func, *args, **kwargs):
> 
>       Nothing about direction. If you pass 'reverse=True', then it will scan 
> in
> reverse order.
> 
> > And I have only used the scan method as simple way to reiterate over the
> > bizojb records.
> 
>       Which is exactly what it is designed to do.
> 
> 
> 
> -- Ed Leafe

Thanks and of course you are right about the "reverse".  I like the way Jacek 
has made me think outside of the box about passing a list and then populating 
the list from the scan.  I bet that box was shaped by my VFP thinking.  I 
could see using it as quick way to extract data into a list.  Although, just 
executing an sql statement against the data might work much faster.


Johnf

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

Reply via email to