added documentation to load ranges

Former-commit-id: af362480d5
This commit is contained in:
Joshua Chin 2015-07-07 16:00:37 -04:00
parent 7e9338f87e
commit a7c380153f

View File

@ -15,6 +15,9 @@ DATA_PATH = pathlib.Path(resource_filename('wordfreq', 'data'))
CACHE_SIZE = 100000
def load_range(filename):
"""
Loads a file from the data path
"""
with (DATA_PATH / filename).open() as file:
return file.read()