From a153d12b67386f3627bbd9eface859c1a4c68bd7 Mon Sep 17 00:00:00 2001 From: Jiayu Yi Date: Tue, 5 Nov 2024 22:00:04 +0800 Subject: [PATCH] Fix example code in curses tutorial This fixes an error in the example code illustrating the usage of the `wrapper` method in the curses tutorial which causes it to run through all iterations of the loop and error out before displaying anything on screen or waiting for user input. --- Doc/howto/curses.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/howto/curses.rst b/Doc/howto/curses.rst index f9ad81e38f8dc3..6994a5328e8149 100644 --- a/Doc/howto/curses.rst +++ b/Doc/howto/curses.rst @@ -145,8 +145,8 @@ importing the :func:`curses.wrapper` function and using it like this:: v = i-10 stdscr.addstr(i, 0, '10 divided by {} is {}'.format(v, 10/v)) - stdscr.refresh() - stdscr.getkey() + stdscr.refresh() + stdscr.getkey() wrapper(main)