News for hackers. Stuff that matters.
Re:Why I'm still using Python by spicyusername on Friday December 30, 2022 @04:44PM (#34190480)
I almost always prefer to read nested loops and conditionals than list comprehensions.

I find the syntax of list comprehensions ugly and inscrutable.

Re:Why I'm still using Python by xvedejas on Friday December 30, 2022 @04:48PM (#34190517)
Additionally I find that it's easier to add complexity to the loops; once you want to start doing nontrivial things in a list comprehension, you often need to rewrite it into a loop first anyway.
Re:Why I'm still using Python by Spivak on Friday December 30, 2022 @06:05PM (#34191178)
> It's easier to add complexity to the loops

This is basically selling point for comprehensions. You can't add complexity to them so any comprehension you see fits a few common loop patterns you can grok immediately.

If you see an actual for loop in python it means "pay attention something odd is probably going on."

Re:Why I'm still using Python by gorgoiler on Saturday December 31, 2022 @03:39AM (#34194724)
* * *