a = b = 1 just syntactic sugar?

Terry Reedy tjreedy at udel.edu
Fri Jun 6 23:07:21 EDT 2003


"Ed Avis" <ed at membled.com> wrote in message
news:l1isrikctv.fsf at budvar.future-i.net...
> I don't have my copy of 'Learning Python' to hand, but I don't
recall
> any strong emphasis on statements versus expressions in that or
other
> learner-oriented texts.  The distinction between the two is
something
> that you don't need to worry about, to Python's credit.

Assignment statement: target = expression.  If one does not know what
expressions are (and are not), then one cannot reliably write correct
assignments.

TJR






More information about the Python-list mailing list