classification
Title: curses: Descripton of KEY_NPAGE and KEY_PPAGE inverted
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Robert Bachmann, SilentGhost, berker.peksag, docs@python, python-dev
Priority: normal Keywords: patch

Created on 2016-03-31 19:33 by Robert Bachmann, last changed 2016-04-02 01:50 by berker.peksag. This issue is now closed.

Files
File name Uploaded Description Edit
curses.patch Robert Bachmann, 2016-03-31 19:33 review
issue26679.diff SilentGhost, 2016-04-01 15:43 review
Messages (4)
msg262701 - (view) Author: Robert Bachmann (Robert Bachmann) Date: 2016-03-31 19:33
The table on <https://docs.python.org/3/library/curses.html>
lists:
__________________________
Page Up 	KEY_NPAGE
Page Down 	KEY_PPAGE
__________________________

it should be vice versa.
msg262745 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-04-01 15:43
Here is the patch.
msg262783 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-04-02 01:48
New changeset f41d3321007f by Berker Peksag in branch '3.5':
Issue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants
https://hg.python.org/cpython/rev/f41d3321007f

New changeset 23d986228c6b by Berker Peksag in branch 'default':
Issue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants
https://hg.python.org/cpython/rev/23d986228c6b
msg262784 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-04-02 01:50
Thanks, Robert and SilentGhost.

I verified the patch with the following script:

import curses


def main(stdscr):
    while True:
        c = stdscr.getch()
        if c == curses.KEY_PPAGE:
            stdscr.addstr('Page Up')
        elif c == curses.KEY_NPAGE:
            stdscr.addstr('Page Down')
        else:
            stdscr.addstr('Another key')

curses.wrapper(main)
History
Date User Action Args
2016-04-02 01:50:38berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg262784

resolution: fixed
stage: patch review -> resolved
2016-04-02 01:48:47python-devsetnosy: + python-dev
messages: + msg262783
2016-04-01 15:43:47SilentGhostsetfiles: + issue26679.diff

nosy: + SilentGhost
messages: + msg262745

type: enhancement -> behavior
stage: patch review
2016-03-31 19:33:42Robert Bachmanncreate