[Python-ideas] os.path.isparent and os.path.ischild
Chris Rebert
pyideas at rebertia.com
Fri Jul 8 02:30:29 CEST 2011
> From: John O'Connor [jxo6948 at rit.edu]
<snip>
> What about is{ancestor, descendant}() ?
>
>>>> isancestor('/a', '/a/b/c')
> True
>>>> isparent('/a', '/a/b/c')
> False
On Thu, Jul 7, 2011 at 4:45 PM, Brendan Moloney <moloney at ohsu.edu> wrote:
> Why provide two functions instead of just something like innested and allow the user to switch the arguments?
<satire>
Why provide pairs of comparison operators [(>, <), (>=, <=)] instead
of just one from each pair? The user can always switch the arguments
themself.
</satire>
Cheers,
Chris
More information about the Python-ideas
mailing list