<div dir="ltr"><div>I don't have any context here, but "return NotImplemented" is a very narrow idiom intended only for binary operators (e.g. __add__) when the interpreter should give the other operand a chance (e.g. __radd__) or use a default implementation.<br><br></div>In pretty much any other context, if you have an operation that returns an regular value or an error value, the error value should be None. (Exceptions include e.g. returning a non-negative int or -1 for errors, or True for success and False for errors.)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 25, 2017 at 6:53 PM, xoviat <span dir="ltr"><<a href="mailto:xoviat@gmail.com" target="_blank">xoviat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Oh, BDFL, will you settle whether we should raise an exception or return Notimplemented?</div><div class="gmail_extra"><br><div class="gmail_quote">On Aug 25, 2017 8:28 PM, "Greg Ewing" <<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</a>> wrote:<br type="attribution"><blockquote class="m_-6294858082926799749quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-6294858082926799749quoted-text">xoviat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I mean how is opening a file different than attempting to build an sdist?<br>
</blockquote>
<br></div>
1. Opening a file is a very common operation.<br>
<br>
2. Most file opens are expected to succeed, and if one doesn't,<br>
the appropriate place to deal with that is almost never at the<br>
site of the open call, but somewhere further up.<br>
<br>
In contrast, there's probably only about one place in any<br>
given frontend where the backend's build_sdist method gets<br>
invoked, and it's unlikely the ability to let a not-implemented<br>
exception bubble up from that point would be of great use.<div class="m_-6294858082926799749elided-text"><br><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Greg<br>
<br>
______________________________<wbr>_________________<br>
Distutils-SIG maillist  -  <a href="mailto:Distutils-SIG@python.org" target="_blank">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/distutils-sig</a><br>
</font></span></div></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>