def newwin(nlines, ncols, begin_y=None, begin_x=None): _ensure_initialised() if begin_x is None: if begin_y is not None: raise error("newwin requires 2 or 4 arguments") begin_y = begin_x = 0 return Window(_check_NULL(lib.newwin(nlines, ncols, begin_y, begin_x)))