mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
StringTree: Re-implement __str__()
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
020bb970bd
commit
160667b6a9
1 changed files with 3 additions and 0 deletions
|
|
@ -83,6 +83,9 @@ class StringTree: # export
|
|||
self.children[nibble].children[content] = StringTree('', content=content)
|
||||
return self.children[nibble]
|
||||
|
||||
def __str__(self):
|
||||
return 'st:"{}"'.format(self.content)
|
||||
|
||||
def __getitem__(self, path):
|
||||
r = self.get(path)
|
||||
if r is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue