[path-PEP] Path inherits from basestring again

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Mon Aug 1 03:51:53 EDT 2005


phil hunt wrote:
> On Sun, 31 Jul 2005 09:48:45 +0200, Reinhold Birkenfeld <reinhold-birkenfeld-nospam at wolke7.net> 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



More information about the Python-list mailing list