durusmail: durus-users: Seeking a Volunteer Speaker for a 5-Min Recorded Talk
Seeking a Volunteer Speaker for a 5-Min Recorded Talk
2007-09-09
Seeking a Volunteer Speaker for a 5-Min Recorded Talk
2007-09-11
2007-09-11
2007-09-11
2007-09-11
2007-09-12
Re: Seeking a Volunteer Speaker for a 5-Min Recorded Talk
2007-09-12
Re: Seeking a Volunteer Speaker for a 5-Min Recorded Talk
2007-09-12
2007-09-11
2007-09-11
2007-09-11
Re: Seeking a Volunteer Speaker for a 5-Min Recorded Talk
2007-09-13
Re: Seeking a Volunteer Speaker for a 5-Min Recorded Talk
2007-09-13
2007-09-13
Seeking a Volunteer Speaker for a 5-Min Recorded Talk
Mike Orr
2007-09-11
On 9/11/07, David Binger  wrote:
>
> On Sep 11, 2007, at 11:29 AM, Mike Orr wrote:
>
> > On the other hand, it's easier to do a SQL query
> > or bulk update in one step than to loop through all your records in a
> > 'for' statement, plus you can do queries directly in the command-line
> > tool.
>
> I'm curious about how writing a query is easier than writing a loop.
> It doesn't seem better to me.

It's just sometimes a hassle to write a loop to count records matching
a condition, or to perform a common update on several records.  You
can avoid the loop with a clever list interpolation or itertools
functions.  The equivalent
SQL or SQLAlchemy construct is sometimes a shorter one-liner.  It doesn't
matter in programs, just in interactive usage.

--
Mike Orr 
reply