Hrvoje Niksic wrote:
I am not the best person to answer because I go on to argue that this
syntax is not needed in Python at all (anything it can do can be
implemented with __setitem__ at no loss of clarity).
I would even argue that the proxy solution is even *better*
for that particular use c
Move. This. Thread. Out. Of. Python-Dev. Now. (python-ideas is the right place.)
On Mon, Mar 18, 2013 at 10:25 AM, Serhiy Storchaka wrote:
> On 18.03.13 17:40, Steven D'Aprano wrote:
>>
>> On 19/03/13 02:01, Hrvoje Niksic wrote:
>>>
>>> Assigning to function calls is orthogonal to reference types
On 18.03.13 17:40, Steven D'Aprano wrote:
On 19/03/13 02:01, Hrvoje Niksic wrote:
Assigning to function calls is orthogonal to reference types. For
example, Python manages assignment to subscripts without having
references just fine:
val = obj[index] # val = obj.__getitem__(index)
obj[ind
On 03/18/2013 04:40 PM, Steven D'Aprano wrote:
In analogy with that, Python could implement what looks like assignment to
function call like this:
val = f(arg) # val = f.__call__(arg)
f(arg) = val # f.__setcall__(arg, val)
That's all very well, but what would it do? It's not
On Mon, Mar 18, 2013 at 8:50 AM, Neal Becker 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.
I think this belongs on python-ideas before laun
On 19/03/13 02:01, Hrvoje Niksic wrote:
On 03/18/2013 03:23 PM, Chris Angelico wrote:
The languages that permit you to assign to a function call all have
some notion of a reference type.
Assigning to function calls is orthogonal to reference types. For example,
Python manages assignment to s
On 03/18/2013 03:23 PM, Chris Angelico wrote:
The languages that permit you to assign to a function call all have
some notion of a reference type.
Assigning to function calls is orthogonal to reference types. For
example, Python manages assignment to subscripts without having
references just
On 2013-03-18, at 15:23 , Chris Angelico wrote:
> On Tue, Mar 19, 2013 at 12:50 AM, Neal Becker 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 w
On Tue, Mar 19, 2013 at 12:50 AM, Neal Becker 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 fu
On 19/03/13 00:50, Neal Becker 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 meaning would you give to "F(x) = 3", and why?
--
Steven
On 18 March 2013 10:50, Neal Becker 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?
Assignmen
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.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mail
12 matches
Mail list logo