Message229550
| Author |
r.david.murray |
| Recipients |
barry, brett.cannon, cool-RR, ezio.melotti, georg.brandl, pitrou, r.david.murray, tshepang |
| Date |
2014年10月16日.19:14:13 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1413486853.49.0.0819544253407.issue22570@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|