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
517b9ddd
Commit
517b9ddd
authored
Dec 14, 2007
by
Mark Summerfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Couple of corrections to open() doc as per email from GvR.
parent
ecff60ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Doc/library/functions.rst
Doc/library/functions.rst
+8
-6
No files found.
Doc/library/functions.rst
View file @
517b9ddd
...
...
@@ -724,7 +724,7 @@ available. They are listed here in alphabetical order.
it
already
exists
),
and
``
'a'
``
for
appending
(
which
on
*
some
*
Unix
systems
means
that
*
all
*
writes
append
to
the
end
of
the
file
regardless
of
the
current
seek
position
).
In
text
mode
,
if
*
encoding
*
is
not
specified
the
encoding
is
assumed
to
be
UTF
-
8
.
(
For
reading
is
not
specified
the
encoding
used
is
platform
dependent
.
(
For
reading
and
writing
raw
bytes
use
binary
mode
and
leave
*
encoding
*
unspecified
.)
The
available
modes
are
:
...
...
@@ -748,7 +748,8 @@ available. They are listed here in alphabetical order.
``bytes`` objects without any decoding. In text mode (the default,
or when ``'
t
'`` is appended to the *mode* argument) the contents of
the file are returned as strings, the bytes having been first decoded
using the UTF-8 encoding or using the specified *encoding* if given.
using a platform-dependent encoding or using the specified *encoding*
if given.
*buffering* is an optional integer used to set the buffering policy. By
default full buffering is on. Pass 0 to switch buffering off (only
...
...
@@ -757,16 +758,17 @@ available. They are listed here in alphabetical order.
*encoding* is an optional string that specifies the file'
s
encoding
when
reading
or
writing
in
text
mode
---
this
argument
should
not
be
used
in
binary
mode
.
The
default
encoding
is
UTF
-
8
,
but
any
encoding
binary
mode
.
The
default
encoding
is
platform
dependent
,
but
any
encoding
supported
by
Python
can
be
used
.
(
See
the
:
mod
:`
codecs
`
module
for
the
list
of
supported
encodings
.)
*
errors
*
is
an
optional
string
that
specifies
how
encoding
errors
are
to
be
handled
---
this
argument
should
not
be
used
in
binary
mode
.
Pass
``
'strict'
``
to
raise
a
:
exc
:`
ValueError
`
exception
if
there
is
an
encoding
error
,
or
``
'ignore'
``
to
ignore
errors
.
(
Note
that
ignoring
encoding
errors
can
lead
to
data
loss
.)
See
the
documentation
for
:
func
:`
codecs
.
register
`
for
a
list
of
the
permitted
encoding
error
strings
.
error
(
the
default
of
``
None
``
has
the
same
effect
),
or
pass
``
'ignore'
``
to
ignore
errors
.
(
Note
that
ignoring
encoding
errors
can
lead
to
data
loss
.)
See
the
documentation
for
:
func
:`
codecs
.
register
`
for
a
list
of
the
permitted
encoding
error
strings
.
*
newline
*
is
an
optional
string
that
specifies
the
newline
character
(
s
).
When
reading
,
if
*
newline
*
is
``
None
``,
universal
newlines
mode
is
enabled
.
...
...
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