[Python-ideas] os.path.join

anatoly techtonik techtonik at gmail.com
Thu Oct 31 11:30:02 CET 2013


On Wed, Oct 30, 2013 at 8:06 PM, Bruce Leban <bruce at leapyear.org> wrote:
> I don't know if the code is wrong but if you're asking if the *result* of
> join is wrong, I don't think it is. It references the same file as these
> commands:
>
> cd /static
> cat /styles/largestyles,css
>
> I agree it might be confusing but it's pretty explicitly documented.

Yes. It is confusing.

1. How often the operations to join absolute paths is needed?
2. What is expected result of this operation?

For me, as a user, the answer to 1 is 'never', for 2 I'd expect 2nd
path to be treated as relative one. Thinking about this as 2nd path is
an absolute path from the mountpoint specified in the 1st.
--
anatoly t.


More information about the Python-ideas mailing list