From de13783e2e3ce70296c7e480996df93d7b4da4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 25 Oct 2020 15:06:21 +0100 Subject: [PATCH] Path --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db78068..aea9d8d 100644 --- a/README.md +++ b/README.md @@ -1640,8 +1640,8 @@ from pathlib import Path ```python = Path() # Returns relative cwd. Also Path('.'). = Path.cwd() # Returns absolute cwd. Also Path().resolve(). - = .resolve() # Returns absolute Path without symlinks. = Path.home() # Returns user's home directory. + = Path(__file__).resolve() # Returns script's path if cwd wasn't changed. ``` ```python diff --git a/index.html b/index.html index af96c1c..8da2457 100644 --- a/index.html +++ b/index.html @@ -1518,8 +1518,8 @@ value = args.<name>
<Path> = Path()                     # Returns relative cwd. Also Path('.').
 <Path> = Path.cwd()                 # Returns absolute cwd. Also Path().resolve().
-<Path> = <Path>.resolve()           # Returns absolute Path without symlinks.
 <Path> = Path.home()                # Returns user's home directory.
+<Path> = Path(__file__).resolve()   # Returns script's path if cwd wasn't changed.
 
<Path> = <Path>.parent              # Returns Path without final component.
 <str>  = <Path>.name                # Returns final component as a string.