On Tue, Jun 5, 2018 at 4:42 PM, Steven D'Aprano <steve@pearwood.info> wrote:
This is a quick and dirty survey of my code:

[steve@ando python]$ grep Path *.py */*.py */*/*.py | wc -l
21
[steve@ando python]$ grep "enumerate(" *.py */*.py */*/*.py | wc -l
307
[steve@ando python]$ grep "zip(" *.py */*.py */*/*.py | wc -l
499
[steve@ando python]$ grep "any(" *.py */*.py */*/*.py | wc -l
96
[steve@ando python]$ grep "all(" *.py */*.py */*/*.py | wc -l
224

I"m not saying I agree with the OP, but this is not a fair comparison at all -- Path is pretty new, and even newer is it functional with most of teh stdlib.

I do a lot of path manipulations in my code, but hardly ever use Path -- nly brand new code uses it.

so I think you'd need to grep for os.path (and probably shutil, too) to get a meaningful answer.

But key here is that there is no consensus that Path is the new "obvious way to do it", and adding it to builtins would be essentially making that statement.

-CHB


--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov