alternative to limit of a mapping between topological spaces.

Let $f$ be a mapping between two topological spaces $X$ and $Y$. $\lim_{x \to x_0} f(x) = y$ is defined as for any open set $U_y$ containing $y$, there exists an open set $V_x$ containing $x$, so that $f(V_x) \subseteq U_y$.

Can it be formulated as for any open set $V_x$ containing $x$, ...?

For sequences in $\mathbb R$, it seems that it can.
I wonder if something similar holds for a mapping between topological spaces.

if not, what is a more general space than $\mathbb R$ that something similar holds? What property makes something similar hold?

Thanks.