Consider the following invalid Python code:
>>> def f(x):
...   a=1
...   f(a)=2
... 
  File "<stdin>", line 3
SyntaxError: can't assign to function call

but Sage  allows f to be defined:
sage: def f(x):
....:     a=1
....:     f(a)=2
....:     
sage: type(f)
<type 'function'>

It doesn't make sense to me to allow this to happen.

In this sense, #10747 is only a half-solution (it would catch things like 
f(1)=2 inside def f(..): body)

Dima

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to