Skip to content

Commit

Permalink
Still fixing minor things
Browse files Browse the repository at this point in the history
  • Loading branch information
nbro committed Feb 2, 2017
1 parent b91d952 commit 61061ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ands/ds/TST.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __init__(self):
def __invariants__(self):
"""These propositions should always be true in every PUBLIC method of this TST.
Call this method in order you want to ensure the invariants are holding."""
Call this method if you want to ensure the invariants are holding."""
assert self._n >= 0
if self._n == 0:
assert self._root is None
Expand All @@ -166,9 +166,11 @@ def size(self):

def count(self):
"""Counts the number of strings in self.
This method recursively passes through all the nodes
and counts the ones which have a non None value.
You should clearly use size instead:
You should clearly use size instead:
this method is here only for the fun of writing code!"""
c = self._count(self._root, 0)
assert c == self.size()
Expand Down

0 comments on commit 61061ce

Please sign in to comment.