Article View: alt.comp.os.windows-11
Article #1211Re: PSA/QUESTION: Porting Windows batch to Python for macOS/Linux users
From: Lawrence D’Oliveiro
Date: Sun, 22 Nov 2026 19:32
Date: Sun, 22 Nov 2026 19:32
20 lines
2512 bytes
2512 bytes
On Sun, 22 Nov 2026 06:02:39 -0400, Maria Sophia wrote: > There's a lot to unpack there on the "intuition", as you may not > know I learned how to code in the 1970's on Fortran IV, IBM > Assembly, COBOL, PL/I, etc., where, over time, I evolved to hate > coding with a passion because every damn language does the same > exact thing (more or less), in the end, but with frustratingly > irrationally different syntax requirements. > > ... > > 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.
Technical Details
Message-ID:
<11dvg0e$18965$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11dsuk8$2dgm$1@nnrp.usenet.blueworldhosting.com> <11dtk8d$2f73$1@nnrp.usenet.blueworldhosting.com> <11dtkua$3j5$1@nnrp.usenet.blueworldhosting.com> <11du1ds$2d2n$1@nnrp.usenet.blueworldhosting.com> <11du4vq$o88b$1@dont-email.me> <11duejv$pj6$1@nnrp.usenet.blueworldhosting.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Lawrence D’Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.python,alt.os.linux,comp.sys.mac.system,alt.comp.os.windows-11 Subject: Re: PSA/QUESTION: Porting Windows batch to Python for macOS/Linux users Date: Sun, 22 Nov 2026 19:32:30 -0000 (UTC) Organization: A noiseless patient Spider Lines: 20 Message-ID: <11dvg0e$18965$1@dont-email.me> References: <11dsuk8$2dgm$1@nnrp.usenet.blueworldhosting.com> <11dtk8d$2f73$1@nnrp.usenet.blueworldhosting.com> <11dtkua$3j5$1@nnrp.usenet.blueworldhosting.com> <11du1ds$2d2n$1@nnrp.usenet.blueworldhosting.com> <11du4vq$o88b$1@dont-email.me> <11duejv$pj6$1@nnrp.usenet.blueworldhosting.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 22 Nov 2026 19:32:31 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1320133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LKFqZW4bnHnUPrBRkjMjL"; posting-host="459210f3b638d87187d8a6c5f3a5794f" User-Agent: Pan/0.165 (Kostiantynivka) Cancel-Lock: sha1:tsVTL3eDpy7dPLmrQn5COK5NPVU= sha256:JShDEg6t8ER93sihQ3bkWXPhSjOW47qD9UkhUaP3KAQ= sha1:QKlQ++4sV6Sb1X0OiQ/Ivgazu+E= sha256:qgYnJ/is7DcFJDEbaRCpp76HgxPZ4HseEouDDs+1WKM=