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
fa52cbd5
Commit
fa52cbd5
authored
May 24, 2012
by
Petri Lehtinen
Browse files
Options
Browse Files
Download
Plain Diff
#14863: Update the documentation of os.fdopen()
parents
4715ca56
1a01ebc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
18 deletions
+8
-18
Doc/library/os.rst
Doc/library/os.rst
+5
-18
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/os.rst
View file @
fa52cbd5
...
...
@@ -600,26 +600,13 @@ File Object Creation
These functions create new :term:`file objects <file object>`. (See also :func:`open`.)
.. function:: fdopen(fd
[, mode[, bufsize]]
)
.. function:: fdopen(fd
, *args, **kwargs
)
.. index:: single: I/O control; buffering
Return an open file object connected to the file descriptor *fd*.
This is an alias of :func:`open` and accepts the same arguments.
The only difference is that the first argument of :func:`fdopen`
must always be an integer.
Return an open file object connected to the file descriptor *fd*. The *mode*
and *bufsize* arguments have the same meaning as the corresponding arguments to
the built-in :func:`open` function.
When specified, the *mode* argument must start with one of the letters
``'r'``, ``'w'``, ``'x'`` or ``'a'``, otherwise a :exc:`ValueError` is
raised.
On Unix, when the *mode* argument starts with ``'a'``, the *O_APPEND* flag is
set on the file descriptor (which the :c:func:`fdopen` implementation already
does on most platforms).
Availability: Unix, Windows.
.. versionchanged:: 3.3
The ``'x'`` mode was added.
.. _os-fd-ops:
...
...
Misc/NEWS
View file @
fa52cbd5
...
...
@@ -42,6 +42,9 @@ Core and Builtins
Library
-------
- Issue #14863: Update the documentation of os.fdopen() to reflect the
fact that it'
s
only
a
thin
wrapper
around
open
()
anymore
.
-
Issue
#
14036
:
Add
an
additional
check
to
validate
that
port
in
urlparse
does
not
go
in
illegal
range
and
returns
None
.
...
...
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