On 2013-03-18, at 15:23 , Chris Angelico wrote:
> On Tue, Mar 19, 2013 at 12:50 AM, Neal Becker <[email protected]> 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.
>
> The languages that permit you to assign to a function call all have
> some notion of a reference type.
Alternatively they're functional language defining "match cases" e.g. in
Haskell a function is defined as
foo a b c = someOperation a b c
which is functionally equivalent to Python's
def foo(a, b, c):
return someOperation(a, b, c)
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com