On 24 August 2017 at 10:41, xoviat <xov...@gmail.com> wrote:

> On Aug 24, 2017 8:28 AM, "Thomas Kluyver" <tho...@kluyver.me.uk> wrote:
>
>> On Thu, Aug 24, 2017, at 02:21 PM, xoviat wrote:
>>
>> I mean is this golang or Python? In Python, you raise notimplementederror.
>>
>>
>> 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.
>>
>
>
> 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.
>

https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/fractions.py#L382

So, yes, it's used in the wild, by stdlib itself no less.
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to