On 24/05/2018 16:54, Alexander Belopolsky wrote:
I have read most of the PEP 572 related threads, but I don't think
I've seen this idea. As many other people mentioned, Python already
allows a trick to introduce local bindings in generator expressions
and list comprehensions. This can be
On Thu, May 24, 2018, 14:48 Alexander Belopolsky <
alexander.belopol...@gmail.com> wrote:
>
>
> On Thu, May 24, 2018 at 4:59 PM Matt Arcidy wrote:
>
>>
>>
>> On Thu, May 24, 2018, 11:47 Alexander Belopolsky <
>> alexander.belopol...@gmail.com> wrote:
>>
>>> > But I do have a
On Thu, May 24, 2018 at 4:59 PM Matt Arcidy wrote:
>
>
> On Thu, May 24, 2018, 11:47 Alexander Belopolsky <
> alexander.belopol...@gmail.com> wrote:
>
>> > But I do have a mathematics background, and I don't remember ever
>> seeing
>> > "for x = value" used in the sense you
On Thu, May 24, 2018, 11:47 Alexander Belopolsky <
alexander.belopol...@gmail.com> wrote:
> > But I do have a mathematics background, and I don't remember ever seeing
> > "for x = value" used in the sense you mean.
>
> That's so because in mathematics, "for" is spelled ":" as in
>
> {2*a* :
> But I do have a mathematics background, and I don't remember ever seeing
> "for x = value" used in the sense you mean.
That's so because in mathematics, "for" is spelled ":" as in
{2*a* : *a*∈*Z*}
If you can read the above, you should not have trouble reading
{2*a* + *b* : *a*∈*Z *: *b =
On Thu, May 24, 2018 at 11:54:09AM -0400, Alexander Belopolsky wrote:
> I have read most of the PEP 572 related threads, but I don't think I've
> seen this idea. As many other people mentioned, Python already allows a
> trick to introduce local bindings in generator expressions and list
>
I worry about the use of "for" because it will come up in contexts where
"for" already has other meanings. In the case of the example list
comprehension, the word "for" is being used to mean two entirely different
things in a single expression, that seems rather precarious to me.
I prefer "with"
24.05.18 18:54, Alexander Belopolsky пише:
I have read most of the PEP 572 related threads, but I don't think I've
seen this idea. As many other people mentioned, Python already allows a
trick to introduce local bindings in generator expressions and list
comprehensions. This can be achieved
It was a long time ago I couldn't easily find the post but that's alright,
you refreshed the idea :)
Let's see what others think of for x =
I also remembered some languages (like lua) use for x = range (5)
interchangeably with for x in range (5) and guido said it will never make
such a thing,
On Thu, May 24, 2018 at 12:04 PM Robert Vanden Eynde
wrote:
> This idea was mentioned (by me) at a time yes, but wasn't written in the
document.
Can you point me to a specific post? There were so may that I must have
missed that one.
> I think one of the thing was that
This idea was mentioned (by me) at a time yes, but wasn't written in the
document.
I think one of the thing was that it would make the grammar non LL1 because
when seeing the token "for" in a list comprehension it wouldn't know in
advance if it's the loop or the assignment.
And also, it might
I have read most of the PEP 572 related threads, but I don't think I've
seen this idea. As many other people mentioned, Python already allows a
trick to introduce local bindings in generator expressions and list
comprehensions. This can be achieved by adding a "for var in []"
clause. I propose
12 matches
Mail list logo