News for hackers. Stuff that matters.
Re:I've been designing a language since 2009 – friends and I... by UncleEntity on Sunday August 14, 2022 @02:40PM (#32461720)
Python has an ‘else’ block for ‘while’ and ‘for’ which executes when the loop completes without a break or return.

Never used it myself but it is probably handy, handy enough to be included in the language at least.

Re:I've been designing a language since 2009 – friends and I... by levodelellis on Sunday August 14, 2022 @03:05PM (#32461947)
_OnComplete works on while and for loops. There's an empty as well and I'm not sure if empty should also execute complete or not. I figure I'll know after writing real code in more than one project