Leo Tolstoy said this quote

These prin­ciples laid down as in variable rules: that one must pay a card sharper, but need not pay a tailor; that one must never tell a lie to a man, but one may to a woman; that one must never cheat any one, but one may a husband; that one must never pardon an insult, but one may give one and so on. These principles were possibly not reasonable and not good, but they were of unfailing certainty, and so long as he adhered to them, Vronsky felt that his heart was at peace and he could hold his head up.