'Use keyword arguments to overwrite
any of the class attributes for this instance.'

def __init__(self, **kwargs):

    assert all((hasattr(type(self), attr) for attr in kwargs.keys()))
    self.__dict__.update(**kwargs)
    if (self.stdin_encoding is None):
        self.stdin_encoding = (getattr(self.stdin, 'encoding', None) or 'utf8')
    if (self.stdout_encoding is None):
        actual_stdout = self.stdout
        if is_windows:
            from colorama import AnsiToWin32
            if isinstance(self.stdout, AnsiToWin32):
                actual_stdout = self.stdout.wrapped
        self.stdout_encoding = (getattr(actual_stdout, 'encoding', None) or 'utf8')
