  It is known that if $f\colon {\mathbb R}^2 \to {\mathbb R}$ is a polynomial
in each variable, then $f$ is a polynomial. We present generalizations of this
fact, when ${\mathbb R}^2$ is replaced by $G\times H$, where $G$ and $H$ are
topological Abelian groups. We show, e.g., that the conclusion holds (with
generalized polynomials in place of polynomials) if $G$ is a connected Baire
space and $H$ has a dense subgroup of finite rank or, for continuous functions,
if $G$ and $H$ are connected Baire spaces. The condition of continuity can be
omitted if $G$ and $H$ are locally compact or complete metric spaces. We
present several examples showing that the results are not far from being
optimal.
