[Python-Dev] cpython: Wording changes to pathlib docs.

Antoine Pitrou solipsis at pitrou.net
Fri Nov 22 21:47:57 CET 2013


On Fri, 22 Nov 2013 21:45:17 +0100 (CET)
andrew.kuchling <python-checkins at python.org> wrote:
> http://hg.python.org/cpython/rev/cce14bc9b675
> changeset:   87371:cce14bc9b675
> user:        Andrew Kuchling <amk at amk.ca>
> date:        Fri Nov 22 15:45:02 2013 -0500
> summary:
>   Wording changes to pathlib docs.
> 
> Only possibly-controversial change: joinpath() was described as:
> 
>   "Calling this method is equivalent to indexing the path with each of
>   the *other* arguments in turn."
> 
> 'Indexing' is an odd word to use, because you can't subscript Path or
> PurePath objects, so I changed it to "combining".

You're right, "indexing" dates back to when pathlib used subscripting
to combine paths together (e.g. you would write my_path['Lib']['test']
or my_path['Lib/test'] to access the 'Lib/test' subpath of my_path), but
now pathlib uses the '/' operator.

Regards

Antoine.




More information about the Python-Dev mailing list