On Mon, May 7, 2018 at 12:13 PM, Nick Coghlan <ncogh...@gmail.com> wrote:
> So I have a different suggestion: perhaps it might make sense to propose
> promoting a key handful of path manipulation operations to the status of
> being builtins?
>
> Specifically, the ones I'd have in mind would be:
>
> - dirname (aka os.path.dirname)
> - joinpath (aka os.path.join)

These two are the basics of path manipulation. +1 for promoting to
builtins, unless pathlib becomes core (which I suspect isn't
happening).

> - abspath (aka os.path.abspath)

Only +0.5 on this, as it has to do file system operations. It may be
worthwhile, instead, to promote os.path.normpath, which (like the
others) is purely processing the string form of the path. It'll return
the same value regardless of the file system.

But yes, I'd much rather see path manipulation based on __file__ and
builtins rather than injecting yet another module-level attribute
that's derived from what we already have.

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to