def compat_open(filename, mode='r', encoding=None):
        # See docstring for compat_open in the PY3 section above.
        if mode not in 'b':
            encoding = locale.getpreferredencoding()
        return io.open(filename, mode, encoding=encoding)
dataset/ETHPy150Open aws/aws-cli/awscli/compat.py/compat_open/swapped operands of `not in`