
From: Joao S. O. Bueno <jsbueno@python.org.br> Sent: Thursday, May 16, 2013 12:03 PM
And this means the parser has to figure out whether you mean dot for attribute access or dot for concatenation. That's not exactly a _hard_
On 16 May 2013 12:57, Andrew Barnert <abarnert@yahoo.com> wrote: problem, but it's not _trivial_.
If you say it mis not hard for the parser, ok - but it seems impossible for humans:
upper = " World" print ("Hello". upper)
Given a rule like "it's only concatenation if both arguments are string literals", a sufficiently complex parser, or a sufficiently knowledgeable human, can figure out that this is attribute access. So it's clearly not impossible. But it's also not trivial. And that's my point. It makes the code harder to read for both parsers and humans, which is a significant tradeoff. If the benefit is high enough, it might be worth it anyway, but I don't know that it is.