Message413142
The docs for NotImplementedError say:
> In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method, or while the class is being developed to indicate that the real implementation still needs to be added.
pathlib's use of NotImplementedError appears to be more broad. It can be raised in the following circumstances:
1. When attempting to construct a WindowsPath from a non-Windows system, and vice-versa. This is the only case where NotImplementedError is mentioned in the pathlib docs (in a repl example)
2. In glob() and rglob() when an absolute path is supplied as a pattern
3. In owner() if the pwd module isn't available
4. In group() if the grp module isn't available
5. In readlink() if os.readlink() isn't available
6. In symlink_to() if os.symlink() isn't available
7. In hardlink_to() if os.hardlink() isn't available
8. In WindowsPath.is_mount(), unconditionally
I suspect there are better choices for exception types in all these cases. |
|
Date |
User |
Action |
Args |
2022-02-12 19:35:13 | barneygale | set | recipients:
+ barneygale |
2022-02-12 19:35:13 | barneygale | set | messageid: <1644694513.05.0.985214969865.issue46733@roundup.psfhosted.org> |
2022-02-12 19:35:13 | barneygale | link | issue46733 messages |
2022-02-12 19:35:12 | barneygale | create | |
|