[Python-ideas] os.path.isparent and os.path.ischild

Paul Colomiets paul at colomiets.name
Wed Jul 13 23:39:23 CEST 2011


Hi,

On Fri, Jul 8, 2011 at 2:08 AM, Giampaolo Rodolà <g.rodola at gmail.com> wrote:
>>>> isparent('/a', '/a/b')
> True
>>>> ischild('/a/b', '/a')
> True

Do you mean:

>>> '/a' == dirname('/a/b')
True
>>> dirname('/a/b') == '/a'
True

I do not think it's harder to write.

-- 
Paul



More information about the Python-ideas mailing list