homepage

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.

classification
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
process
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.

Files
File name Uploaded Description Edit
chgat-bug.py 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 docs.python.org/2/library/curses.html#chgat (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:
one
two
Actual output is:
two
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)
https://github.com/python/cpython/commit/b838cc3ff4e039af949c6a19bd896e98e944dcbe
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)
https://github.com/python/cpython/commit/6dbecd2cd9c9448b34e1a632509220f3c4cf7587
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)
https://github.com/python/cpython/commit/fd38819497fd2a52ada674f0c890f5b414d0e87f
There is a typo in the issue number in commit messages.
History
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: + chgat-bug.py
2013年08月06日 16:25:45productivememberofsociety666setfiles: - chgat-bug.py
2013年08月06日 14:42:50productivememberofsociety666create

AltStyle によって変換されたページ (->オリジナル) /