def __new__(cls, file):
        unicodeFile = False
        if PY3:
            try:
                file.write(b"")
            except __HOLE__:
                unicodeFile = True

        if unicodeFile:
            # On Python 3 native json module outputs unicode:
            _dumps = pyjson.dumps
            _linebreak = u"\n"
        else:
            _dumps = fast_json.dumps
            _linebreak = b"\n"
        return PClass.__new__(
            cls, file=file, _dumps=_dumps, _linebreak=_linebreak)
dataset/ETHPy150Open ClusterHQ/eliot/eliot/_output.py/FileDestination.__new__