On Sun, 22 Nov 2026 17:45:34 -0400, Maria Sophia wrote:
> On Sun, 22 Nov 2026 19:32:30 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>
>> But I see that instead of writing cur = conn.cursor(),
>> cur.execute(...), and cur.fetchall() in every query function, your
>> suggestion allows us to create a cursor, run a cmd with bound
>> values, and yield rows one at a time as a generator instead of
>> loading everything into a list up front, where mapfn lets us
>> optionally transform each row on the fly to pull a single column.
>
> You see why all languages are not the same. The concept of what is
> “high-level” has progressed somewhat since the 1970s.
>
> This is about philosophy...
I showed you an example where it was a bit more than just
“philosophy”, did I not: Python offers constructs that let you do more
with less code, than perhaps what you were used to. Less code to write
means less effort and time required, less chance for bugs to get in,
and less ongoing maintenance effort required into the future.