> On Aug 25, 2017, at 12:49 PM, Thomas Kluyver <tho...@kluyver.me.uk> wrote:
> 
> Can I gently ask everyone involved to consider whether the 
> notimplemented/error discussion is verging into bikeshedding 
> (http://bikeshed.org/ <http://bikeshed.org/>)?
> 
> The technical arguments I have seen so far are:
> - The exception can include a message
> - The return value can't 'bubble up' from the internals of a hook like an 
> exception
> 
> I don't think the discussion of semantics is going to go anywhere: they are 
> both reasonable ways for the backend to reply "sorry, Dave, I can't do that".


I don’t think they are both reasonable ways any more than it’s reasonable to do 
``raise Return(value)`` instead of ``return value``. The semantics here are 
important because using exceptions for non-exceptional, non erroneous cases has 
*always*, in my experience, lead to weirdness [1].

[1] Like for example, StopIteration which was deemed so bad as to need to break 
backwards compatibility and break consistency with all other uses of exceptions 
just to handle the weirdness in a saner way. Unfortunately we can’t modify the 
Python interpreter to fix our weirdness that is going to happen.

—
Donald Stufft



_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to