President Obama’s recent trip to Africa is a marker of the continent’s progress on freedom, democracy and the market economy.

South Africa and Senegal, two of the three countries Obama visited, are two of the continent’s freest, and the third country, Tanzania, is freer than it once was. Most of Africa is at peace, though a problem with terrorism remains.

The economy of sub-Saharan Africa has been growing at a rate of more than 5 percent. The amount of foreign investment Africa attracts is now almost as large as the amount of aid. Said the president to a business group there: “Everywhere I go in Africa, what’s very clear is people want to break out of a dependency trap.”

Some aid can help. Obama offered a public-private effort on electricity generation. He offered to expand on the successful anti-AIDS effort begun under President George W. Bush. Obama also announced a program to pay for several thousand young African leaders each year to pursue studies at U.S. universities in public administration, business and entrepreneurship.

This sort of program will help Africa and America both. International students return home with personal ties that are a large asset to the U.S.

Obama said he’d support the extension of a U.S. law that offers trade preferences for manufactured imports from Africa.”This is not charity,” the president said. “This is self-interest.”

Charity is admirable and sometimes necessary, but a relationship of charity is not equal. Again and again, Obama talked of a relationship of equals, based on “trade and partnership.” His African audiences knew what he meant and they were ready to hear it.