On Tue, Sep 13, 2016, at 08:44, Michel Desmoulin wrote: > You won't see very complex usages, mostly things like: > > val = foo[-1] except IndexError: "bar" > doh = val.attr.other except AttributeError: "default"
It occurs to me that if lambda were more lightweight [whether it's the syntax or the implementation that's the problem is unclear], not only this but also the ternary operator could have been functions. val = iexcept(lambda: foo[-1], IndexError, lambda: "bar") _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/