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.

Title: curses.chgat() moves cursor, documentation says it shouldn't
Type: behavior Stage: resolved
Components: Documentation, Extension Modules Versions: Python 3.7, Python 3.6, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: IronGrid, berker.peksag, docs@python, productivememberofsociety666, serhiy.storchaka
Priority: normal Keywords: easy

Created on 2013-08-06 14:42 by productivememberofsociety666, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit productivememberofsociety666, 2013-08-06 16:26 Code demonstrating curses.chgat() moving the cursor.
Pull Requests
URL Status Linked Edit
PR 1430 merged python-dev, 2017-05-04 18:51
Messages (5)
msg194552 - (view) Author: productivememberofsociety666 (productivememberofsociety666) Date: 2013-08-06 14:42
According to (or any other version), curses.chgat() is not supposed to move the cursor at all.

This is true if you don't give it x,y coordinates, but if you do, the cursor does in fact move to those coordinates, since it then uses C curses's mvchgat() internally and doesn't correct the position afterwards.

See included file for demonstration:

Expected output is:

Actual output is:

Fix the documentation or fix the code :-)
msg220998 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-19 15:58
Can we have a comment on this please.
msg221533 - (view) Author: Grady Martin (IronGrid) Date: 2014-06-25 07:54
I get this error with 3.2.3, running Debian Stable.

It's annoying because this error prevents curses apps from being able to highlight the current line.
msg292350 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-04-26 14:10
I think this is a documentation issue. curses.chgat() documentation tries to describe different signatures in one place and some of these signatures change the behavior of the function. For example, curses.chgat() calls mvwchgat() when users pass y and x to it and mvwchgat() is documented as "the mvwchgat function does a cursor move before acting".
msg305545 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-04 08:49
New changeset b838cc3ff4e039af949c6a19bd896e98e944dcbe by Serhiy Storchaka (Chillar Anand) in branch 'master':
bpo-18699: Corrected documentation for window.chgat in curses module (#1430)

New changeset 6dbecd2cd9c9448b34e1a632509220f3c4cf7587 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430) (#4271)

New changeset fd38819497fd2a52ada674f0c890f5b414d0e87f by Serhiy Storchaka in branch '2.7':
[2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430). (#4272)

There is a typo in the issue number in commit messages.
Date User Action Args
2022-04-11 14:57:49adminsetgithub: 62869
2017-11-04 08:49:25serhiy.storchakasetmessages: + msg305545
2017-11-04 08:45:58serhiy.storchakasetstatus: open -> closed
stage: needs patch -> resolved
resolution: fixed
versions: - Python 3.5
2017-11-01 18:50:53serhiy.storchakasetassignee: docs@python -> serhiy.storchaka

nosy: + serhiy.storchaka
2017-05-04 18:51:37python-devsetpull_requests: + pull_request1558
2017-04-26 14:24:56BreamoreBoysetnosy: - BreamoreBoy
2017-04-26 14:10:13berker.peksagsetversions: + Python 3.6, Python 3.7, - Python 3.2, Python 3.4
nosy: + berker.peksag

messages: + msg292350

keywords: + easy
stage: needs patch
2014-06-25 07:54:34IronGridsetnosy: + IronGrid

messages: + msg221533
versions: + Python 3.2
2014-06-19 15:58:04BreamoreBoysetnosy: + BreamoreBoy

messages: + msg220998
versions: - Python 2.6, Python 3.1, Python 3.2, Python 3.3
2013-08-06 16:26:45productivememberofsociety666setfiles: +
2013-08-06 16:25:45productivememberofsociety666setfiles: -
2013-08-06 14:42:50productivememberofsociety666create