That's what I think it should be for.
I know safe open(...) isn't a really good example for this, but I had just
used that for demonstration purposes. Instead what I am saying is that
sometimes we just don't care even if an statement raises exception. Like
the first example in which I am sending an log, which isn't important.
And in any case, the original try except keywords will still be there.

Also I read the similar idea you mentioned, and I guess that is also a good
way to implement it.
We can replace *safe telegram_log("...")* with one liner: *telegram_log("...")
except: None*

After all, python is known for one liners and this would be an another
great one liner if implemented.
_______________________________________________
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/RU3LPYKTYSTJCXUCEIUSG2GCBPZAP6UY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to