def open(mode='r'):
    """Return an object providing access to the file data.

        Allowed values for `mode` are 'r' (read); 'w' (write); 'a' (append) and
        'r+' (read/write).  Other values cause `ValueError` to be raised.

        If the file is opened in read mode, an object with an API (but
        not necessarily interface) of `IFileReader` is returned; if
        opened in write mode, an object with an API of `IFileWriter` is
        returned; if in read/write, an object that implements both is
        returned.

        All readers and writers operate in 'binary' mode.

        """
