Skip to content

Conversation

@YASWANTH1976
Copy link

@YASWANTH1976 YASWANTH1976 commented Jan 1, 2026

Added explanation of when pure paths are appropriate to help beginners understand the difference between pure and concrete paths.


📚 Documentation preview 📚: https://cpython-previews--143319.org.readthedocs.build/

Added explanation of when pure paths are appropriate to help
beginners understand the difference between pure and concrete paths.
@python-cla-bot
Copy link

python-cla-bot bot commented Jan 1, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Jan 1, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Jan 1, 2026
@YASWANTH1976 YASWANTH1976 changed the title Doc: clarify when to use pathlib pure paths Doc: clarify when to use pathlib pure paths [skip issue] Jan 1, 2026
Comment on lines +37 to +39
access a filesystem.
Use pure paths when you need to manipulate path strings
without requiring the path to exist on disk,such as when generating paths
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't be indented correctly and has some formatting issues such as missing spaces.

I personally don't think it adds much that isn't already covered by the list of points (but that's really for someone else to decide - I have no say here)

@picnixz
Copy link
Member

picnixz commented Jan 1, 2026

I don't think it's useful. We already say:

#. You want to make sure that your code only manipulates paths without actually
accessing the OS. In this case, instantiating one of the pure classes may be
useful since those simply don't have any OS-accessing operations.

I'm going to close this but if Barney really wants this addition, he can re-open this.

Please read https://devguide.python.org/getting-started/pull-request-lifecycle/ for contributing to the project.

@picnixz picnixz closed this Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants