def __str__(self):
    "Returns a string representation of the variable\n\n        This is an 'informal' representation in that it cannot be evaluated\n        directly to create a :py:class:`pycdf.Var`.\n\n        @return: info on this zVar, CDFTYPE [dimensions] NRV\n                 (if not record-varying)\n        @rtype: str\n        "
    if self.cdf_file._opened:
        cdftype = self.type()
        chartypes = (const.CDF_CHAR.value, const.CDF_UCHAR.value)
        rv = self.rv()
        typestr = (lib.cdftypenames[cdftype] + (('*' + str(self._nelems())) if (cdftype in chartypes) else ''))
        if rv:
            sizestr = str(([len(self)] + self._dim_sizes()))
        else:
            sizestr = str(self._dim_sizes())
        return (((typestr + ' ') + sizestr) + ('' if rv else ' NRV'))
    elif isinstance(self._name, str):
        return 'zVar "{0}" in closed CDF {1}'.format(self._name, self.cdf_file.pathname)
    else:
        return 'zVar "{0}" in closed CDF {1}'.format(self._name.decode('ascii'), self.cdf_file.pathname.decode('ascii'))
Returns a string representation of the variable

This is an 'informal' representation in that it cannot be evaluated
directly to create a :py:class:`pycdf.Var`.

@return: info on this zVar, CDFTYPE [dimensions] NRV
         (if not record-varying)
@rtype: str
def __str__(self):
    "Returns a string representation of the variable\n\n        This is an 'informal' representation in that it cannot be evaluated\n        directly to create a :py:class:`pycdf.Var`.\n\n        @return: info on this zVar, CDFTYPE [dimensions] NRV\n                 (if not record-varying)\n        @rtype: str\n        "
    if self.cdf_file._opened:
        cdftype = self.type()
        chartypes = (const.CDF_CHAR.value, const.CDF_UCHAR.value)
        rv = self.rv()
        typestr = (lib.cdftypenames[cdftype] + (('*' + str(self._nelems())) if (cdftype in chartypes) else ))
        if rv:
            sizestr = str(([len(self)] + self._dim_sizes()))
        else:
            sizestr = str(self._dim_sizes())
        return (((typestr + ' ') + sizestr) + ( if rv else ' NRV'))
    elif isinstance(self._name, str):
        return 'zVar "{0}" in closed CDF {1}'.format(self._name, self.cdf_file.pathname)
    else:
        return 'zVar "{0}" in closed CDF {1}'.format(self._name.decode('ascii'), self.cdf_file.pathname.decode('ascii'))