Ethan Furman <ethan <at> stoneleaf.us> writes: > > > > Not sure about os.path.*. The purpose of os.path module is manipulating > > string paths. From the perspective of pathlib it can look lower level. > > The point is that a function that receives a "path" object (whether str > or Path) shouldn't have to care: it should be able to call os.path.split > on the thing it received and get back a usable answer.
pathlib should already replicate the useful parts of os.path. That was the design goal after all. So this is like saying you want a Python file or socket object to be accepted by os.read(). In the rare case where you want that, you call the .fileno() method explicitly. The equivalent for Path objects is to lookup the .path attribute explicitly. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com