@@ -1429,32 +1429,27 @@ int py_mvwdelch(WINDOW *w, int y, int x)
14291429
14301430/* chgat, added by Fabian Kreutz <fabian.kreutz at gmx.net> */
14311431#ifdef HAVE_CURSES_WCHGAT
1432- /*[-clinic input]
1433- _curses.window.chgat
14341432
1435- [
1436- y: int
1437- Y-coordinate.
1438- x: int
1439- X-coordinate.
1440- ]
1433+ PyDoc_STRVAR (_curses_window_chgat__doc__ ,
1434+ "chgat([y, x,] [n=-1,] attr)\n"
1435+ "Set the attributes of characters.\n"
1436+ "\n"
1437+ " y\n"
1438+ " Y-coordinate.\n"
1439+ " x\n"
1440+ " X-coordinate.\n"
1441+ " n\n"
1442+ " Number of characters.\n"
1443+ " attr\n"
1444+ " Attributes for characters.\n"
1445+ "\n"
1446+ "Set the attributes of num characters at the current cursor position, or at\n"
1447+ "position (y, x) if supplied. If no value of num is given or num = -1, the\n"
1448+ "attribute will be set on all the characters to the end of the line. This\n"
1449+ "function does not move the cursor. The changed line will be touched using\n"
1450+ "the touchline() method so that the contents will be redisplayed by the next\n"
1451+ "window refresh." );
14411452
1442- n: int = -1
1443- Number of characters.
1444-
1445- attr: long
1446- Attributes for characters.
1447- /
1448-
1449- Set the attributes of characters.
1450-
1451- Set the attributes of num characters at the current cursor position, or at
1452- position (y, x) if supplied. If no value of num is given or num = -1, the
1453- attribute will be set on all the characters to the end of the line. This
1454- function does not move the cursor. The changed line will be touched using
1455- the touchline() method so that the contents will be redisplayed by the next
1456- window refresh.
1457- [-clinic start generated code]*/
14581453static PyObject *
14591454PyCursesWindow_ChgAt (PyObject * op , PyObject * args )
14601455{
@@ -1481,19 +1476,20 @@ PyCursesWindow_ChgAt(PyObject *op, PyObject *args)
14811476 attr = lattr ;
14821477 break ;
14831478 case 3 :
1484- if (!PyArg_ParseTuple (args ,"iil;int,int ,attr" , & y , & x , & lattr ))
1479+ if (!PyArg_ParseTuple (args ,"iil;y,x ,attr" , & y , & x , & lattr ))
14851480 return NULL ;
14861481 attr = lattr ;
14871482 use_xy = TRUE;
14881483 break ;
14891484 case 4 :
1490- if (!PyArg_ParseTuple (args ,"iiil;int,int ,n,attr" , & y , & x , & num , & lattr ))
1485+ if (!PyArg_ParseTuple (args ,"iiil;y,x ,n,attr" , & y , & x , & num , & lattr ))
14911486 return NULL ;
14921487 attr = lattr ;
14931488 use_xy = TRUE;
14941489 break ;
14951490 default :
1496- PyErr_SetString (PyExc_TypeError , "chgat requires 1 to 4 arguments" );
1491+ PyErr_SetString (PyExc_TypeError ,
1492+ "_curses.window.chgat requires 1 to 4 arguments" );
14971493 return NULL ;
14981494 }
14991495
@@ -2818,7 +2814,10 @@ static PyMethodDef PyCursesWindow_methods[] = {
28182814 _CURSES_WINDOW_ATTRSET_METHODDEF
28192815 _CURSES_WINDOW_BKGD_METHODDEF
28202816#ifdef HAVE_CURSES_WCHGAT
2821- {"chgat" , PyCursesWindow_ChgAt , METH_VARARGS },
2817+ {
2818+ "chgat" , PyCursesWindow_ChgAt , METH_VARARGS ,
2819+ _curses_window_chgat__doc__
2820+ },
28222821#endif
28232822 _CURSES_WINDOW_BKGDSET_METHODDEF
28242823 _CURSES_WINDOW_BORDER_METHODDEF
0 commit comments