03.09.19 11:02, Chris Angelico пише:
On Tue, Sep 3, 2019 at 5:53 PM Serhiy Storchaka wrote:
02.09.19 12:24, Chris Angelico пише:
But the curious difference happens in 3.7. I don't know what changed
to cause this, but from there on, the list gets built and then
unpacked.
This was a side
On Tue, Sep 3, 2019 at 5:53 PM Serhiy Storchaka wrote:
>
> 02.09.19 12:24, Chris Angelico пише:
> > But the curious difference happens in 3.7. I don't know what changed
> > to cause this, but from there on, the list gets built and then
> > unpacked.
>
> This was a side effect of moving the
02.09.19 12:24, Chris Angelico пише:
But the curious difference happens in 3.7. I don't know what changed
to cause this, but from there on, the list gets built and then
unpacked.
This was a side effect of moving the optimization for `x in [a, b]` from
the peepholer to the AST optimizer.
--
Am Montag, 2. September 2019 00:49:05 UTC+2 schrieb Hongyi Zhao:
> Hi,
>
> What's differences:
>
> a,b = 2,3 and [a,b] = [2,3]
>
> Regards
In this example the result is the same but the second one
builds, internally, an additional list, therefore isn't as sufficient
as the
Hi,
What's differences:
a,b = 2,3 and [a,b] = [2,3]
Regards
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Sep 2, 2019 at 6:31 PM Alan Bawden wrote:
>
> Dang! There is exactly the instruction sequence I just argued could be
> optimized away still sitting right there. So maybe my belief that this is
> being done by peephole optimization is in fact incorrect? So I went and
> tried again:
>
>
Chris Angelico writes:
> On Mon, Sep 2, 2019 at 12:36 PM Alan Bawden wrote:
...
> > > > a,b = 2,3 and [a,b] = [2,3]
...
> > It looks to me like they generate identical code. The first one calls the
> > construction of a tuple, where the second one calls for the
On Mon, Sep 2, 2019 at 12:36 PM Alan Bawden wrote:
>
> Eko palypse writes:
>
> > Am Montag, 2. September 2019 00:49:05 UTC+2 schrieb Hongyi Zhao:
> > > Hi,
> > >
> > > What's differences:
> > >
> > > a,b = 2,3 and [a,b] = [2,3]
> &
Eko palypse writes:
> Am Montag, 2. September 2019 00:49:05 UTC+2 schrieb Hongyi Zhao:
> > Hi,
> >
> > What's differences:
> >
> > a,b = 2,3 and [a,b] = [2,3]
> >
> > Regards
>
> In this example the result is the same but the second one