On Thu, May 17, 2018 at 12:55 PM, Manuel Barkhau <mbark...@gmail.com> 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.

-CHB



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to