A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-August/068183.html below:

[Python-Dev] SyntaxError: can't assign to function call

[Python-Dev] SyntaxError: can't assign to function call [Python-Dev] SyntaxError: can't assign to function call"Martin v. Löwis" martin at v.loewis.de
Fri Aug 11 22:10:20 CEST 2006
Phillip J. Eby schrieb:
> Actually, this isn't as hard as you're implying.  In at least the
> "compiler.ast" package, such an operation would be represented as a
> CallFunc node as the child of an Assign node.  Wrapping the call node's
> main child expression in a Getattr for __setcall__ would then effect the
> relatively simple AST transformation required.

Well, you are experienced with that stuff, and would be one of the
people who could rip apart a specification attempt. There are just many
details to it, for example, what is the evaluation order when I write

f(g()) = h()

Or what about chained assignments

a = b() = c()

Is the return value of __setcall__ used or not?

What about augmented assignments?

Any specific question that somebody asks gets an easy (although
perhaps arbitrary) answer. Still, I guess many people would be
surprised how large the specification of a seemingly simple feature
will be.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4