[New-bugs-announce] [issue39897] `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses

Barney Gale report at bugs.python.org
Sat Mar 7 23:11:08 EST 2020


New submission from Barney Gale <barney.gale at gmail.com>:

`pathlib.Path.is_mount()` calls `Path(self.parent)`, which:

- Is needless, as `self.parent` is already a Path instance!
- Prevents effective subclassing, as `self.parent` may be a `Path` subclass with its own `stat()` implementation

----------
components: Library (Lib)
messages: 363633
nosy: barneygale
priority: normal
severity: normal
status: open
title: `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39897>
_______________________________________


More information about the New-bugs-announce mailing list