Skip to content
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

Add parent and parents attributes #150

Closed
mshuffett opened this issue Aug 8, 2017 · 4 comments
Closed

Add parent and parents attributes #150

mshuffett opened this issue Aug 8, 2017 · 4 comments

Comments

@mshuffett
Copy link

I commonly have to access the parent multiple levels above a path, but the py.path.local module does not seem to have a convenient way to do it.

I would like to request / add two new attributes parent and parents which mirror the API of pathlib.
https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.parents

@The-Compiler
Copy link
Member

How are you using py.path? FWIW, we plan to replace it by pathlib in pytest in the long run, and at that point, it'll most likely not see much new development anyways.

@mshuffett
Copy link
Author

mshuffett commented Aug 10, 2017 via email

@RonnyPfannschmidt
Copy link
Member

@mshuffett currently those are called parts() and dirpath()

@mshuffett
Copy link
Author

Yeah. I should probably just use parts more, Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants