best way to implement custom pretty-printers
问题 Customizing pprint.PrettyPrinter The documentation for the pprint module mentions that the method PrettyPrinter.format is intended to make it possible to customize formatting. I gather that it's possible to override this method in a subclass, but this doesn't seem to provide a way to have the base class methods apply line wrapping and indentation. Am I missing something here? Is there a better way to do this (e.g. another module)? Alternatives? I've checked out the pretty module, which looks