From d79251168de5eec3b483e852921bc236d0b6775a Mon Sep 17 00:00:00 2001 From: Prodesire Date: Sat, 27 Jan 2018 11:07:56 +0800 Subject: [PATCH] update description about path.is_super_path --- docs/path.rst | 4 ++-- pydu/path.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/path.rst b/docs/path.rst index fbcd8c9..b0ca341 100644 --- a/docs/path.rst +++ b/docs/path.rst @@ -16,8 +16,8 @@ Path Note that if ``path1`` is same as ``path2``, it's also regarded as the super path os ``path2``. - For instance "/opt" is the super path of "/opt/test", - While "/opt/t" is the super path of "/opt/test" + For instance "/", "/opt" and "/opt/test" are all the super paths of "/opt/test", + while "/opt/t" is the super path of "/opt/test". >>> from pydu.path import is_super_path >>> is_super_path('/aa/bb/cc', '/aa/bb/cc') diff --git a/pydu/path.py b/pydu/path.py index 16197c8..ceecc5c 100644 --- a/pydu/path.py +++ b/pydu/path.py @@ -18,8 +18,8 @@ def is_super_path(path1, path2): Whether `path1` is the super path of `path2`. Note that if `path1` is same as `path2`, it's also regarded as the super path os `path2`. - For instance "/opt" is the super path of "/opt/test", - While "/opt/t" is the super path of "/opt/test" + For instance "/", "/opt" and "/opt/test" are all the super paths of "/opt/test", + while "/opt/t" is the super path of "/opt/test". """ path1 = os.path.normpath(path1) current_path2 = os.path.normpath(path2)