[Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

Chris Angelico rosuav at gmail.com
Sat Mar 3 04:01:30 EST 2018


On Sat, Mar 3, 2018 at 7:23 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> On 03/02/2018 07:30 PM, Chris Angelico wrote:
>>
>> On Sat, Mar 3, 2018 at 12:48 PM, Greg Ewing wrote:
>>>
>>> Chris Angelico wrote:
>>>>
>>>>
>>>> It would NOT work for anything where the bool() of
>>>> the desired object doesn't exactly match the loop's condition.
>>>
>>>
>>>
>>>     while condition(x) where x = something():
>>>        ...
>>>
>>
>> And we're back to needing a new keyword. Though this is reasonably
>> plausible, so I could add it to the PEP (as another rejected
>> alternative) if there's support for it.
>
>
> So what happens to rejected alternatives when the PEP itself is rejected?
> ;)
>

Algebraically, they must be accepted. Right?

ChrisA


More information about the Python-ideas mailing list