3 ms·
But it's what ambiguous about Python's syntax. And I can make it a bit worse: if a: print("foo") if b: print("bar") This is not a huge
by darthrupert 3y ago
But it's what ambiguous about Python's syntax. And I can make it a bit worse:
if a:
print("foo")
if b:
print("bar")
This is not a huge problem, but problems with syntax never are (in non-joke relatively modern languages). But it's still something I prefer that languages fix in their syntax if I get to have a choice.
- xigoi 3y agoThe example you just posted is a syntax error, as it should be. And I still don’t get what is ambiguous about the syntax, the specification clearly states how indentation corresponds to a syntax tree.
- darthrupert 3y agoYour insistence on the technical definition of "ambiguous" aside, you see what I mean after thinking about it for a while, though, right?