On Tue, Oct 26, 2021 at 7:18 AM Antoon Pardon <antoon.par...@vub.be> wrote: > > Op 25/10/2021 om 20:39 schreef Chris Angelico: > > On Tue, Oct 26, 2021 at 5:35 AM Antoon Pardon <antoon.par...@vub.be> wrote: > >> By putting limits on the walrus code, you are not reducing complexity, you > >> are increasing it. > >> You are increasing complexity because you can't just reuse the code that > >> handles an ordinary > >> assignment. You now need specific code to limit it's use. > >> > > What does this code do? > > > > while x, y := foo(): > > ... > > > > Is it more complicated or less complicated when arbitrary assignment > > targets are permitted? > > Well I would guess it would do something similar to > > while [x, y := foo()]: > ... >
And does it unpack what foo returns? Should it? ChrisA -- https://mail.python.org/mailman/listinfo/python-list