This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients BreamoreBoy, akuchling, h.venev, icordasc, ischwabacher, pitrou, serhiy.storchaka
Date 2015-04-14.16:54:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429030446.33.0.0937466145401.issue21039@psf.upfronthosting.co.za>
In-reply-to
Content
I beg to disagree :) Pathlib tries to find a compromise between user-friendliness and power, but it's definitely more on the user-friendliness side than, say, the os module APIs. In other words, I don't think it's a problem if not all details of OS semantics can be encoded in Path objects. In practice, the situations where it's useful to make a difference between a slash-ending path and a non-slash-ending path are few and far between.

There are all kinds of small API decisions which have to be revisited if we allow trailing slashes to be significant. For example, what should be the last component of the path? The component just before the ending slash, or the empty string? What if slice off the last part? What is the name, stem, suffix? etc.

A path, conceptually, is just that: a sequence of names designating the nodes in the filesystem tree that you walk to get to the terminal node. If you start making trailing slash significants then this simple, intuitive abstraction breaks and things become much more awkward to understand.
History
Date User Action Args
2015-04-14 16:54:06pitrousetrecipients: + pitrou, akuchling, BreamoreBoy, serhiy.storchaka, icordasc, h.venev, ischwabacher
2015-04-14 16:54:06pitrousetmessageid: <1429030446.33.0.0937466145401.issue21039@psf.upfronthosting.co.za>
2015-04-14 16:54:06pitroulinkissue21039 messages
2015-04-14 16:54:06pitroucreate