File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1655,7 +1655,7 @@ from pathlib import Path
1655
1655
1656
1656
``` python
1657
1657
< Path> = Path(< path> [, ... ]) # Accepts strings, Paths and DirEntry objects.
1658
- < Path> = < path> / < path> [/ ... ] # One of the two paths must be a Path object.
1658
+ < Path> = < path> / < path> [/ ... ] # First or second path must be a Path object.
1659
1659
```
1660
1660
1661
1661
``` python
@@ -1674,7 +1674,7 @@ from pathlib import Path
1674
1674
```
1675
1675
1676
1676
``` python
1677
- < iter > = < Path> .iterdir() # Returns dir contents as Path objects.
1677
+ < iter > = < Path> .iterdir() # Returns directory contents as Path objects.
1678
1678
< iter > = < Path> .glob(' <pattern>' ) # Returns Paths matching the wildcard pattern.
1679
1679
```
1680
1680
Original file line number Diff line number Diff line change 54
54
55
55
< body >
56
56
< header >
57
- < aside > February 17 , 2022</ aside >
57
+ < aside > February 27 , 2022</ aside >
58
58
< a href ="https://gto76.github.io " rel ="author "> Jure Šorn</ a >
59
59
</ header >
60
60
1400
1400
</ code > </ pre > </ div >
1401
1401
1402
1402
< pre > < code class ="python language-python hljs "> <Path> = Path(<path> [, ...]) < span class ="hljs-comment "> # Accepts strings, Paths and DirEntry objects.</ span >
1403
- <Path> = <path> / <path> [/ ...] < span class ="hljs-comment "> # One of the two paths must be a Path object.</ span >
1403
+ <Path> = <path> / <path> [/ ...] < span class ="hljs-comment "> # First or second path must be a Path object.</ span >
1404
1404
</ code > </ pre >
1405
1405
< pre > < code class ="python language-python hljs "> <Path> = Path() < span class ="hljs-comment "> # Returns relative cwd. Also Path('.').</ span >
1406
1406
<Path> = Path.cwd() < span class ="hljs-comment "> # Returns absolute cwd. Also Path().resolve().</ span >
1413
1413
<str> = <Path>.suffix < span class ="hljs-comment "> # Returns final component's extension.</ span >
1414
1414
<tup.> = <Path>.parts < span class ="hljs-comment "> # Returns all components as strings.</ span >
1415
1415
</ code > </ pre >
1416
- < pre > < code class ="python language-python hljs "> <iter> = <Path>.iterdir() < span class ="hljs-comment "> # Returns dir contents as Path objects.</ span >
1416
+ < pre > < code class ="python language-python hljs "> <iter> = <Path>.iterdir() < span class ="hljs-comment "> # Returns directory contents as Path objects.</ span >
1417
1417
<iter> = <Path>.glob(< span class ="hljs-string "> '<pattern>'</ span > ) < span class ="hljs-comment "> # Returns Paths matching the wildcard pattern.</ span >
1418
1418
</ code > </ pre >
1419
1419
< pre > < code class ="python language-python hljs "> <str> = str(<Path>) < span class ="hljs-comment "> # Returns path as a string.</ span >
2884
2884
2885
2885
2886
2886
< footer >
2887
- < aside > February 17 , 2022</ aside >
2887
+ < aside > February 27 , 2022</ aside >
2888
2888
< a href ="https://gto76.github.io " rel ="author "> Jure Šorn</ a >
2889
2889
</ footer >
2890
2890
You can’t perform that action at this time.
0 commit comments