[Python-ideas] PEP 428 - object-oriented filesystem paths
steve at pearwood.info
Sat Oct 6 00:41:05 CEST 2012
On 06/10/12 05:53, Andrew McNabb wrote:
> Path concatenation is obviously not a form of division, so it makes
> little sense to use the division operator for this purpose.
But / is not just a division operator. It is also used for:
* alternatives: "tea and/or coffee, breakfast/lunch/dinner"
* italic markup: "some apps use /slashes/ for italics"
* instead of line breaks when quoting poetry
* abbreviations such as n/a b/w c/o and even w/ (not applicable,
between, care of, with)
* date separator
Since / is often (but not always) used as a path separator, using it as
a path component join operator makes good sense.
BTW, are there any supported platforms where the path separator or
alternate path are not slash? There used to be Apple Mac OS using
More information about the Python-ideas