Theres an example following a proof on the limit of a composite function in my book where the author tries to justify their use of $|x-x_0|<\delta$ rather than $0<|x-x_0|<\delta$ in the standard epsilon-delta definition;
Consider the functions $f,g:\mathbb{R}\to\mathbb{R}$ $$f(x)=\begin{cases} x\sin(\frac{1}{x}) &\text{if}\;x\neq0 \\0 &\text{if}\;x=0 \end{cases} \\ g(y)=\begin{cases}1 &\text{if}\;y\neq0 \\0 &\text{if}\;y=0 \end{cases}$$
Then with $|x-x_0|<\delta$ definition, $\lim_{y\to0}g(y)$ does not exist and the theorem of limit of composite function is vacuously true since the hypotheses (which includes that the above limit needs to exist) are not fulfilled. This part I understood.
But when we have $0<|x-x_0|<\delta$, the above limit (=1) and $\lim_{x\to0}f(x)=0$ exists but the author states that $\lim_{x\to0}(g\circ f)(x)$ does not exist. How? Informally, if $x$ gets close to $0$, then $f(x)$ gets close to zero, so this "close to zero" value gets fed into $g$ which will hover around the value 1. So where do things go wrong?