King Solomon once wrote in Ecclesiastes, “One man out of a thousand I have found, but a woman among all those I have not found” (Ecclesiastes 7:28). It was a line his mother Bat-Sheba never forgave.

The tradition preserved in Codex Gaster tells that after Ashmedai, the king of the demons, hurled Solomon’s signet ring into the sea and usurped his throne, Solomon himself was cast out, wandering as a beggar from country to country. Eventually he regained his ring and his crown, but he was a changed man.

To test his own maxim, Solomon traveled in disguise with a pouch of jewelry and gold. He had a thousand male servants and a thousand maidservants. He tested each one. Every servant except a single faithful one failed. The men failed in exactly the ways the women failed. His saying was unfair.

He came at last to the house of the scholar Bar Kappara and asked for three days’ lodging. Bar Kappara’s wife was having an affair with a local priest of her former faith. Solomon, as a test, offered her his jewels if she would betray her husband. She refused. He was surprised and pleased. Later he asked her only for a flask of wine, which she brought. He drank a little, sealed the flask with the Ineffable Name, and left a gift.

That evening, the priest came. She told him what had happened. He scolded her — she should have taken the jewels. She went to open the flask to drink with him. Her hand stuck to it. The priest tried; his hand stuck too. They could not separate.

For three months Bar Kappara’s household was paralyzed, until at last they were brought to Jerusalem, where Solomon sat again on his throne. He assembled the people and his mother Bat-Sheba among them. “Whichever woman has never sinned, place her hand on the flask, and the hands will loose.” Not one woman came forward. He turned to the men. Only the faithful servant stepped forward, placed his hand on the flask, and the two were freed.

Solomon looked at his mother. He had proven his line. But Bat-Sheba looked back at him and reminded him, quietly, of her own past with King David — and Solomon understood that his cold arithmetic had missed the one thing a man cannot measure in a woman, which is the mercy he himself was born from.