The interesting thing is how chained assignment is implemented. In C, the
following is an expression, and has a value:
a = b
This leads to the compiler not being helpful for the famous =/== typo in
this like:
if (a = b) { ... }
In python the only expression in:
a = b = c
only has one
The term is "chained assignment" (applied to other languages as well).
https://en.wikipedia.org/wiki/Assignment_(computer_science)#Chained_assignment
_Nik
On Tuesday, February 16, 2016 at 12:06:10 PM UTC-8, anotherdjangonewby
wrote:
>
> Hi,
>
> this may be a bit off-topic, but:
>
> How are ex
what a coincidence, i just asked a similar question 7 hours before
you, at python-l...@python.org
here's the link, you can extend the discussion there to get more
answers, as it is more related to the language rather than django.
link: https://mail.python.org/pipermail/python-list/2016-February/7
That's an assignment statement. See
https://docs.python.org/2/reference/simple_stmts.html for more.
On Tue, Feb 16, 2016 at 2:05 PM, anotherdjangonewby <
anotherdjangone...@gmx.de> wrote:
> Hi,
>
> this may be a bit off-topic, but:
>
> How are expressions like:
>
> var1 = var2 = var3
>
> called P
4 matches
Mail list logo