[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

Serhiy Storchaka report at bugs.python.org
Fri Apr 20 08:35:47 CEST 2012


Serhiy Storchaka <storchaka at gmail.com> added the comment:

Thank you, Larry. I was going to do it, but got stuck with other things.

The main objective of this proposal is to get rid of litter os module by dozen rarely popular and non-portable functions (introduced by issue4761). Moreover, the descriptions are given in alphabetical order and related functions are located far from each other.

> So I'd spell those "dir_fd", "src_dir_fd" (etc), "remove_dir", and "follow_symlinks".

I follow the common style. `followlinks` is already used in other functions.

> No--it'll just be part of a release, and you'll check which version of Python 3 you have before using it.

Presence of function depends not only on the version, but also from the platform.

Benjamin, therefore I believe it is critically important to do this work before the release of Python 3.3. To people and have not started to use the new features. Otherwise, get rid of them will be more difficult. But I have nothing against to put "at"-functions in a separate submodule (os.posix?).

David, let lstat remains. fstatat include functionality both stat and lstat (but has a different interface). I suggest to unite fstatat and stat, while maintaining backward compatibility and using a more user-friendly interface.

In the C extension of the functions is impossible, that is why were introduced new functions with other names.

----------
components: +Library (Lib)
versions: +Python 3.3

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


More information about the Python-bugs-list mailing list