[Python-Dev] Pathlib enhancments - method name only (original) (raw)
Ethan Furman ethan at stoneleaf.us
Sun Apr 10 11:26:31 EDT 2016
- Previous message (by thread): [Python-Dev] Pathlib enhancments - method name only
- Next message (by thread): [Python-Dev] Pathlib enhancments - method name only
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 04/10/2016 12:36 AM, Nick Coghlan wrote:
On 10 April 2016 at 17:12, Greg Ewing wrote:
But there needs to be some way to ask a path object for its native string representation, otherwise there would be no point in using foreign path objects at all. In addition to the existing "str(pathobj)", a "path" property was recently added for that purpose: >>> import pathlib >>> pathlib.PureWindowsPath(".") PureWindowsPath('.') >>> pathlib.PureWindowsPath(".").path '.' (The specific property name was chosen to match os.scandir's DirEntry.path)
But with the new fspath enhancements wouldn't the .path attribute go away?
--
Ethan
- Previous message (by thread): [Python-Dev] Pathlib enhancments - method name only
- Next message (by thread): [Python-Dev] Pathlib enhancments - method name only
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]