I will praise thee with uprightness of heart - With an upright and sincere heart.
When I shall have learned - Hebrew, “In my learning.” In the practice or act of learning them. His own experience of their nature, influence, and value would lead him to sincere praise. He had no doubt of finding that they were worthy of his praises, and of seeing in them more and more occasion to glorify and honor God. The more we know of God, the more shall we see in him to praise. The larger our acquaintance and experience, the more our hearts will be disposed to magnify his name. This remark must extend to all that there is in God to be learned; and as that is infinite, so there will be occasion for renewed and more elevated praise to all eternity.
Thy righteous judgments - Margin, as in Hebrew, “Judgments of thy righteousness.” The laws or statutes which God, as a righteous or just God, appoints to be the rule of conduct to his creatures.