Re: var1 = var2 = var3
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 expression: c The rest is syntax for the assignment statement, where trailing = identifies each of the targets to which the value of c is to be assigned. An assignment statement begins with a series of one or more target specifiers and ends with a single expression. (Targets can be more complex, e.g.; x, y = p = 0, 0) On Wed, Feb 17, 2016 at 7:28 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > 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 expressions like: >> >> var1 = var2 = var3 >> >> called Python. Without a hint I cannot goolge this. >> >> Thanks >> >> Kai >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/8c0392e7-a040-4d53-8e40-96aed5a41176%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/8c0392e7-a040-4d53-8e40-96aed5a41176%40googlegroups.com?utm_medium=email_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0trrGXS3xoxWzqDy49BAaXkz0E7bm_5TCvyvw1-mAAe4Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: var1 = var2 = var3
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 expressions like: > > var1 = var2 = var3 > > called Python. Without a hint I cannot goolge this. > > Thanks > > Kai > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8c0392e7-a040-4d53-8e40-96aed5a41176%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: var1 = var2 = var3
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/703235.html On Wed, Feb 17, 2016 at 1:35 AM, anotherdjangonewby <anotherdjangone...@gmx.de> wrote: > Hi, > > this may be a bit off-topic, but: > > How are expressions like: > > var1 = var2 = var3 > > called Python. Without a hint I cannot goolge this. > > Thanks > > Kai > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/56C38119.5040807%40gmx.de. > For more options, visit https://groups.google.com/d/optout. -- Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACs7g%3DCoEX%3DPd%2BAdThzZ%2BcTHzMGVDksPo%2BKK-GRjWhq8knQpvA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: var1 = var2 = var3
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 Python. Without a hint I cannot goolge this. > > Thanks > > Kai > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/56C38119.5040807%40gmx.de. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Bv0ZYVcX1Lv5XD_fanPFXtaen%3D-mWnb7uMA5pO5iq7NrdeF6g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
var1 = var2 = var3
Hi, this may be a bit off-topic, but: How are expressions like: var1 = var2 = var3 called Python. Without a hint I cannot goolge this. Thanks Kai -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/56C38119.5040807%40gmx.de. For more options, visit https://groups.google.com/d/optout.