
T.B. wrote:
A small problem I see with 'add' (and with 'append') is that the outcome of adding (or appending) an absolute path is too surprising, unlike with the 'join' or 'joinpath' names.
I don't think it's any less surprising with "join" -- when you join two things, you just as much expect both of them to be part of the result.
There doesn't seem to be any concise term that encompasses all the nuances of the operation. Using an arbitrarily chosen operator would at least have the advantage of sidestepping the whole concern.
Programmer 1: "Hey, what does ^ do on path objects?"
Programmer 2: "It concatenates them with a path separator between, except when the second one is an absolute path, in which case it just returns the second one."
Programmer 1: "That's so obscure. Why didn't they just define a concat_with_pathsep_or_second_if_absolute() method... oh, wait, I think I see..."