[Python-ideas] Arguments to exceptions

Jeff Walker jeff.walker00 at yandex.com
Wed Jul 5 20:46:12 EDT 2017


I am one of those that also find you to be too negative. I find your critiques to
be useful. You often raise issues that had not occurred to me. But then you
go further an make pronouncements which I think go too far. For example:

> the idea doesn't actually solve the problem it is intended to

or

> His solution can't work

or

> He hasn't demonstrated that there is a real problem

None of these ring true to me. Rather it seems like you just don't like the
approach he has taken.

You are often dismissive of other peoples code, experiences and opinions.
For example, in Ken's first post he used NameError as an example, though
he indicated that the same issue occurred widely in the language. Rather
than asking for further examples, you immediately dismissed his idea as
'code smell' largely on his use of NameError. That is a pretty derogatory
response that really cannot be argued against because it is simply your
opinion.

I think we all understand that the chance of actually changing the language
by sending an idea to python-ideas at python.org is pretty low, but it can be fun
and educational to discuss the ideas. And doing so makes this more of a
community. However it seems like you feel you must play the role of a barrier
that protects the language from poorly conceived ideas. I don't think we
need that. The good ideas are naturally sorted from the bad ones through
prolonged discussion. And the early criticism can take the joy out of the
process and can lead to the original poster becoming defensive (for example,
consider how you just reacted to a little criticism). They can feel like people
have not taken the time to understand their idea before criticizing it. It is worth
noting that Ken felt the need to start fresh after your initial criticism.

When people send an idea to this mailing list they are exposing themselves,
and the criticism can really hurt. It is like they are being told that they are not
good enough to contribute. We should be sensitive to that, and focus first on
the good aspects of their idea. We should defer our criticisms and perhaps
try couching them as suggested improvements.

I find you a very valuable member of the community, but I have often
wished that you would take a more positive approach.

Jeff






05.07.2017, 11:33, "Steven D'Aprano" <steve at pearwood.info>:
> On Wed, Jul 05, 2017 at 04:12:29PM +0000, Ed Kellett wrote:
>>  Hi,
>>
>>  On Wed, 5 Jul 2017 at 16:41 Steven D'Aprano <steve at pearwood.info> wrote:
>>
>>  > and more. Third parties *are* providing rich exception APIs where it
>>  > makes sense to do so, using the interface encouraged by PEP 352 (named
>>  > attributes), without needing a default "StructuredException" in the
>>  > core language.
>>  >
>>
>>  Your arguments might be used to dismiss anything.
>
> Do you have an answer for why the argument is wrong? People *are*
> writing structured exceptions, which undercuts the argument that we must
> do something because if we don't lead the way others won't.
>
> The argument that "we must do something, this is something, therefore we
> must do it" doesn't cut any ice here. Read the Zen 



And you seem rather dismissive of other peoples code and experiences. For example, in Ken's first post he used NameError as example, though he indicated that the same issue occurred widely in the language. Yet you dismissed his idea as 'code smell'. That is a pretty derogatory response that does not allow for the fact that not all code needs to be hardened to be useful. One of the nice things about Python over other languages such as Java and C++ is that you can throw something together quickly that works, and that may be what is needed. If you are throwing a script together for your own use, you often don't need the harden the program like you would if you are distributing it to the world.

You've said repeatedly that using unnamed arguments would be

05.07.2017, 11:33, "Steven D'Aprano" <steve at pearwood.info>:
> On Wed, Jul 05, 2017 at 04:12:29PM +0000, Ed Kellett wrote:
>>  Hi,
>>
>>  On Wed, 5 Jul 2017 at 16:41 Steven D'Aprano <steve at pearwood.info> wrote:
>>
>>  > and more. Third parties *are* providing rich exception APIs where it
>>  > makes sense to do so, using the interface encouraged by PEP 352 (named
>>  > attributes), without needing a default "StructuredException" in the
>>  > core language.
>>  >
>>
>>  Your arguments might be used to dismiss anything.
>
> Do you have an answer for why the argument is wrong? People *are*
> writing structured exceptions, which undercuts the argument that we must
> do something because if we don't lead the way others won't.
>
> Tof Python:
>
>     Now is better than never.
>     Although never is often better than *right* now.
>
> The burden is not on me to prove that this idea is a bad idea. I don't
> have to prove this is a bad idea. The burden is on those who want to
> make this change to demonstrate to the satisfaction of the core
> developers that their idea:
>
> - solves a genuine problem;
>
> - without introducing worse problems;
>
> - that it will do what they expect it to do;
>
> - and that the change is worth the effort in implementation
>   and the cost to the language (bloat and churn).
>
> If proponents of the idea can't do that, then the status quo wins:
>
> http://www.curiousefficiency.org/posts/2011/02/status-quo-wins-stalemate.html
>
> I've had a number private emails complaining that I'm "too negative" for
> this list because I pointed out flaws. Do people think that we make
> Python better by introducing flawed changes that don't solve the problem
> they're supposed to solve?
>
> (I'm not going to name names, you know who you are.)
>
> If people want this change, it's not enough to get all snarky and
> complain that critics are "too negative" or "too critical of minor
> problems". You need to start by **addressing the criticism**.
>
> In the very first reply to Ken's initial proposal, it was pointed out
> that his plan goes against PEP 352 and that he would have to address why
> that PEP is wrong to encourage named attributes over positional
> arguments in exception.args. As far as I can see, nobody has even
> attempted to do that.
>
> I think that's the place to start: if your plan for giving exceptions
> structure is to just dump everything into an unstructured args list with
> no guaranteed order, then you're not actually giving exceptions
> structure and you're not solving the problem.
>
>  (like the fact that the
> idea
> doesn't actually solve the
> problem
> it is intended to).
>
> You know what? I don't have to prove anything here. It's up to the
> people wanting this change to prove that it is useful, worth the
> effort, and that it will do what they expect.
>
> Ken suggested a concrete change to BaseException to solve a real lack.
> His solution can't work, for reasons I've already gone over, but at
> least he's made an attempt at a solution. (He hasn't demonstrated that
> there is a real problem
>
>  If people are already
>>  doing $thing, clearly they don't need help from the language. If they're
>>  not already doing it, any language feature would be pointless.
>>
>>  Ed
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/


More information about the Python-ideas mailing list