Assume $X$ is a discrete-valued random variable. Often in literature the same notation is used for the probability $Pr(X = x)$ as for the probability mass function $P(X)$. Clearly, this is because both entities represent probabilities: $Pr(X = x)$ represents probability directly, whereas $P(X)$ is a probability-valued function.
Under what circumstances does the distinction between the two objects $Pr(X = x)$ and $P(X)$ become important, or even crucial? Or, alternatively, are there theoretical reasons why it is always ok to use the same notation to refer to both?