/prettyprinter

A proper prettyprinter for Python.

Primary LanguagePythonMIT LicenseMIT

This package provides a general-purpose pretty printer for Python.

Its design and interface were inspired by the XP pretty printing system for Common Lisp by Richard C. Waters (MIT AI Memo No. 1102a, August 1989), which became the ANSI Common Lisp pretty printer. The underlying algorithm is described in Derek C. Oppen's Prettyprinting (ACM Transactions on Programming Languages and Systems, Vol. 2, No. 4, October 1980, pp 465-483). It also contains an implementation of (most of) Common Lisp's FORMAT, including its interface to the pretty printer.