I can assign some functions to a function call like this:
sage: f(x) = cos(x)
But I can't assign other functions like this:
sage: f(x) = lambda x: 1
...
TypeError
which happens to raise a different exception in Python:
>>> f(x) = lambda x: 1
...
SyntaxError: can't assign to function call
So, how does the SageMath interpreter change the behavior of Python?