2018-05-25 13:06 GMT+03:00 Jacco van Dorp <[email protected]>: > [...] > > I would very much like to write: > > >>> do_something if cond > > and be done with it. Like a ternary expression but without the else clause. > > If it is an expression, what should `do_something if cond` return on failure? If you don't care you can already use `cond and do_something`.
With kind regards, -gdg
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
