Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4be55b5c
Commit
4be55b5c
authored
May 22, 2002
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file_doc: Add some description of the U mode character, but only when
WITH_UNIVERSAL_NEWLINES is enabled.
parent
24cf7766
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
Objects/fileobject.c
Objects/fileobject.c
+10
-0
No files found.
Objects/fileobject.c
View file @
4be55b5c
...
...
@@ -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
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment