title: How to serialize a python dict to text, in a human-readable way?
body: <p>I have an python <code>dict</code> whose keys and values are strings, integers and other dicts and tuples (<a href="https://stackoverflow.com/q/7001606/850781">json does not support those</a>). I want to save it to a text file and then read it from the file.
  <strong>Basically, I want a <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rd_rd.htm" rel="nofollow noreferrer"><code>read</code></a> counterpart to the built-in <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_wr_pr.htm" rel="nofollow noreferrer"><code>print</code></a></strong> (like in Lisp).</p>
  
  <p>Constraints:</p>
  
  <ol>
  <li>the file must be human readable (thus <a href="https://docs.python.org/2/library/pickle.html" rel="nofollow noreferrer">pickle</a> is out)</li>
  <li>no need to detect circularities.</li>
  </ol>
  
  <p>Is there anything better than <a href="https://docs.python.org/2/library/json.html" rel="nofollow noreferrer">json</a>?</p>