It's well-known that if $A$ and $B$ are two sets, then the set of all functions from $A$ to $B$ can be denoted by $B^A$: explanations of this particular notation can be found in many places:
https://math.stackexchange.com/questions/901735/meaning-of-a-set-in-the-exponent https://math.stackexchange.com/questions/63960/what-does-it-mean-when-a-set-is-the-exponent https://math.stackexchange.com/questions/709184/why-is-the-exponential-of-sets-the-function-set
What I ask for is: when this notation was first introduced and in which context? (So this question is not about the meaning or the rationale behind it.)
The older occurrence I can find is in Bourbaki's Théorie des ensembles, of 1954, E.R.20, but is it the first?