Add examples for open’s new opener argument (issue 13424)

http://bugs.python.org/review/13424/diff/6494/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/13424/diff/6494/Doc/library/functions.rst#newc... Doc/library/functions.rst:938: The following example is an alternative implementation for opening files I doubt that an alternative implementation is a good usage example. First, this violates the "one obvious way" principle. Second, this does not justify the adding of the new parameter to already complicated open(), because you can do this without it. http://bugs.python.org/review/13424/diff/6494/Doc/library/functions.rst#newc... Doc/library/functions.rst:959: ... dir_fd = os.open(dirname, os.O_RDONLY) Here is a file descriptor leak. http://bugs.python.org/review/13424/
participants (1)
-
storchaka@gmail.com