That argument would work fine to *suggest* that there is a discontinuity. However, it would not *prove* that there is a discontinuity. There are many continuous functions such that f(1.41)=1.41, f(1.414...)=0 and f(1.42)=1.42.
The standard argument uses the observation that for any , there are only finitely many points such that .
It's straightforward to show is discontinuous at any rational point just using the fact that any interval contains an irrational number.