Message229550
Well, if you use an isinstance check you privilege the stdlib Path over any other pathlike implementation. Since it *is* in the stdlib, this isn't an automatic reason for rejection, but it does have a bit of a code smell to it. Why should everything that deals with path strings have to have intimate knowledge of Path objects?
I originally wrote here "Maybe we need a __path__ magic method" as a half-joke, but rereading the issue I see that this has in fact been proposed seriously, and referenced by Antoine (the pathlib author).
I'm -1 on just sprinkling support for Path throughout the stdlib. Do it in a universally applicable fashion or don't do it at all, IMO. |
|
Date |
User |
Action |
Args |
2014-10-16 19:14:13 | r.david.murray | set | recipients:
+ r.david.murray, barry, brett.cannon, georg.brandl, pitrou, ezio.melotti, cool-RR, tshepang |
2014-10-16 19:14:13 | r.david.murray | set | messageid: <1413486853.49.0.0819544253407.issue22570@psf.upfronthosting.co.za> |
2014-10-16 19:14:13 | r.david.murray | link | issue22570 messages |
2014-10-16 19:14:13 | r.david.murray | create | |
|