When near the end of the movie Pamela wears Wendell's pyjama top and he wears the bottom, it can be read as a reminiscence of
Ernst Lubitsch's "
Bluebeard's Eighth Wife (1938)" (which
Billy Wilder wrote together with
Charles Brackett). There, the protagonist meets his love interest, when he tries to buy a pyjama, but only the top; whereas, she wants to buy just the bottom. Over this, they fall in love.