changeset: 77122:9ef2cb56926d branch: 3.2 parent: 77120:d769e64aed79 user: Petri Lehtinen date: Thu May 24 21:44:07 2012 +0300 files: Doc/library/os.rst Misc/NEWS description: #14863: Update the documentation of os.fdopen() There's no bufsize argument anymore, and os.fdopen() is only a very thin wrapper around open() anymore. Change the documentation to reflect that. diff -r d769e64aed79 -r 9ef2cb56926d Doc/library/os.rst --- a/Doc/library/os.rst Thu May 24 21:56:17 2012 +0800 +++ b/Doc/library/os.rst Thu May 24 21:44:07 2012 +0300 @@ -545,22 +545,12 @@ These functions create new :term:`file objects `. (See also :func:`open`.) -.. function:: fdopen(fd[, mode[, bufsize]]) - - .. index:: single: I/O control; buffering - - 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'``, 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. +.. function:: fdopen(fd, *args, **kwargs) + + 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. .. _os-fd-ops: diff -r d769e64aed79 -r 9ef2cb56926d Misc/NEWS --- a/Misc/NEWS Thu May 24 21:56:17 2012 +0800 +++ b/Misc/NEWS Thu May 24 21:44:07 2012 +0300 @@ -67,6 +67,9 @@ 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.

AltStyle によって変換されたページ (->オリジナル) /