What is the difference between tact and politeness?

Francois Truffaut lets Delphine Seyrig tell Jean-Pierre Leaud in a letter in the film Baisers Voles (Stolen Kisses).  Baisers Voles, the original French title of the film comes from a line in Charles Trenet‘s song “Que reste-t-il de nos amours?“, known in English as “I Wish You Love.”

“One of my teachers once explained the difference between tact and politeness.  A man opens a bathroom door by mistake and sees a naked lady.  He steps back and says “Excuse me madam.”  That’s politeness.  The same man finds the same naked lady and says “Excuse me sir.”  That’s tact.

Amazon carries Stolen Kisses.