[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Roger Aiudi
New submission from Roger Aiudi : PurePath.__truediv__ and __rtruediv__ raise a TypeError when passed something which is not an instance of string or PurePath. This prevents creating any sort of compatible class that doesn't inherit from the previously mentioned types. -- compo

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Roger Aiudi
Roger Aiudi added the comment: Using your above example, my use case is returning an instance of Spam instead of PurePath from the division operation. The Spam class would have extra properties and methods for dealing with a substructure of our file system that can exist in different places