Skip to content

Conversation

@barneygale
Copy link
Contributor

@barneygale barneygale commented Mar 30, 2025

Add pathlib.PurePath.segments attribute, which stores the flattened path segments given to the path object initializer.

In the pathlib ABCs, add JoinablePath.segments as an abstract attribute, and convert JoinablePath.__str__() from an abstract method to a mixin method that joins self.segments.


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

Add `pathlib.PurePath.segments` attribute, which stores the flattened path
segments given to the path object initializer.

In the pathlib ABCs, add `JoinablePath.segments` as an abstract attribute,
and convert `JoinablePath.__str__()` from an abstract method to a mixin
method that joins `self.segments`.
This applies to tons of attributes
@barneygale barneygale marked this pull request as ready for review March 30, 2025 19:56
@barneygale barneygale requested a review from encukou March 30, 2025 19:56
@python-cla-bot
Copy link

python-cla-bot bot commented Apr 6, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@barneygale barneygale closed this May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant