Skip to content

Commit

Permalink
updated code that sliced dictionary keys, for Python 3 compatibility, c…
Browse files Browse the repository at this point in the history
…loses #69
  • Loading branch information
stevenbird committed Aug 6, 2014
1 parent f8f5f98 commit 1eda444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/ch04.rst
Expand Up @@ -1518,7 +1518,7 @@ progress if a ``verbose`` flag is set:
... freqdist[word] += 1
... if verbose and freqdist.N() % 100 == 0: print(".")
... if verbose: print
... return freqdist.keys()[:num]
... return freqdist.most_common(num)

.. caution::
Take care not to use a mutable object as the default value of
Expand Down

0 comments on commit 1eda444

Please sign in to comment.