On Thu, May 17, 2018 at 12:55 PM, Manuel Barkhau firstname.lastname@example.org wrote:
continue if not is_valid(elem) ...
how is this better than:
if not is_valid(elem): continue
But even if it is, that might be a consideration for a new language, but adding it to python now is pretty darn unlikely.
When there is an expression involved for the case of a `return` or `raise` statement, I don't think it's such a great style, because the conditional gets hidden off to the right.
now I"m confused -- if it's not a great sytle, why suggest it?
and I was thinking that the one good thing is that the "return" or "break" is a bit more prominent -- which could be a good thing.
Alternatively, is there a good way I can implement this as a
preprocessor for myself?
I'm pretty sure not -- python is very dynamic, but not let you redefine the language semantics.
Other than as a import hook that re-wrote the code on the fly.
but really -- don't do that -- then no one else will understand your code.