This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barneygale
Recipients barneygale
Date 2021-01-22.03:57:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
The `pathlib.Path.home()` function looks like:

    @classmethod
    def home(cls):
        """Return a new path pointing to the user's home directory (as
        returned by os.path.expanduser('~')).
        """
        return cls(cls()._flavour.gethomedir(None))

If we add a `username=None` parameter and pass this to `gethomedir()` we can easily add a lookup of another user's home directory, so:

    import pathlib
    username = 'phil'
    pathlib.Path.home(username) == pathlib.Path('~' + username).expanduser()
History
Date User Action Args
2021-01-22 03:57:15barneygalesetrecipients: + barneygale
2021-01-22 03:57:15barneygalesetmessageid: <[email protected]>
2021-01-22 03:57:15barneygalelinkissue42998 messages
2021-01-22 03:57:15barneygalecreate