On Fri, Aug 9, 2019 at 8:07 PM Chris Angelico <ros...@gmail.com> wrote:

> On Sat, Aug 10, 2019 at 12:56 PM Guido van Rossum <gu...@python.org>
> wrote:
> >
> > On Fri, Aug 9, 2019 at 11:06 AM Barry Warsaw <ba...@python.org> wrote:
> >>
> >> Nick and I are now on the same page, so I don’t think we *have* to have
> a formal SC vote.
> >
> >
> > OK, I agree. Let's remove TargetScopeError from the PEP and from the
> implementation. Since that makes three SC members in favor the motion
> passes. I hope Chris A (the third PEP author) can live with this -- in his
> last post on the subject that I can find he was still in favor of a
> subclass of SyntaxError (in any case he's outvoted by the other two PEP
> authors :-).
> >
>
> I was at the time, but it was only a weak recommendation. And having
> seen other examples (eg a global statement doubling a function
> argument) that just use SyntaxError, I'm totally fine with just making
> it SyntaxError with a useful text message.
>
> So go for it! Remove TargetScopeError.
>
> (That said, though: it may be helpful to have some metadata attached
> to the exception, like the name that's being assigned to. Not sure how
> easy/hard that'll be.)
>

We don't do that for any of the other scope-related SyntaxErrors, so I
don't think it's important.

(Again, this is not an error people are likely to make unless they are
*looking* for edge cases of the walrus operator.)

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/AAIIWUI6MH7N46VWJQ5S4PFYUVIK25YE/

Reply via email to