Ben Cohen on Nostr: Did you know python for loops can have an else clause? It's code that only runs if ...
Did you know python for loops can have an else clause? It's code that only runs if the loop terminates naturally without a break.
#Swift doesn't have this exact feature, but you can get the same result with a labelled continue.
Published at
2024-02-08 23:11:31Event JSON
{
"id": "4bb2feb1391d2465efdd5ccaeb6529ad2c0572199b4e14523adf0d9eaf762d81",
"pubkey": "d2c7e7c0b6bdf9cd41e14c5d989c6b422d8ba011d2622937f2596a5b23425fb6",
"created_at": 1707433891,
"kind": 1,
"tags": [
[
"t",
"swift"
],
[
"proxy",
"https://mastodon.social/users/airspeedswift/statuses/111898387485659589",
"activitypub"
]
],
"content": "Did you know python for loops can have an else clause? It's code that only runs if the loop terminates naturally without a break.\n\n#Swift doesn't have this exact feature, but you can get the same result with a labelled continue.\n\nhttps://files.mastodon.social/media_attachments/files/111/898/387/183/298/207/original/ebc876195cbe52ef.png\n\nhttps://files.mastodon.social/media_attachments/files/111/898/387/206/339/002/original/1ac1e3bc7fa19ace.png",
"sig": "fe5961466641098891c60b4ad21ca341ccdb90d136ea43b40b863a931853670f0edc4e69ab7114e12f054e936ad603edb614d602b760986062872c4660fe2335"
}