def __init__(self, *args, allow_all=None):
self.attributes = {}<EOL>self.allow_all = allow_all if allow_all is not None else not bool(args)<EOL>for arg in args:<EOL><INDENT>if not isinstance(arg, Attribute):<EOL><INDENT>if isinstance(arg, str):<EOL><INDENT>arg = self.Attribute(arg)<EOL><DEDENT>else:<EOL><INDENT>arg = self.Attribute(*arg)<EOL><DEDENT><DEDENT>self.attributes[arg.name] = arg<EOL><DEDENT>
Save attributes, creating ``Attribute`` instances if needed..

        Arguments
        ---------
        args : iterable
            A list (or other iterable) containing attributes to be in the set.

        allow_all : boolean
            If ``args`` is empty, will be ``True`` by default.
            If ``args`` is not empty, will be ``False`` by default.
            If ``True``, all attributes not in ``args`` will still be valid attributes.
            In this case, using ``args`` is only useful to add non-class attributes (like
            standalone functions).