on 25.07.2005 10:44 Michael Hoffman said the following: > Reinhold Birkenfeld wrote: >>Tony Meyer wrote: >>>Do people really like using __div__ to mean join? >>Of course, one can use joinwith() if he doesn't like '/'. > Personally, I'm -0 on __div__, but I suppose if anyone here claimed to > have used in the past, rather than it just being some novelty that might > be a good idea, that would be good enough for keeping it.
I, herewith, claim to have used it in the past. But I am indifferent as to if its needed, it just looks natural to me. What I use quite often is:: path(__file__).dirname() / "somesiblingfileiknowisthere" you do not have to think about trailing slashes or absolute vs. relative. and its much better than:: from os.path import * join(dirname(__file__), "somesiblingfileiknowisthere") __div__ is actually very convenient to "build" / "a" / "very" / "very" / "long" / "path" (of course assuming the parts are strings not known initially...) -- http://mail.python.org/mailman/listinfo/python-list