On Wed, Mar 30, 2016 at 1:49 AM, Brett Cannon firstname.lastname@example.org wrote:
On Tue, 29 Mar 2016 at 15:41 Koos Zevenhoven email@example.com wrote:
I'll have to agree. But to be fair, Greg wrote something like 'a suitable seed object' so we could for ex. have P=PathSeed(), and use another operator.
Or even P.absolute and P.relative:
And you could even go as far as make one the default and the other not to promote one over the other:
The trick is, again, that the path is often in a variable coming from user input etc. and you don't (want to) deal with whether it is relative or absolute. This also still has a slash before relative paths too.
Another thing is that, while / looks very nice, it makes you have to use parentheses when you want to directly call a method on the path:
(somedir / relative_file_path).method()
We have been making examples with /many/'path'/'objects'/joined_together. But how often do people really join more than two paths at once?
Sometimes, in interactive sessions, I have wished for this to work:
...which is kind of stupid ;)