Heh, so in Python it’s possible to overload operators in the context of objects.
I bet it would be possible to overload tabs to do the same thing as colons inside a context manager, but that’s pure speculation.
IIRC, Python handles whitespace indentation by having the tokenizer convert them to INDENT/DEDENT tokens. The grammar can then handle them equivalently to a curly brace language.
Doesn’t python need colons after if/else/for/etc. statements?
Heh, so in Python it’s possible to overload operators in the context of objects. I bet it would be possible to overload tabs to do the same thing as colons inside a context manager, but that’s pure speculation.
IIRC, Python handles whitespace indentation by having the tokenizer convert them to INDENT/DEDENT tokens. The grammar can then handle them equivalently to a curly brace language.