Here is Prob. 18, Chap. 4 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:
Every rational $x$ can be written in the form $x = m/n$, where $n > 0$, and $m$ and $n$ are integers without any common divisors. When $x=0$, we take $n=1$. Consider the function $f$ defined on $\mathbb{R}^1$ by $$ f(x) = \begin{cases} 0 &x\notin\mathbb Q, \\ \frac{1}{n} &x\in\mathbb Q. \end{cases}$$ Prove that $f$ is continuous at every irrational point, and that $f$ has a simple discontinuity at every rational point.
My effort:
Let $x$ be a rational number. Then $f(x) = \frac{1}{n} \neq 0$. But $f(t) \to 0$ as $t \to x$ through irrational numbers. What if $t \to x$ through rational numbers? [Is this way of reasoning rigorous enough for Rudin, I wonder?] How to show that $f(x-) < f(x+)$? Finally how to show that $$f(x) = \lim_{t\to x} f(t)$$ for every irrational $x$?