This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:47cool-RRsetrecipients: + cool-RR, gvanrossum, barry, brett.cannon, georg.brandl, pitrou, bronger, ezio.melotti, Arfrever, r.david.murray, daniel.ugra, tshepang
2016-01-06 09:38:47cool-RRsetmessageid: <1452073127.82.0.264182529507.issue22570@psf.upfronthosting.co.za>
2016-01-06 09:38:47cool-RRlinkissue22570 messages
2016-01-06 09:38:47cool-RRcreate