Sorry if my English is bad, I speak Korean as mother tongue.
What I was trying is to pprint a large list, of which size is like len(repr(lst)) == 64xxx, to a text file.
but when I tried something like
from pprint import pprint as p
f = open(fname, mode='a+')
p(a_lst, f)
it only printed about 80% of list, and the rest 20% were cut. and I also tried halving list and call pprint twice, but that also didn't work.
so I had to do this instead
print(a_list, file=f)
which worked. but why pprint didn't print all the list? is there some size limitation? or maybe was my RAM or etc not enough?
edit: I tried with pprint once more, and it worked and couldn't reproduce the same result (the cut result). Maybe it was temporary bug I think, but I can't come up with the cause of the bug.
I just tried
and didn't get any errors.
The full array was in the output file even without doing
f.close()