That's still confusing though. The problem here is that `else` is semantically attached to `break`, but syntactically attached to the body of the loop. The latter makes it look like it executes if the loop body didn't, if you interpret it in the most straightforward way.
IMO a better design would be to have a block that always executes at the end of the loop - there's even a reasonable keyword for it, `finally` - but gets a boolean flag indicating whether there was a break or not:
for server in servers:
if server.check_availability():
primary_server = server
break
finally did_break:
if not did_break:
primary_server = backup_server
Or better yet, make `break` take an optional argument (which defaults to `True` if unspecified), and that's what you get in `finally`. So this could be written:
for server in servers:
if server.check_availability():
break server
finally server:
primary_server = server if server is not None else backup_server
I remember it by heart too, from 38 years ago. Plus most of "O Sirmio, gem of islands and peninsulas, every one of which Neptune, in his dual role, supports in the liquid lakes and vast seas...".
That was thanks to a mid winter Catullus test that got delayed several times due to flu circulating in our year 11 class. By the time everyone was finally back in school, we'd revised it something like 5 times and knew all the set poems off by heart.
That's because they posted them somewhere else (easy mistake to make.. HN doesn't show you the full link in a comment, so copy/paste just copies the ellipsis)
When I was learning Dutch, I found the same gap between kids' books that were too simple and proper novels that were too complex.
Newspapers were the easiest and best way to bridge that. They made it easy to pick a story where you had both some interest and enough background context.
I started with De Telegraaf, a popular newspaper, with short, simple stories and lots of photos. And over the course of 18 months worked my way up to serious papers like NRC Handelsblad and de Volkskrant.
So I'd give newspapers (and magazines) a go.
Back then, I'd sit in a cafe with my dictionary, reading their newspapers, and handwriting lists of words to learn. Nowadays it would be reading the paper's website on my laptop, pasting paragraphs into GPT, and adding the words to Anki etc :)
Funny timing - I just finished today's episode of "NOS Journaal in Makkelijke Taal". I have not regularly followed "the news" in many years, but this channel offers a pleasant way to get some daily practice; it's simple enough to follow along, with a few new words and phrases to learn each time. I'll check out De Telegraaf as well - thanks for the recommendation.
SAR = Synthetic Aperture Radar, where the radar flies along a straight line and the apparent rotation of the ground produces a Doppler shift that can be used to get high cross-range resolution.
ISAR = Inverse Synthetic Aperture Radar, where the radar is still (e.g. on the ground) and the target (e.g. a plane) is flying, and their relative motion produces a rotation of the target, which equally produces a Doppler shift that can be used to get high cross-range resolution.
Dictionary says that pumpkin came from French pompon (large melon) and was originally pumpion. English colonists named the orange melon they discovered in New World pumpkin.
Maybe it was joke pronunciation, calling large melon small. It could be a term of endearment for favorite melon. It could be they wanted to distinguish between all large melons and this large melon. Or it could be pronunciation drifting from use.
... or were early New World squash just of the smaller variety and only recently have we selectively bred them once that Mendel fellow started messing around with his peas?
I don't think pumpkin gets is name from the "-kin" diminutive.
Etymologyonline says: 1640s, "gourd-like fruit, of a deep orange-yellow color when ripe, of a coarse decumbent vine native to North America," an alteration of pompone, pumpion "melon, pumpkin" (1540s), from French pompon, from Latin peponem (nominative pepo) "melon," from Greek pepon "melon."
So the "n" has been on the end of the word for a long time.
reply