[Python-ideas] Working with Path objects: p-strings?
Chris Barker - NOAA Federal
chris.barker at noaa.gov
Sun Mar 27 22:53:51 EDT 2016
>
> There is an open issue and I'm working on the patch. I'm going to make major path-related functions in the stdlib accepting the Path object in 3.6.
This is great! Thanks Serhiy.
> try:
> path = path.path
> except AttributeError:
> pass
>
> The advantage is that this works not with concrete Path implementation, but with any third-party Path class and other path-related objects like DirEntry that provide the "path" attribute.
This sounds like the way to go, also.
Could have saved ourselves some discussion :-)
-CHB
More information about the Python-ideas
mailing list