kvh/Python-Suffix-Tree — pull request #2 by erikrose (2012-10-24 18:47:05+00:00)
Title: Fix errant newlines in repr output of SuffixTree.

Thanks for the suffix tree! This fixes a little bug in SuffixTree.__repr__. It turns this…

>>> t = SuffixTree('outlined')
>>> t
Start	End	Suf	First	Last	String
0	3	-1	2	7
tlined
0	6	-1	5	7
ned
0	2	-1	1	7
utlined
0	1	-1	0	7
outlined
0	4	-1	3	7
lined
0	8	-1	7	7
d
0	7	-1	6	7
ed
0	5	-1	4	7
ined

…into this:

>>> t = SuffixTree('outlined')
>>> t
Start	End	Suf	First	Last	String
0	3	-1	2	7	tlined
0	6	-1	5	7	ned
0	2	-1	1	7	utlined
0	1	-1	0	7	outlined
0	4	-1	3	7	lined
0	8	-1	7	7	d
0	7	-1	6	7	ed
0	5	-1	4	7	ined