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 gvanrossum
Recipients Arfrever, barry, brett.cannon, bronger, cool-RR, daniel.ugra, ezio.melotti, georg.brandl, gvanrossum, pitrou, r.david.murray, serhiy.storchaka, tshepang
Date 2016-01-06.17:30:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
I think it's actually very reasonable for a Path to have a path attribute
that's a string. The DirEntry has two string attributes: name (the last
component) and path (the full path). The Path object already has the
former. Adding the latter makes sense to me. After all you've gotta give it
*some* name, and 'path' is used (unsurprisingly) in this meaning already in
many places.

The shortest idiom in libraries wanting to support this would be

    path = gettattr(arg, 'path', arg)

This extracts the path attribute from a DirEntry or Path object, and
assumes the argument is a string otherwise. I think this is relatively
reasonable to encode in C as well.
Date User Action Args
2016-01-06 17:30:22gvanrossumsetrecipients: + gvanrossum, barry, brett.cannon, georg.brandl, pitrou, bronger, ezio.melotti, Arfrever, r.david.murray, daniel.ugra, cool-RR, tshepang, serhiy.storchaka
2016-01-06 17:30:22gvanrossumlinkissue22570 messages
2016-01-06 17:30:22gvanrossumcreate