On 9 October 2012 06:41, Greg Ewing
Antoine Pitrou wrote:
But you really want a short method name, otherwise it's better to have a dedicated operator. joinpath() definitely doesn't cut it, IMO.
I agree, it's far too longwinded. It would clutter your code just as badly as using os.path.join() all over the place does now, but without the option of aliasing it to a shorter name.
Good point - the fact that it's not possible to alias a method name means that it's important to get the name right if we're to use a method, because we're all stuck with it forever. Because of that, I'm much more reluctant to "just put up with" Path.pathjoin on the basis that it's better than any other option. Are there any libraries that use a method on a path object (or something similar - URL objects, maybe) and if so, what method name did they use? I'd like to see what real code using any proposed method name would look like. As a point of reference, twisted's FilePath class uses "child". Paul