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 <rep...@bugs.python.org>
<http://bugs.python.org/issue27086>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to