The obvious answer, of course, is 'yes'. It sets a bad example; do as you would be done by and all that sort of thing.
But in the light of a report out this week claiming that swearing provokes a physical stress response I'd like to explore the less obvious answer - not 'yes' but 'no'. Not 'no' in the sense that you want to teach your kids (by example) to be indiscriminately 'effing and blinding' at every opportunity, nor because you want your baby's first words to be a lot less cute than 'dada'. 'No' in the sense that they might learn some important lessons if they hear you swear; and 'no' in the sense that they might not then grow up with the absurdly puritanical belief that the mere utterance of an obscenity condemns the speaker and sends fearful shivers down the spine of the listener.
I suppose I'm a little defensive about swearing. I don't think any words should ever be totally off-limits; that way lies the slippery slope of censorship. And having taught in schools where swearing was treated as an offence the equivalent of regicide I suppose I've grown a little blasé about the whole thing. Don't get me wrong - the 'F' word especially when used as noun, adjective, adverb and the rest (a la Billy Connolly?) in a single sentence still makes me shudder. But only in the same way any crass use of language would and frequently does (viz. 'would of', 'bored of' and that political bête noir of mine, the 'keynote speech').
Ultimately, I believe it doesn't matter that much if the children hear you swear. But what does matter is your reaction to it. They need to learn that certain words in certain situations will be unacceptable. But not that certain words are harmful, like hocus pocus utterances, and get stressed out the moment that they hear them.
And how better to teach them that than by example?