A call is an expression; it is listed in the Expressions reference documentation.
If it was a statement, you could not use it as part of an expression; statements can contain expressions, but not the other way around.
As an example, return expression
is a statement; it uses expressions to determine it's behaviour; the result of the expression is what the current function returns. You can use a call as part of that expression:
return some_function()
You cannot, however, use return
as part of a call:
some_function(return)
That would be a syntax error.
It is the return
that 'does something'; it ends the function and returns the result of the expression. It's not the expression itself that makes the function return.
If a python call was not an expression, you'd never be able to mix calls and other expression atoms into more complex expressions.