Where does France’s particular brand of humour come from?

France is known around the world for its food, culture and quality of life but not so much for its sense of humour, which can often leave foreigners nonplussed. Where does this special brand of humour come from?