Argument-Clinic / cpython

The Python programming language
https://www.python.org/
Other
1 stars 0 forks source link

Draft: clean up text accumulator helpers #31

Closed erlend-aasland closed 9 months ago

erlend-aasland commented 9 months ago

Something like this could improve things. I got rid of the named tuples and made TextAccumulator a class with similar members: a pair of add() and out() members, and a pair of append() and output() aliases, in order to easily convert the existing code (and more importantly, to keep the diff friendly). I kept the API of text_accumulator().

erlend-aasland commented 9 months ago

I think BufferSeries would be easier to comprehend if we just used a list and join.

erlend-aasland commented 9 months ago

Superseded by #33 (upstream: python/cpython#113402)