[Python-ideas] Making Path() a built in.
Chris Barker
chris.barker at noaa.gov
Wed Jun 6 02:23:55 EDT 2018
On Tue, Jun 5, 2018 at 4:42 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> This is a quick and dirty survey of my code:
>
> [steve at ando python]$ grep Path *.py */*.py */*/*.py | wc -l
> 21
> [steve at ando python]$ grep "enumerate(" *.py */*.py */*/*.py | wc -l
> 307
> [steve at ando python]$ grep "zip(" *.py */*.py */*/*.py | wc -l
> 499
> [steve at ando python]$ grep "any(" *.py */*.py */*/*.py | wc -l
> 96
> [steve at 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 at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180605/e712eae3/attachment-0001.html>
More information about the Python-ideas
mailing list