pathlib Path `write_text` in append mode : <p>Is there a shortcut for python <code>pathlib.Path</code> objects to <code>write_text()</code> in append mode? </p>

<p>The standard <a href="https://docs.python.org/3/library/functions.html#open" rel="noreferrer"><code>open()</code></a> function has <code>mode="a"</code> to open a file for writing and appending to the file if that file exists, and a <code>Path</code>s <a href="https://docs.python.org/3/library/pathlib.html#pathlib.Path.open" rel="noreferrer"><code>.open()</code></a> function seems to have the same functionality (<code>my_path.open("a")</code>). </p>

<p>But what about the handy <code>.write_text('..')</code> shortcut, is there a way to use <code>pathlib</code> to open and append to a file with just doing the same things as with <code>open()</code>? </p>

<p>For clarity, I can do</p>

<pre class="lang-py prettyprint-override"><code>with my_path.open('a') as fp:
    fp.write('my text')
</code></pre>

<p>but is there another way?  </p>

<p><code>my_path.write_text('my text', mode='a')</code></p>
