[Python-ideas] Promoting the adoption of pathlib [Was: Working with Path objects: p-strings?]
Ethan Furman
ethan at stoneleaf.us
Thu Mar 31 17:18:25 EDT 2016
On 03/31/2016 01:44 PM, Greg Ewing wrote:
> Paul Moore wrote:
>> bar = getattr(bar, 'path', bar)
>
> This is a rather ugly piece of code to have to sprinkle
> all over any library that deals with pathnames.
>
> I don't get a good feeling about this approach. It seems
> like it will be a spreading infection that only gets
> worse over time.
Agreed. And as Random832 alluded to, if the stdlib supported
pathlib.Path, the only libraries that would need to care would be those
that do path manipulations without os.path.* help.
--
~Ethan~
More information about the Python-ideas
mailing list