def rename(self, new_name):
    'Rename this attribute\n\n        Renaming a zAttribute renames it for *all* zVariables in this CDF!\n\n        Parameters\n        ==========\n        new_name : str\n             the new name of the attribute\n        '
    try:
        enc_name = new_name.encode('ascii')
    except AttributeError:
        enc_name = new_name
    if (len(enc_name) > const.CDF_ATTR_NAME_LEN256):
        raise CDFError(const.BAD_ATTR_NAME)
    self._call(const.PUT_, const.ATTR_NAME_, enc_name)
    self._cdf_file.add_attr_to_cache(enc_name, *self._cdf_file.attr_num(self._name))
    del self._cdf_file._attr_info[self._name]
    self._name = enc_name
Rename this attribute

Renaming a zAttribute renames it for *all* zVariables in this CDF!

Parameters
==========
new_name : str
     the new name of the attribute
def rename(self, new_name):
    'Rename this attribute\n\n        Renaming a zAttribute renames it for *all* zVariables in this CDF!\n\n        Parameters\n        ==========\n        new_name : str\n             the new name of the attribute\n        '
    try:
        enc_name = new_name.encode('ascii')
    except AttributeError:
        enc_name = new_name
    if (len(enc_name) > const.CDF_ATTR_NAME_LEN256):
        raise CDFError(const.BAD_ATTR_NAME)
    self._call(const.PUT_, const.ATTR_NAME_, enc_name)
    self._cdf_file.add_attr_to_cache(enc_name, *self._cdf_file.attr_num(self._name))
    del self._cdf_file._attr_info[self._name]
    self._name = enc_name