title: In python, how does one test if a string-like object is mutable?
body: <p>I have a function that takes a string-like argument.</p>
  
  <p>I want to decide if I can safely store the argument and be sure that it won't change. So I'd like to test if it's mutable, e.g the result of a <code>buffer()</code> built from an <code>array.array()</code>, or not.</p>
  
  <p>Currently I use:</p>
  
  <pre><code>type(s) == str
  </code></pre>
  
  <p>Is there a better way to do it?</p>
  
  <p>(copying the argument is too costly, that's why I want to avoid it)</p>