title: How can I change directory with Python pathlib
body: <p>What is the intended way to change directory using the Python <code>pathlib</code> <a href="https://docs.python.org/3/library/pathlib.html" rel="noreferrer">(Documentation)</a> functionality?</p>
  
  <p>Lets assume I create a <code>Path</code> object as follows:</p>
  
  <pre><code>from pathlib import Path
  path = Path('/etc')
  </code></pre>
  
  <p>Currently I just know the following, but that seems to undermine the idea of <code>pathlib</code>.</p>
  
  <pre><code>import os
  os.chdir(str(path))
  </code></pre>