

def reversecolors(self, region=None):
    '\n        Reverse the foreground/background colors of a region of cells on this surface with each other.\n        '
    (regionx, regiony, regionwidth, regionheight) = self.getregion(region)
    if ((regionx, regiony, regiony, regionheight) == (None, None, None, None)):
        return
    for ix in range(regionx, (regionx + regionwidth)):
        for iy in range(regiony, (regiony + regionheight)):
            (self._screenfgcolor[ix][iy], self._screenbgcolor[ix][iy]) = (self._screenbgcolor[ix][iy], self._screenfgcolor[ix][iy])
            self._screendirty[ix][iy] = True
    if self._autoupdate:
        self.update()

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface.reversecolors/VarMisuse@40/87 `regionwidth`->`regiony`