Skip to content

Commit b2242cb

Browse files
committed
Finished editing path
1 parent 493e5f0 commit b2242cb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,13 +1626,13 @@ from pathlib import Path
16261626
```
16271627

16281628
```python
1629-
<str> = str(<Path>) # Returns Path as a string.
1630-
<file> = open(<Path>) # Opens the file and returns a file object.
1629+
<iter> = <Path>.iterdir() # Returns dir contents as Path objects.
1630+
<iter> = <Path>.glob('<pattern>') # Returns Paths matching the wildcard pattern.
16311631
```
16321632

16331633
```python
1634-
<iter> = <Path>.iterdir() # Returns dir contents as Path objects.
1635-
<iter> = <Path>.glob('<pattern>') # Returns Paths matching the wildcard pattern.
1634+
<str> = str(<Path>) # Returns path as a string.
1635+
<file> = open(<Path>) # Opens the file and returns a file object.
16361636
```
16371637

16381638

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,12 +1486,12 @@
14861486
&lt;str&gt; = &lt;Path&gt;.suffix <span class="hljs-comment"># Returns final component's extension.</span>
14871487
&lt;tup.&gt; = &lt;Path&gt;.parts <span class="hljs-comment"># Returns all components as strings.</span>
14881488
</code></pre>
1489-
<pre><code class="python language-python hljs">&lt;str&gt; = str(&lt;Path&gt;) <span class="hljs-comment"># Returns Path as a string.</span>
1490-
&lt;file&gt; = open(&lt;Path&gt;) <span class="hljs-comment"># Opens the file and returns a file object.</span>
1491-
</code></pre>
14921489
<pre><code class="python language-python hljs">&lt;iter&gt; = &lt;Path&gt;.iterdir() <span class="hljs-comment"># Returns dir contents as Path objects.</span>
14931490
&lt;iter&gt; = &lt;Path&gt;.glob(<span class="hljs-string">'&lt;pattern&gt;'</span>) <span class="hljs-comment"># Returns Paths matching the wildcard pattern.</span>
14941491
</code></pre>
1492+
<pre><code class="python language-python hljs">&lt;str&gt; = str(&lt;Path&gt;) <span class="hljs-comment"># Returns path as a string.</span>
1493+
&lt;file&gt; = open(&lt;Path&gt;) <span class="hljs-comment"># Opens the file and returns a file object.</span>
1494+
</code></pre>
14951495
<div><h2 id="oscommands"><a href="#oscommands" name="oscommands">#</a>OS Commands</h2><div><h3 id="filesanddirectories">Files and Directories</h3><ul>
14961496
<li><strong>Paths can be either strings, Paths, or DirEntry objects.</strong></li>
14971497
<li><strong>Functions report OS related errors by raising either OSError or one of its <a href="#exceptions-1">subclasses</a>.</strong></li>

0 commit comments

Comments
 (0)