Module compat
source code
Backwards compatibility with previous versions of Python.
This module provides backwards compatibility by defining functions and
classes that were not available in earlier versions of Python. Intented
usage:
>>> from nltk.compat import *
Currently, NLTK requires Python 2.4 or later.
defaultdict
defaultdict(default_factory) --> dict with default factory
|
|
bool
|
all(iterable)
Return True if bool(x) is True for all values x in the iterable. |
|
|
|
bool
|
any(iterable)
Return True if bool(x) is True for any x in the iterable. |
|
|