Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8423 > unrolled thread

Re: Interpreting Left to right?

Started byChris Angelico <rosuav@gmail.com>
First post2011-06-25 10:32 +1000
Last post2011-06-25 10:32 +1000
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.


Contents

  Re: Interpreting Left to right? Chris Angelico <rosuav@gmail.com> - 2011-06-25 10:32 +1000

#8423 — Re: Interpreting Left to right?

FromChris Angelico <rosuav@gmail.com>
Date2011-06-25 10:32 +1000
SubjectRe: Interpreting Left to right?
Message-ID<mailman.397.1308961982.1164.python-list@python.org>
On Sat, Jun 25, 2011 at 7:02 AM, Terry Reedy <tjreedy@udel.edu> wrote:
> If I have ever used this sort of multiple assignment, it has been for simple
> unambiguous things like "a = b = 0".

For which it's extremely useful. Initialize a whole bunch of variables
to zero... or to a couple of values:

minfoo=minbar=minquux=1000
maxfoo=maxbar=maxquux=0


There are times when I miss the "assignment is an expression" concept,
but I'd say this syntax covers 90% or more of use cases for assignment
expressions.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web