But isn't it true for JavaScript too? So I don't really get the author's point... am I missing something or the author('s LLM?) forced a moot comparison to JavaScript?
Edit: after reading the examples twice I am 99.9% sure it's slop and flagged it.
Edit2: another article from the same author: https://mergify.com/blog/why-warning-has-no-place-in-modern-...
> This isn’t just text — it’s structured, filterable, and actionable.
My conclusion is that I should ask LLM to write a browser userscript to automatically flag and hide links from this domain for me.
I don't think so. It's been a while since I've bled on tricky async problems in either language, but I'm pretty sure in JS it would be
[...]
parent_before
parent_after
child_before
[...]
In JS, there are microtasks and macrotasks. setTimeout creates macrotasks. `.then` (and therefore `await`) creates microtasks.Microtasks get executed BEFORE macrotasks, but they still get executed AFTER the current call stack is completed.
From OP (and better illustrated by GP's example) Python's surprise is that it's just putting the awaited coroutine into the current call stack. So `await` doesn't guarantee anything is going into a task queue (micro or macro) in python.
Quick rundown for the unfamiliar:
Give it a command as a list of strings (e.g., subprocess.run(["echo", "foo"]).)
It takes a bunch of flags, but the most useful (but not immediately obvious) ones are:
By default, subprocess.run will print the stdout/stderr to the script's output (like bash, basically), so I only bother with capture_output if I need information in the output for a later step.