<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 24 August 2017 at 10:41, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"></div><div class="gmail_quote"><div class="gmail_quote">On Aug 24, 2017 8:28 AM, "Thomas Kluyver" <<a href="mailto:thomas@kluyver.me.uk" target="_blank">thomas@kluyver.me.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div>On Thu, Aug 24, 2017, at 02:21 PM, xoviat wrote:<br></div>
<blockquote type="cite"><div>I mean is this golang or Python? In Python, you raise notimplementederror.<br></div>
</blockquote><div><br></div>
<div>But there's a NotImplemented singleton in Python as well. The
argument for using a return value is that the hook code has to
deliberately return that, whereas a NotImplementedError could bubble up
from some internal call, in which case it should really be registered as
an error.<br></div>
</div>
</blockquote></div>
<br><br type="attribution"><div dir="auto">That's actually the general argument against exceptions and why golang doesn't have them. I have not seen notimplemented used in the wild ever though.</div></div></blockquote><div><br></div><div><a href="https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/fractions.py#L382">https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/fractions.py#L382</a><br></div><div><br></div><div>So, yes, it's used in the wild, by stdlib itself no less.<br></div></div></div></div>