def new(self, name, data=None, type=None):
    '\n        Create a new Attr in this AttrList\n\n        Parameters\n        ==========\n        name : str\n            name of the new Attribute\n\n        Other Parameters\n        ================\n        data\n            data to put into the first entry in the new Attribute\n        type\n            CDF type of the first entry from :mod:`~pycdf.const`.\n            Only used if data are specified.\n\n        Raises\n        ======\n        KeyError : if the name already exists in this list\n        '
    if (name in self):
        raise KeyError((name + ' already exists.'))
    attr = self._get_or_create(name)
    if (data is not None):
        if (self.special_entry is None):
            attr.new(data, type)
        else:
            attr.new(data, type, self.special_entry())
Create a new Attr in this AttrList

Parameters
==========
name : str
    name of the new Attribute

Other Parameters
================
data
    data to put into the first entry in the new Attribute
type
    CDF type of the first entry from :mod:`~pycdf.const`.
    Only used if data are specified.

Raises
======
KeyError : if the name already exists in this list
def new(self, name, data=None, type=None):
    '\n        Create a new Attr in this AttrList\n\n        Parameters\n        ==========\n        name : str\n            name of the new Attribute\n\n        Other Parameters\n        ================\n        data\n            data to put into the first entry in the new Attribute\n        type\n            CDF type of the first entry from :mod:`~pycdf.const`.\n            Only used if data are specified.\n\n        Raises\n        ======\n        KeyError : if the name already exists in this list\n        '
    if (name in self):
        raise KeyError((name + ' already exists.'))
    attr = self._get_or_create(name)
    if (data is not None):
        if (self.special_entry is None):
            attr.new(data, type)
        else:
            attr.new(data, type, self.special_entry())