def _wrap_writer_for_text(fp, encoding):
    try:
        fp.write('')
    except __HOLE__:
        fp = io.TextIOWrapper(fp, encoding)
    return fp
dataset/ETHPy150Open pallets/flask/flask/json.py/_wrap_writer_for_text