What words would you put in the PEP? I would not accept anything that makes mypy not in compliance. OTOH if Pyre supports Final in a for loop, it is still in compliance — only a program that uses that isn’t. 

On Tue, May 7, 2019 at 13:20 Dominik Gabi <dkgispam@gmail.com> wrote:
On Tue, May 7, 2019 at 10:08 AM Guido van Rossum <guido@python.org> wrote:
>
> On Tue, May 7, 2019 at 1:01 PM Dominik Gabi <dkgispam@gmail.com> wrote:
>>
>> >> 1. what’s the rationale for prohibiting `Final` in loops? I have a hunch this has to do with Python leaking scopes but not entirely sure. IIRC this is fine in Java.
>> >
>> >
>> > In some sense yes. The point is that Python cycles don't create a separate scope, they just live entirely in the enclosing scope.
>> >
>>
>> Pyre diverges from the runtime here in that we don't allow variables
>> to escape the scope of conditionals and loops. Would appreciate it if
>> we could adapt the PEP to allow for that behavior.
>
>
> That sounds like youre deviating from expected behavior of the interpreter, and if you disagree with the interpreter about this, you are welcome to also disagree with this PEP about placement of Final. IOW I don't think the PEP should endorse this deviation.
>
> --
> --Guido van Rossum (python.org/~guido)
> Pronouns: he/him/his (why is my pronoun here?)

We all diverge from the expected behavior of the interpreter by
constraining dynamic behavior that we deem unsafe. E.g. mypy will not
support dynamic subclassing. We clearly draw the line here differently
but I don't see why the PEP should not be able to accommodate both.
--
--Guido (mobile)