Skip to content

Commit

Permalink
decrement N in FreqDist.pop and FreqDist.popitem, remove arg from Fre…
Browse files Browse the repository at this point in the history
…qDist.popitem; resolves issue 726
  • Loading branch information
stevenbird committed Dec 1, 2011
1 parent 5edf189 commit 55c4143
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nltk/probability.py
Expand Up @@ -467,12 +467,14 @@ def update(self, samples):
self.inc(sample, count=count)

def pop(self, other):
self._N -= 1
self._reset_caches()
return dict.pop(self, other)

def popitem(self, other):
def popitem(self):
self._N -= 1
self._reset_caches()
return dict.popitem(self, other)
return dict.popitem(self)

def clear(self):
self._N = 0
Expand Down

0 comments on commit 55c4143

Please sign in to comment.