Re: [Python-Dev] PEP-xxx: Unification of for statement andlist-comp syntax
Niko Matsakis wrote:
For what it's worth, I also favor the continue syntax Heiko compared his code against.
I also commonly do early tests and either break or continue, but my criteria is whether it makes the flow easier to understand. Sometimes it does, sometimes it doesn't. (on two lines of course ;) where things are considerably more complex
In general, I favor the idea that the main flow of computation should have the least indentation.
Ditto, simply because it tends to be more readable.
I also am +1 on this PEP, even if it is doomed, as I've often longed to use list- comprehension like syntax in a for loop; to me it is mentally taxing to remember which syntax is supported where.
Just thought I'd throw Heiko some support. :)
I'm -1 because there are numerous other ways to do it that are just as clear IMO. No support from me Heiko ;) Tim Delaney
participants (1)
-
Delaney, Timothy (Tim)