[issue28477] Add optional user argument to pathlib.Path.home()
Josh Rosenberg
report at bugs.python.org
Wed Oct 19 13:34:22 EDT 2016
New submission from Josh Rosenberg:
os.path.expanduser supports both '~' and '~username` constructs to get home directories. It seems reasonable for pathlib.Path.home to default to getting the current user's home directory, but support passing an argument to get the home directory for another user. It means no need to use os.path.expanduser for the purpose (which always strikes me as a little "ugly" for portable code; the ~ works, but it's using UNIX syntax in a way that makes it feel non-portable), making pathlib a more complete replacement.
----------
components: Library (Lib)
messages: 278988
nosy: josh.r
priority: normal
severity: normal
status: open
title: Add optional user argument to pathlib.Path.home()
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28477>
_______________________________________
More information about the Python-bugs-list
mailing list