-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a home() classmethod on Path objects #63976
Comments
Similar to Path.cwd(), perhaps a Path.home() to create a new Path object pointing to the current user's home directory may be useful. |
IMO, this functionality is subsumed by http://bugs.python.org/issue19776 |
Roughly, yes, but it can also be a useful convenience (expanduser('~') isn't that user-friendly, especially for Windows users). |
Added docs to mcsalgado's patch. |
I agree that Path.home() is more user friendly than Path.expanduser('~'). |
+ def _test_home(self, p): Why are you using a submethod _test_home()? |
New changeset 4a55b98314cd by Antoine Pitrou in branch 'default': |
I've committed the patch, thank you! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: