[Python-ideas] Better stdlib support for Path objects

Donald Stufft donald at stufft.io
Tue Oct 7 15:20:11 CEST 2014


> On Oct 7, 2014, at 9:17 AM, Barry Warsaw <barry at python.org> wrote:
> 
> On Oct 07, 2014, at 07:54 PM, Nick Coghlan wrote:
> 
>> A single dispatch generic function as an adapter API would be another
>> option, but would likely pose bootstrapping problems for the lowest level
>> interfaces like os.path and the open builtin.
> 
> I wouldn't expect low level APIs like os.path and built-in open to accept Path
> objects.  pathlib already covers most of those use cases, and whatever is
> missing from there can probably be easily added.   It's higher level libraries
> accepting Path objects that is more interesting I think.
> 
> Cheers,
> -Barry

TBH I find a path library that I can’t use anywhere I use paths to be rather neutered.

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA



More information about the Python-ideas mailing list