I go to Lima once or twice a year.
I find it relatively safe, of course if you use common sense.
It seems to me that petty theft is much more of a threat than being held up or kidnapped as in Mexico City.
For instance having a baby carriage snatched off of the top of your car at a stop light (actually happened to my wife). Chain snatchings are seemingly popular as well, and of course pickpockets in Miraflores.
I take the taxis alone all of the time and even drive around the city.
Something I would never, ever do in Mexcio City.