path module / class
Peter Hansen
peter at engcorp.com
Fri Nov 18 22:42:35 EST 2005
Neil Hodgson wrote:
> Chris:
>
>> What is the status of the path module/class PEP? Did somebody start
>> writing one, or did it die? I would really like to see something like
>> Jason Orendorff's path class make its way into the python standard
>> library.
>
> There is no PEP yet but there is a wiki page.
> http://wiki.python.org/moin/PathClass
> Guido was unenthusiastic so a good step would be to produce some
> compelling examples.
Compelling to whom? I wonder if it's even possible for Guido to find
compelling anything which obsoletes much of os.path and shutil and
friends (modules which Guido probably added first and has used the most
and feels most comfortable with).
Personally, I find almost all uses of path.py to be compelling, most
especially when I consider it from the points of view of "readability",
"explicitness", "beauty", "simple", "flat", let alone "practical"
(having all those tools in one place). Those were all from Tim
channeling Guido, but perhaps it was a noisy channel... And Guido's
views on consistency are well documented ;-) so the fact that the
alternative to path.py is incredibly inconsistent probably has no weight
in the argument.
Not so facetiously though: if the examples given haven't proven
compelling, is it realistic to think that someone will dig up an example
which suddenly changes Guido's mind? I suspect it's more realistic to
think, as with the ternary operator, that he either will or won't, and
examples proposed from outside won't have much if any impact on his
thinking.
-Peter
More information about the Python-list
mailing list