New assignmens ...
Antoon Pardon
antoon.pardon at vub.be
Wed Oct 27 02:35:20 EDT 2021
Op 26/10/2021 om 19:46 schreef Schachner, Joseph:
> Why force unpacking? Why not assign a tuple? That would look like a simple assignment: x := (alpha, beta, gamma)
> And you could access x[0], x[1] and x[2].
>
> I think asking := to support x, y := alpha, beta is a request to address an unnecessary, easily worked around, issue. And as previously pointed out you can still just use = .
Because the names usually have meaning, while the tuple has not.
And you just confirmed my point that the walrus operator isn't very useful here
by suggesting that I should abandon it and use an assignment.
--
Antoon Pardon.
More information about the Python-list
mailing list