"Fuzzyman" <[EMAIL PROTECTED]> writes: >>>> f() += [4] > SyntaxError: can't assign to function call >>>>
It's obvious that that line gives you a syntax error. += is the increment operator overloaded for strings and lists and so on. It changes the lhs in place appending the rhs. In this case the rhs is a function call so... how the compiler knows how to assign to a function call? Do the things easily: - x = f() - x += [4] :) -- Lawrence - http://www.oluyede.org/blog "Anyone can freely use whatever he wants but the light at the end of the tunnel for most of his problems is Python" -- http://mail.python.org/mailman/listinfo/python-list