[Python-Dev] can't assign to function call (original) (raw)
Steven D'Aprano steve at pearwood.info
Mon Mar 18 15:03:47 CET 2013
- Previous message: [Python-Dev] can't assign to function call
- Next message: [Python-Dev] can't assign to function call
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] can't assign to function call
- Next message: [Python-Dev] can't assign to function call
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]