-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LazyIteratorList in nltk.collections throws StopIteration exception w…
…hen getting list length (nltk#2617) * Remove unnecessary increment * Prevent looping until StopIteration When StopIteration is encountered, simply return. This prevents calling `len()` on a LazyIteratorList to throw a StopIteration exception. * Replace unused for loop variables with _ * Fixed typo in assertion * Added doctest for changes * Removed unnecessary exception variable
- Loading branch information
Showing
2 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters