scsoce wrote:

I have a function return a reference, and want to assign to the reference, simply like this:
 >>def f(a)
         return a
    b = 0
   * f( b ) = 1*
but the last line will be refused as "can't assign to function call".
In my thought , the assignment is very nature, but why the interpreter refused to do that ?

Because, as in most languages, it's not even clear what you might mean by this syntax. It doesn't have any meaning; assignments are made to variables, not the results of function calls.

--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
 San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
  Only love is worth the risk
   -- Oleta Adams
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to