In python, assignment is a statement, not an expression (it has no
return value).

This is unlike many other programming languages, such as C:
if ( (r = result()) == 3) {
  // do something with r
}

In python:
>>> (a = 10) + 2
  File "<stdin>", line 1
    (a = 10) + 2
       ^
SyntaxError: invalid syntax


 - Alex

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to