diff options
author | Barry Warsaw <barry@python.org> | 2002-05-22 20:37:53 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-05-22 20:37:53 (GMT) |
commit | 4be55b5cef746a3a8e07e7774c7310917f7381c3 (patch) | |
tree | 1656213b384530e02a54a4b92b7b58feab66647e /Objects | |
parent | 24cf7766bca616cd5d32e0c707dbcda8941d0a27 (diff) | |
download | cpython-4be55b5cef746a3a8e07e7774c7310917f7381c3.zip cpython-4be55b5cef746a3a8e07e7774c7310917f7381c3.tar.gz cpython-4be55b5cef746a3a8e07e7774c7310917f7381c3.tar.bz2 |
file_doc: Add some description of the U mode character, but only when
WITH_UNIVERSAL_NEWLINES is enabled.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/fileobject.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 029a270..a45a4cf 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -1697,6 +1697,16 @@ static char file_doc[] = "Add a '+' to the mode to allow simultaneous reading and writing.\n" "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"; PyTypeObject PyFile_Type = { |