TITLE: Colimits, limits, and mapping spaces
QUESTION [11 upvotes]: It is true that in the category of topological spaces 
$ \mathrm{Map}(\underset{i\in I}{\mathrm{colim}}\, X_i, Y)\cong
\underset{i\in I}{\mathrm{lim}}\,\mathrm{Map}(X_i,Y)$ ? Here mapping spaces are endowed with the compact-open topology. One has a bijective map from the left-hand side to the right-hand side, but is this map a homeomorphism? For example, if $X_1\subset X_2$, is the inclusion $\mathrm{Map}(X_2/X_1,Y)\subset \mathrm{Map}(X_2,Y)$ a homeomorphism on its image? If not, what if this inclusion is a cofibration? 
(Compare with my previous question Mapping space from a quotient space.)

REPLY [11 votes]: This is true if, instead of topological spaces, you work in a convenient category of topological spaces, in the sense of Steenrod. These are the place you want to do homotopy theory in (assuming you want to do it using topological spaces and not, for example, Kan complexes). In this case, the functor:
$$\mathrm{Map}(-,Y):C^{op}\to C$$
is right adjoint to the functor
$$\mathrm{Map}(-Y):C\to C^{op}$$
(careful: adjunctions with the opposite category are confusing :)).
Indeed, if we denote by $C(X,Y)$ the set of continuous maps from $X$ to $Y$
$$C(Z, \mathrm{Map}(X,Y))=C(Z\times X,Y)=C(X,\mathrm{Map}(Z,Y))$$
(in this case $\mathrm{Map}(X,Y)$ will in general be different from the compact open topology, for example if we work in compactly generated spaces it will have the Kelleyfication of the compact open topology).