[Python-checkins] cpython (merge 3.3 -> default): merge with 3.3

georg.brandl python-checkins at python.org
Sun Oct 6 10:04:05 CEST 2013


http://hg.python.org/cpython/rev/399e46611fce
changeset:   86017:399e46611fce
parent:      86014:befedd5c64c5
parent:      86016:6c38580488e2
user:        Georg Brandl <georg at python.org>
date:        Sun Oct 06 10:04:49 2013 +0200
summary:
  merge with 3.3

files:
  Doc/howto/curses.rst |  12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/Doc/howto/curses.rst b/Doc/howto/curses.rst
--- a/Doc/howto/curses.rst
+++ b/Doc/howto/curses.rst
@@ -143,7 +143,7 @@
        stdscr.clear()
 
        # This raises ZeroDivisionError when i == 10.
-       for i in range(0, 10):
+       for i in range(0, 11):
            v = i-10
            stdscr.addstr(i, 0, '10 divided by {} is {}'.format(v, 10/v))
 
@@ -177,8 +177,8 @@
 :func:`~curses.newwin` function creates a new window of a given size,
 returning the new window object. ::
 
-   begin_x = 20 ; begin_y = 7
-   height = 5 ; width = 40
+   begin_x = 20; begin_y = 7
+   height = 5; width = 40
    win = curses.newwin(height, width, begin_y, begin_x)
 
 Note that the coordinate system used in curses is unusual.
@@ -227,7 +227,7 @@
    # explained in the next section
    for y in range(0, 99):
        for x in range(0, 99):
-           pad.addch(y,x, ord('a') + (x*x+y*y) % 26 )
+           pad.addch(y,x, ord('a') + (x*x+y*y) % 26)
 
    # Displays a section of the pad in the middle of the screen.
    # (0,0) : coordinate of upper-left corner of pad area to display.
@@ -389,7 +389,7 @@
 
 An example, which displays a line of text using color pair 1::
 
-   stdscr.addstr( "Pretty text", curses.color_pair(1) )
+   stdscr.addstr("Pretty text", curses.color_pair(1))
    stdscr.refresh()
 
 As I said before, a color pair consists of a foreground and background color.
@@ -412,7 +412,7 @@
 will change to the new colors.  You can also display new text in this color
 with::
 
-   stdscr.addstr(0,0, "RED ALERT!", curses.color_pair(1) )
+   stdscr.addstr(0,0, "RED ALERT!", curses.color_pair(1))
 
 Very fancy terminals can change the definitions of the actual colors to a given
 RGB value.  This lets you change color 1, which is usually red, to purple or

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list