[Python-checkins] r84295 - in python/branches/py3k: Doc/library/msvcrt.rst PC/msvcrtmodule.c

brian.curtin python-checkins at python.org
Tue Aug 24 07:20:30 CEST 2010


Author: brian.curtin
Date: Tue Aug 24 07:20:30 2010
New Revision: 84295

Log:
Fix #7579. Add docstrings to msvcrt and adjust some wording for bytes.


Modified:
   python/branches/py3k/Doc/library/msvcrt.rst
   python/branches/py3k/PC/msvcrtmodule.c

Modified: python/branches/py3k/Doc/library/msvcrt.rst
==============================================================================
--- python/branches/py3k/Doc/library/msvcrt.rst	(original)
+++ python/branches/py3k/Doc/library/msvcrt.rst	Tue Aug 24 07:20:30 2010
@@ -90,12 +90,12 @@
 
 .. function:: getch()
 
-   Read a keypress and return the resulting character.  Nothing is echoed to the
-   console.  This call will block if a keypress is not already available, but will
-   not wait for :kbd:`Enter` to be pressed. If the pressed key was a special
-   function key, this will return ``'\000'`` or ``'\xe0'``; the next call will
-   return the keycode.  The :kbd:`Control-C` keypress cannot be read with this
-   function.
+   Read a keypress and return the resulting character as a byte string.
+   Nothing is echoed to the console.  This call will block if a keypress
+   is not already available, but will not wait for :kbd:`Enter` to be
+   pressed. If the pressed key was a special function key, this will
+   return ``'\000'`` or ``'\xe0'``; the next call will return the keycode.
+   The :kbd:`Control-C` keypress cannot be read with this function.
 
 
 .. function:: getwch()
@@ -116,7 +116,7 @@
 
 .. function:: putch(char)
 
-   Print the character *char* to the console without buffering.
+   Print the byte string *char* to the console without buffering.
 
 
 .. function:: putwch(unicode_char)
@@ -126,8 +126,8 @@
 
 .. function:: ungetch(char)
 
-   Cause the character *char* to be "pushed back" into the console buffer; it will
-   be the next character read by :func:`getch` or :func:`getche`.
+   Cause the byte string *char* to be "pushed back" into the console buffer;
+   it will be the next character read by :func:`getch` or :func:`getche`.
 
 
 .. function:: ungetwch(unicode_char)

Modified: python/branches/py3k/PC/msvcrtmodule.c
==============================================================================
--- python/branches/py3k/PC/msvcrtmodule.c	(original)
+++ python/branches/py3k/PC/msvcrtmodule.c	Tue Aug 24 07:20:30 2010
@@ -197,12 +197,12 @@
 PyDoc_STRVAR(getch_doc,
 "getch() -> key character\n\
 \n\
-Read a keypress and return the resulting character. Nothing is echoed to\n\
-the console. This call will block if a keypress is not already\n\
-available, but will not wait for Enter to be pressed. If the pressed key\n\
-was a special function key, this will return '\\000' or '\\xe0'; the next\n\
-call will return the keycode. The Control-C keypress cannot be read with\n\
-this function.");
+Read a keypress and return the resulting character as a byte string.\n\
+Nothing is echoed to the console. This call will block if a keypress is\n\
+not already available, but will not wait for Enter to be pressed. If the\n\
+pressed key was a special function key, this will return '\\000' or\n\
+'\\xe0'; the next call will return the keycode. The Control-C keypress\n\
+cannot be read with this function.");
 
 #ifdef _WCONIO_DEFINED
 static PyObject *
@@ -288,7 +288,7 @@
 PyDoc_STRVAR(putch_doc,
 "putch(char) -> None\n\
 \n\
-Print the character char to the console without buffering.");
+Print the byte string char to the console without buffering.");
 
 #ifdef _WCONIO_DEFINED
 static PyObject *
@@ -327,8 +327,9 @@
 PyDoc_STRVAR(ungetch_doc,
 "ungetch(char) -> None\n\
 \n\
-Cause the character char to be \"pushed back\" into the console buffer;\n\
-it will be the next character read by getch() or getche().");
+Cause the byte string char to be \"pushed back\" into the\n\
+console buffer; it will be the next character read by\n\
+getch() or getche().");
 
 #ifdef _WCONIO_DEFINED
 static PyObject *


More information about the Python-checkins mailing list