phil hunt wrote: > On Sun, 31 Jul 2005 09:48:45 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> > wrote: >>> >>> An improvement to what? To how the class is implemented, or to how >>> it is used? >> >>No, the second function is cleaner and more readable than the first, >>IMHO. > > True, but the first function, at all of seven lines, is hardly > complicated. I mean, if anyone couldn't understand it, they'd never > make a programmer. > >>> If you mean the former, yes is it, due to the os.path module not >>> providing a function that does this. >>> >>> If you mean the latter, I disagree, because I would then have to >>> call it with something like: >>> >>> pn = normalizePath(Path(p), q) >> >>That's easily helped by s/tp = p/tp = Path(p)/. > > I have no idea what that comment means.
That's short for "replace 'tp = p' by 'tp = Path(p)". sed-lingo ;) Reinhold -- http://mail.python.org/mailman/listinfo/python-list