diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 32d328283671d7..8ed73b58996d6a 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -306,6 +306,8 @@ The module :mod:`curses` defines the following functions: Initialize the library. Return a :ref:`window ` object which represents the whole screen. + See :func:`setupterm` for a caveat about calling it before this function. + .. note:: If there is an error opening the terminal, the underlying curses library may @@ -568,6 +570,13 @@ The module :mod:`curses` defines the following functions: terminfo database entry could not be read. If the terminal has already been initialized, this function has no effect. + .. note:: + + Calling :func:`initscr` after :func:`setupterm` + leaks the terminal that :func:`setupterm` allocated: + the curses library keeps only a single current terminal + and does not free the previously allocated one. + .. function:: start_color()