[Python-Dev] can't assign to function call (original) (raw)

Joao S. O. Bueno jsbueno at python.org.br
Mon Mar 18 15:04:51 CET 2013


On 18 March 2013 10:50, Neal Becker <ndbecker2 at gmail.com> wrote:

def F(x): return x

x = 2 F(x) = 3 F(x) = 3 SyntaxError: can't assign to function call Do we really need this restriction? There do exist other languages without it.

What? I mean...what are you even talking about? Assignments are to "names" - names are not Python objects and it is not something that can be returned from a function call.

If you are meaning mathematical equation like functionality, I recommend you to try "SymPy" - the Library for symbolic mathematics.

I can't make sense of what you want to perform by "assigning to a function call", and given the time without a reply to this e-mail, I think I am not the only one there.

js -><-


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/jsbueno%40python.org.br



More information about the Python-Dev mailing list