Let $X,Y,Z$ be Hausdorff spaces and suppose that $Z\subset X$. Endow $C(X,Y)$ and $C(Z,Y)$ with the compact-open topologies and define the map $\rho$ as \begin{align} \rho:&C(X,Y)\rightarrow C(Z,Y)\\ &f\mapsto f|_Z. \end{align} Is the map $\rho$ continuous? I see this "type of" operation used all the time in Sheaf theory but I never stopped to wonder if it was indeed continuous?