3 ms·
The lexer could disambiguate but that would require lookahead. I believe Python have a deliberate policy of keeping the parser simple. But I just noticed C# su
by goto11 6y ago
The lexer could disambiguate but that would require lookahead. I believe Python have a deliberate policy of keeping the parser simple.
But I just noticed C# support this, so it is not the same for all languages. Java doesn't, but then again you cant call methods on numbers in Java anyway.