[Python-ideas] Making Path() a built in.

Jacco van Dorp j.van.dorp at deonet.nl
Wed Jun 6 05:51:43 EDT 2018


For the startup time, you could keep it around as builtin but save the
import time until someone actually uses it.

While I agree sqrt should be a builtin as well, I think there's a good
argument to be made for Path to. I just switched to it the past month,
and im liking it a lot over constructs like (real code example):
os.path.join(os.path.dirname(os.path.abspath(__file__)), "..",
"filename"). (could probably be inproved by changing to __path__ and
removing the dirname ? but the current version works...)

sqrt isn't as much used in situations I've been in - and when it was,
I generally got a giant heap of data to process and was doing that
with numpy anyway.


More information about the Python-ideas mailing list