construct icon indicating copy to clipboard operation
construct copied to clipboard

pretty printing long Collections

Open akvadrako opened this issue 13 years ago • 1 comments

It would be nice if collections included a way to print them that truncated long sequences. For now, I'm using this:

def trunc(text): ret = [] for l in str(text).splitlines(): if len(l) > 100: l = l[:40] + ' ... ' + l[-40:] ret.append(l)

return "\n".join(ret)

akvadrako avatar May 22 '11 12:05 akvadrako

Agreed. I'll see what can be done here.

MostAwesomeDude avatar May 23 '11 21:05 MostAwesomeDude