2 hours ago, iljitsch said:
What kind of ambiguity do you have in mind?
Again: I'm not advocating for anything resembling the full Python that exists today. That is possibly even too much for an Amiga, and famously a non-goal of Python is to be fast. They handsomely non-reach that goal.
After programming in C, PHP and Javascript for a long time the lack of { } and ; in Python was a revelation. Creating structure through indentation is a bit weird, but probably the best/easiest way to do it.
Obviously "real" functions would be quite different from BASIC, and replacing GOSUB subroutines with functions is a bit annoying as the latter usually go at the end but Python functions need to go at the beginning. Other than that, the differences between BASIC and Python are actually relatively small. I could easily see Python be tokenized like Commodore BASIC, although of course there would have to be a system to create new tokens for new functions.
As an example of something that burns cycles in the lexer, and indeed strongly favors having a lexer pass first and then a parser second ... rather than a one pass line by line parser like Basic 2/7 or Forth ... we can go with creating structure through indentation.
White space where indentation level is significant is a PITA to parse, which is why it makes sense to clean up white space and convert whatever way the indentation is expressed into a common consistent parse-able format with the lexer. Then after its parsed, it must be executed ... with CPython that is by converting the parsed tree into bytecode and then executing the bytecode. That's why the library calls to functions in libraries that have a reputation for efficient data analysis in Python are often C-code or, indeed, sometimes Fortran code running with a little bit of Python function call glue on top.
IIRC, the "over three decades old" Basic alternative to those { } program blocks are simply keywords that end the blocks. In QBasic, that is "END ...", where "END" without anything following it ends the program.
FUNCTION odd%(N%)
odd=((N AND 1)=1)
END FUNCTION