[New-bugs-announce] [issue27086] Add closefd argument to os.listdir

Evgeny Kapun report at bugs.python.org
Sun May 22 14:15:32 EDT 2016


New submission from Evgeny Kapun:

Currently, when given a file descriptor, os.listdir will duplicate it so that the original file descriptor is not closed. In many cases, a file descriptor is not needed anymore after directory is listed, so this is not necessary. I propose adding a keyword argument closefd to os.listdir which, if set to True, will make os.listdir take ownership of the passed file descriptor and close it at the end.

----------
components: Library (Lib)
messages: 266094
nosy: abacabadabacaba
priority: normal
severity: normal
status: open
title: Add closefd argument to os.listdir
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27086>
_______________________________________


More information about the New-bugs-announce mailing list