( )⚙ D4397 stringutil: refactor core of pprint so it emits chunks

This is an archive of the discontinued Mercurial Phabricator instance.

stringutil: refactor core of pprint so it emits chunks
ClosedPublic

Authored by indygreg on Aug 27 2018, 12:15 PM.

Details

Summary

This commit splits the core of pprint() to a new function that is
a generator of chunks instead of a function returning a single
value. This will make it possible to stream output without waiting for
all data to be formatted first. And it will make it easier to
implement support for indenting.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Aug 27 2018, 12:15 PM
pulkit accepted this revision.Aug 29 2018, 4:04 PM
This revision was automatically updated to reflect the committed changes.