[Distutils] PEP 517 again

Leonardo Rochael Almeida leorochael at gmail.com
Thu Aug 24 09:36:26 EDT 2017


On 24 August 2017 at 10:28, Thomas Kluyver <thomas at 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.
>

This! And a backend that wanted a bubbled up NotImplementedError (or some
other exception) to mean it actually doesn't support an operation, can
catch the error and return. The ideal Pythonic way would be to raise a
specific exception (something like PEP517UnsupportedOperation), but since
it's not a builtin we would be left with the problem of defining it
somewhere, which would become a dependency of all backends, and no, we
don't want that.

All this has been hashed and rehashed before. I think we can move on from
this argument and define `return NotImplemented` as the way to define a
backend operation as unsupported.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170824/f669ab15/attachment-0001.html>


More information about the Distutils-SIG mailing list