def info ( self ):
        """ Returns descriptive information about the trait.
        """
        dtype = shape = ''

        if self.shape is not None:
            shape = []
            for item in self.shape:
                if item is None:
                    item = '*'
                elif type( item ) is not int:
                    if item[1] is None:
                        item = '%d..' % item[0]
                    else:
                        item = '%d..%d' % item
                shape.append( item )
            shape = ' with shape %s' % ( tuple( shape ), )

        if self.dtype is not None:
            # FIXME: restore nicer descriptions of dtypes.
            dtype = ' of %s values' % self.dtype

        return 'an array%s%s' % ( dtype, shape )
dataset/ETHPy150Open enthought/traits/traits/trait_numeric.py/AbstractArray.info/original