> I don't agree that exceptions are the way to do "things" in general. They're the way to so *some* things. The question is whether the thing we're talking about is one of those things.
I mean how is opening a file different than attempting to build an sdist? open() could return true or false and not raise any exception. But it doesn't. If you can't open the file, you get an exception. It's the same idea except here we are asking for an sdist. We would greatly prefer to have one. And if we don't have one, then we have to do something else to handle the error. This *is* Python. Sure, it may not be a good idea, though I think it's nice most of the time. It may not even be accepted for this PEP. But, although I don't have a strong opinion about whether it *should* be in the PEP, I do have a strong opinion about whether it would be an exception to the norms of Python, and my opinion is that it would. The fact that Nick, who I think is the only core developer here, immediately jumped on this issue confirms my suspicions here. 2017-08-25 20:00 GMT-05:00 Greg Ewing <greg.ew...@canterbury.ac.nz>: > xoviat wrote: > >> I agree with Nick that exceptions are the way to do things in Python >> > > I don't agree that exceptions are the way to do "things" > in general. They're the way to so *some* things. The question > is whether the thing we're talking about is one of those > things. > > The reasoning behind this is that Python has in general adopted this >> approach (Nick is right that they would have used NotImplementedError for >> binary operations except for performance issues) >> > > But only because NotImplemented is an out-of-band condition > for operations in general. We're not talking about a general > operation here, but a very specific one that only has a couple > of possible results. > > -- > Greg > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG@python.org > https://mail.python.org/mailman/listinfo/distutils-sig >
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig