data_utils.py 286 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
"""
    Contains data utilities.
"""


def reader_append_wrapper(reader, append_tuple):
    """
    Data reader wrapper for appending extra data to exisiting reader.
    """

    def new_reader():
        for ins in reader():
            yield ins + append_tuple

    return new_reader