diff --git a/README.md b/README.md index e7cfac7..15b63a8 100644 --- a/README.md +++ b/README.md @@ -1685,15 +1685,15 @@ from pathlib import Path = Path() # Returns relative CWD. Also Path('.'). = Path.cwd() # Returns absolute CWD. Also Path().resolve(). = Path.home() # Returns user's home directory (absolute). - = Path(__file__).resolve() # Returns script's path if CWD wasn't changed. + = Path(__file__).resolve() # Returns module's path if CWD wasn't changed. ``` ```python = .parent # Returns Path without the final component. = .name # Returns final component as a string. - = .stem # Returns final component without extension. - = .suffix # Returns final component's extension. - = .parts # Returns all components as strings. + = .stem # Returns final component w/o last extension. + = .suffix # Returns last extension prepended with a dot. + = .parts # Returns all path's components as strings. ``` ```python diff --git a/index.html b/index.html index 50615d1..85c60f0 100644 --- a/index.html +++ b/index.html @@ -1427,13 +1427,13 @@ args = p.parse_args() <Path> = Path() # Returns relative CWD. Also Path('.'). <Path> = Path.cwd() # Returns absolute CWD. Also Path().resolve(). <Path> = Path.home() # Returns user's home directory (absolute). -<Path> = Path(__file__).resolve() # Returns script's path if CWD wasn't changed. +<Path> = Path(__file__).resolve() # Returns module's path if CWD wasn't changed.
<Path> = <Path>.parent              # Returns Path without the final component.
 <str>  = <Path>.name                # Returns final component as a string.
-<str>  = <Path>.stem                # Returns final component without extension.
-<str>  = <Path>.suffix              # Returns final component's extension.
-<tup.> = <Path>.parts               # Returns all components as strings.
+<str>  = <Path>.stem                # Returns final component w/o last extension.
+<str>  = <Path>.suffix              # Returns last extension prepended with a dot.
+<tup.> = <Path>.parts               # Returns all path's components as strings.
 
<iter> = <Path>.iterdir()           # Returns directory contents as Path objects.
 <iter> = <Path>.glob('<pattern>')   # Returns Paths matching the wildcard pattern.