Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103003 > unrolled thread
| Started by | "Sven R. Kunze" <srkunze@mail.de> |
|---|---|
| First post | 2016-02-16 14:10 +0100 |
| Last post | 2016-02-16 14:10 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Multiple Assignment a = b = c "Sven R. Kunze" <srkunze@mail.de> - 2016-02-16 14:10 +0100
| From | "Sven R. Kunze" <srkunze@mail.de> |
|---|---|
| Date | 2016-02-16 14:10 +0100 |
| Subject | Re: Multiple Assignment a = b = c |
| Message-ID | <mailman.164.1455628234.22075.python-list@python.org> |
On 16.02.2016 14:05, Sven R. Kunze wrote: > Hi Srinivas, > > I think the tuple assignment you showed basically nails it. > > First, the rhs is evaluated. > Second, the lhs is evaluated from left to right. > > Completely wrong? > > Best, > Sven As you mentioned swapping. The following two statements do the same (as you suggested at the beginning). a,b=b,a=4,5 (a,b),(b,a)=(4,5),(4,5) Best, Sven
Back to top | Article view | comp.lang.python
csiph-web