make _enumerate a method on PrettyPrinter

even less duplicate code