SIGN IN SIGN UP

GH-110109: Fix misleading `pathlib._abc.PurePathBase` repr (#113376)

`PurePathBase.__repr__()` produces a string like `MyPath('/foo')`. This
repr is incorrect/misleading when a subclass's `__init__()` method is
customized, which I expect to be the very common.

This commit moves the `__repr__()` method to `PurePath`, leaving
`PurePathBase` with the default `object` repr.

No user-facing changes because the `pathlib._abc` module remains private.
B
Barney Gale committed
237e2cff00cca49db47bcb7ea13683a4d9ad1ea5
Parent: 45e09f9
Committed by GitHub <noreply@github.com> on 12/22/2023, 3:11:16 PM