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

Eric V. Smith eric at trueblade.com
Thu Jul 14 11:51:49 CEST 2011


On 7/13/2011 10:49 PM, Greg Ewing wrote:
> Paul Colomiets wrote:
>>> Do you mean:
>>>>>>> dirname('/a/b') == '/a'
>>>> True
>> It's not so easy if you want isparent("/a", "/a/b/c") to
> be true as well.

Then isparent() seems like a bad name. isancestor(), maybe?
Not that I think it needs to be added to the stdlib.


More information about the Python-ideas mailing list

AltStyle によって変換されたページ (->オリジナル) /