def save(self, stream, indent=0):
        """
        Save this configuration to the specified stream.
        @param stream: A stream to which the configuration is written.
        @type stream: A write-only stream (file-like object).
        @param indent: The indentation level for the output.
        @type indent: int
        """
        indstr = indent * '  '
        order = object.__getattribute__(self, 'order')
        data = object.__getattribute__(self, 'data')
        maxlen = 0 # max(map(lambda x: len(x), order))
        for key in order:
            comment = self.comments[key]
            if isWord(key):
                skey = key
            else:
                skey = repr(key)
            if comment:
                stream.write('%s#%s' % (indstr, comment))
            stream.write('%s%-*s :' % (indstr, maxlen, skey))
            value = data[key]
            if isinstance(value, Container):
                value.writeToStream(stream, indent, self)
            else:
                self.writeValue(value, stream, indent)
dataset/ETHPy150Open twitterdev/twitter-for-bigquery/libs/config.py/Mapping.save/original