Message257593
| Author |
cool-RR |
| Recipients |
Arfrever, barry, brett.cannon, bronger, cool-RR, daniel.ugra, ezio.melotti, georg.brandl, gvanrossum, pitrou, r.david.murray, tshepang |
| Date |
2016年01月06日.09:38:47 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1452073127.82.0.264182529507.issue22570@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I thought about it some more, and personally I'd prefer each function to do `str(path)` internally rather than `if hasattr(p, 'path'): p = p.path`. Even if it means we'll have to deal with "where did that file named '<type object at ...>' come from?!" errors. I think it's clumsy that the path protocol is to access `path.path`. We already have a protocol for getting a string out of an object and it's `str(object)`. I think we should use it even if it makes debugging harder in the case where someone mistakenly passes a non-path object to a function that wants a path. (And without using `isinstance` either.) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年01月06日 09:38:47 | cool-RR | set | recipients:
+ cool-RR, gvanrossum, barry, brett.cannon, georg.brandl, pitrou, bronger, ezio.melotti, Arfrever, r.david.murray, daniel.ugra, tshepang |
| 2016年01月06日 09:38:47 | cool-RR | set | messageid: <1452073127.82.0.264182529507.issue22570@psf.upfronthosting.co.za> |
| 2016年01月06日 09:38:47 | cool-RR | link | issue22570 messages |
| 2016年01月06日 09:38:47 | cool-RR | create |
|