[Python-checkins] python/dist/src/Objects fileobject.c,2.161,2.162

bwarsaw@sourceforge.net bwarsaw@sourceforge.net
Wed, 22 May 2002 13:37:55 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv6203

Modified Files:
	fileobject.c 
Log Message:
file_doc: Add some description of the U mode character, but only when
WITH_UNIVERSAL_NEWLINES is enabled.


Index: fileobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v
retrieving revision 2.161
retrieving revision 2.162
diff -C2 -d -r2.161 -r2.162
*** fileobject.c	27 Apr 2002 18:44:32 -0000	2.161
--- fileobject.c	22 May 2002 20:37:53 -0000	2.162
***************
*** 1698,1701 ****
--- 1698,1711 ----
  "If the buffering argument is given, 0 means unbuffered, 1 means line\n"
  "buffered, and larger numbers specify the buffer size.\n"
+ #ifdef WITH_UNIVERSAL_NEWLINES
+ "Add a 'U' to mode to open the file for input with universal newline\n"
+ "support.  Any line ending in the input file will be seen as a '\\n'\n"
+ "in Python.  Also, a file so opened gains the attribute 'newlines';\n"
+ "the value for this attribute is one of None (no newline read yet),\n"
+ "'\\r', '\\n', '\\r\\n' or a tuple containing all the newline types seen.\n"
+ "\n"
+ "'U' cannot be combined with 'w' or '+' mode.\n"
+ #endif /* WITH_UNIVERSAL_NEWLINES */
+ "\n"
  "Note:  open() is an alias for file().\n";