On 16 October 2016 at 03:17, Random832 <random...@fastmail.com> wrote:
> On Sat, Oct 15, 2016, at 06:38, Steven D'Aprano wrote:
>> > Replacing it _with the items_ is not the same thing as replacing it
>> > _with a sequence containing the items_,
>>
>> I don't think I ever used the phrasing "a sequence containing the
>> items". I think that's *your* phrase, not mine.
>
> It's not your phrasing, it's the actual semantic content of your claim
> that it would have to wrap them in a tuple.
>
>> The core developers have made it absolutely clear that changing the
>> fundamental equivalence of list comps as syntactic sugar for:
>>
>>     result = []
>>     for t in iterable:
>>         result.append(t)
>>
>>
>> is NOT NEGOTIABLE.
>
> I've never heard of this. It certainly never came up in this discussion.

It's not negotiable, and that most recently came up just a few weeks
ago: https://mail.python.org/pipermail/python-ideas/2016-September/042602.html

> And it was negotiable just fine when they got rid of the leaked loop
> variable.

We wrapped it in a nested function scope without otherwise changing
the syntactic equivalence, and only after generator expressions
already introduced the notion of using a nested scope (creating Python
2's scoping discrepancy between "[x for x in iterable]" and "list(x
for x in iterable)", which was eliminated in Python 3).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to