caesar0301 / treelib

An efficient implementation of tree data structure in python 2/3.
http://treelib.readthedocs.io/en/latest/
Other
801 stars 185 forks source link

Fix #139: replace `stdout` with `end` in `show`. #140

Open ben-e-whitney opened 4 years ago

ben-e-whitney commented 4 years ago

See #139. This commit reverts the changes made to Treelib.show in 4dde1fd833bb69a5e8375072575c4c091308ad60 and makes the changes proposed in this comment.

ben-e-whitney commented 4 years ago

Would it be better for me to provide an implementation of contextlib.redirect_stdout or to avoid its use altogether? I don't know the policy on Python 2 compatibility.

leonardbinet commented 4 years ago

@ben-e-whitney thanks for your contribution 👍, I approve converting the reader from string to list, but I still disagree with the use of print, @caesar0301 WDYT?