K
Karthik Gurusamy
I see python doesn't have ++ or -- operators unlike say, C.
I read some reasonings talking about immutable scalars and using ++/--
doesn't make much sense in python (not sure if ++i is that far-fetched
compared to the allowed i += 1)
In any case, I accidentally wrote ++n in python and it silently
accepted the expression and it took me a while to debug the problem.
Why are the following accepted even without a warning about syntax
error?
(I would expect the python grammar should catch these kind of syntax
errors)
2
Karthik
I read some reasonings talking about immutable scalars and using ++/--
doesn't make much sense in python (not sure if ++i is that far-fetched
compared to the allowed i += 1)
In any case, I accidentally wrote ++n in python and it silently
accepted the expression and it took me a while to debug the problem.
Why are the following accepted even without a warning about syntax
error?
(I would expect the python grammar should catch these kind of syntax
errors)
2
Karthik