def type(self, new_type=None):
    '\n        Returns or sets the CDF type of this variable\n\n        Parameters\n        ==========\n        new_type : ctypes.c_long\n            the new type from :mod:`~pycdf.const`\n\n        Returns\n        =======\n        out : int\n            CDF type\n        '
    if (new_type != None):
        if (not hasattr(new_type, 'value')):
            new_type = ctypes.c_long(new_type)
        n_elements = ctypes.c_long(self._nelems())
        self._call(const.PUT_, const.zVAR_DATASPEC_, new_type, n_elements)
        self._type = None
    if (self._type is None):
        cdftype = ctypes.c_long(0)
        self._call(const.GET_, const.zVAR_DATATYPE_, ctypes.byref(cdftype))
        self._type = cdftype.value
    return self._type
Returns or sets the CDF type of this variable

Parameters
==========
new_type : ctypes.c_long
    the new type from :mod:`~pycdf.const`

Returns
=======
out : int
    CDF type
def type(self, new_type=None):
    '\n        Returns or sets the CDF type of this variable\n\n        Parameters\n        ==========\n        new_type : ctypes.c_long\n            the new type from :mod:`~pycdf.const`\n\n        Returns\n        =======\n        out : int\n            CDF type\n        '
    if (new_type != None):
        if (not hasattr(new_type, 'value')):
            new_type = ctypes.c_long(new_type)
        n_elements = ctypes.c_long(self._nelems())
        self._call(const.PUT_, const.zVAR_DATASPEC_, new_type, n_elements)
        self._type = None
    if (self._type is None):
        cdftype = ctypes.c_long(0)
        self._call(const.GET_, const.zVAR_DATATYPE_, ctypes.byref(cdftype))
        self._type = cdftype.value
    return self._type