first of all sorry for this easy question. I have a classclass Grid(object):    __slots__= (xMin,yMax,nx,ny,xDist,yDist,ncell,IDtiles)    def __init__(self,xMin,yMax,nx,ny,xDist,yDist):        self.xMin = xMin        self.yMax = yMax        self.nx = nx        self.ny = ny        self.xDist = xDist        self.yDist= yDist        self.ncell = nx*ny        self.IDtiles = [j for j in np.ndindex(ny, nx)]        if not isinstance(nx, int) or not isinstance(ny, int):            raise TypeError(an integer is required for nx and ny)wherexMin = minimum x coordinate (left border)yMax = maximum y coordinate (top border)nx = number of columnsny = number of rowsxDist and yDist = resolution (e.g., 1 by 1)nx and ny need to be an integer. I wish to ask where is the most elegant position for  the TypeError. Before all self. or in the end?
Python right position for a Error message in a class
python;optimization