On 2020-05-02 1:07 p.m., Steven D'Aprano wrote:
On Sat, May 02, 2020 at 12:50:19PM -0300, Soni L. wrote:

> how about:
> > result = Foo.save()
> try:
>   x, y = result
> except ValueUnpackingError:
>   return ...

If you do that, what benefit is ValueUnpackingError over just
ValueError?



unpacking (a generator) still doesn't wrap ValueError, and ValueError is raised a lot more than ValueUnpackingError.
_______________________________________________
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/GFYD6CN6OAEFZ7AALKX5QFJRNX3SFOF7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to