If I write this below two statements in a file sample.py
radius = 10
2*radius
and interpret(>>>python -i sample.py),
Why doesn't python stop with error at second statement (2*radius
) which looks syntactically/semantically wrong and probably requires LHS(name) to bind the RHS value?
I see that neither Java nor C allowed such statements which are of no use and this has nothing to do with compiled/interpreted version.