Update bst string representation method (#92)

__repr__ is also used by __str__, but not vice versa.
This commit is contained in:
Donne Martin 2016-07-20 07:24:04 -04:00 committed by GitHub
parent a868f1e597
commit 0e866dc7c0
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ class Node(object):
self.right = None
self.parent = None
def __str__(self):
def __repr__(self):
return str(self.data)

View File

@ -123,7 +123,7 @@
" self.right = None\n",
" self.parent = None\n",
"\n",
" def __str__(self):\n",
" def __repr__(self):\n",
" return str(self.data)\n",
"\n",
"\n",