def __call__(self, l):
        """Validate whether `l` is a list with contents of :attr:`dtype`

        Parameters
        ----------
        l: list-like

        Returns
        -------
        list
            list with values of dtype :attr:`dtype`

        Raises
        ------
        ValueError"""
        try:
            if self.dtype is None:
                l = self.listtype(l)
            else:
                l = self.listtype(map(self.dtype, l))
        except TypeError:
            if self.dtype is None:
                raise ValueError(
                    "Could not convert to list!")
            else:
                raise ValueError(
                    "Could not convert to list of type %s!" % str(self.dtype))
        if self.length is not None and len(l) != self.length:
            raise ValueError('List with length %i is required! Not %i!' % (
                self.length, len(l)))
        return l
def __call__ ( self , l ) : try : if self . dtype is None : l = self . listtype ( l ) else : l = self . listtype ( map ( self . dtype , l ) ) except TypeError : if self . dtype is None : raise ValueError ( "Could not convert to list!" ) else : raise ValueError ( "Could not convert to list of type %s!" % str ( self . dtype ) ) if self . length is not None and len ( l ) != self . length : raise ValueError ( 'List with length %i is required! Not %i!' % ( self . length , len ( l ) ) ) return l
Validate whether `l` is a list with contents of :attr:`dtype`

        Parameters
        ----------
        l: list-like

        Returns
        -------
        list
            list with values of dtype :attr:`dtype`

        Raises
        ------
        ValueError