def derwin(self, *args): nlines = 0 ncols = 0 if len(args) == 2: begin_y, begin_x = args elif len(args) == 4: nlines, ncols, begin_y, begin_x = args else: raise error("derwin requires 2 or 4 arguments") win = lib.derwin(self._win, nlines, ncols, begin_y, begin_x) return Window(_check_NULL(win))