This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmcooke
Recipients
Date 2001-04-19.02:22:03
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In 2.1 (at least), curses.newwin can return a pad
object if it's called with two arguments, i.e.

win = curses.newwin(0,0)

Since this is actually a pad, win.refresh has to be
called with six arguments -- the syntax used for
refreshing a pad -- instead of as just win.refresh()

Looking at the code for _cursesmodule.c, it appears
that only win.refresh() and win.noutrefresh() take
different arguments depending on whether win is
actually a window or a pad.

It looks like there are three options here: 

- document that the two-argument version of
curses.newwin returns a pad (and hence the six-argument
.refresh() must be used)

- make curses.newwin take four arguments only (as the
two argument version is currently equivalent to newpad)

- have win.refresh() and win.noutrefresh() do sensible
things for pads (although I don't know what that would
be...)

I would think #2 is the best.

Hmm, perhaps there should be a separate object type for
pads, so we can tell the difference between pads and
windows.
History
Date User Action Args
2007-08-23 13:53:57adminlinkissue417212 messages
2007-08-23 13:53:57admincreate