Sometimes it would be useful to be able to write: def foo(): try: return thing() except ValueError; try: return otherthing() except ValueError; try: return yetotherthing() except ValueError; if shouldraise(): raise
But currently this needs to be written like so: def foo(): try: return thing() except ValueError: try: return otherthing() except ValueError: try: return yetotherthing() except ValueError: if shouldraise(): raise Look at all that unnecessary indentation! Would be nice to get rid of it. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/U4YH5O255RBMNXOM3VEUBCDDCHQDFES5/ Code of Conduct: http://python.org/psf/codeofconduct/