def _reduce_datetimes(row):
    """Receives a row, converts datetimes to strings."""

    row = list(row)

    for i in range(len(row)):
        if hasattr(row[i], 'isoformat'):
            row[i] = row[i].isoformat()
    return tuple(row)
def _reduce_datetimes ( row ) : row = list ( row ) for i in range ( len ( row ) ) : if hasattr ( row [ i ] , 'isoformat' ) : row [ i ] = row [ i ] . isoformat ( ) return tuple ( row )
Receives a row, converts datetimes to strings.