[New-bugs-announce] [issue15203] Accepting of os functions of (path, dir_fd) pair as argument

Serhiy Storchaka report at bugs.python.org
Wed Jun 27 11:27:19 CEST 2012


New submission from Serhiy Storchaka <storchaka at gmail.com>:

Since many of os functions were polymorphic in its first argument (path or fd), the logical continuation is to add a (path, dir_fd) pair as yet one case of this argument. In any case dir_fd is incopatible with fd. This simplifies the code of certain functions which takes patch and dir_fd and pass them to lower level without changes, or that use same patch and dir_fd in calls of several functions. This freely adds support of dir_fd to many functions, such as os.path.isdir. This solves the problem of naming multiple dir_fd arguments (src_dir_fd/dst_dir_fd looks ugly). This saves a pre-3.3 signature of some functions, which will facilitate the use of decorators and improve compatibility with alternative implementations.

----------
components: Library (Lib)
messages: 164132
nosy: storchaka
priority: normal
severity: normal
status: open
title: Accepting of os functions of (path, dir_fd) pair as argument
versions: Python 3.3

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


More information about the New-bugs-announce mailing list