2018-05-25 13:06 GMT+03:00 Jacco van Dorp <j.van.d...@deonet.nl>: > [...] > > 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 Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/