title: Using ordered dictionary as ordered set
body: <p>Now that Python 3.7 makes order-preserving dicts <a href="https://docs.python.org/3/whatsnew/3.7.html" rel="noreferrer">officially part of the language spec</a> instead of an implementation detail, I've been trying to wrap my head around how best to use this property. Today, I've found I needed an order preserving set and think the dictionary might do the trick.</p>
  
  <p>Suppose we have a list of hashable element. We want a list of unique entries and we want to keep the order of these entries based on first appearance. A simple dictionary constructor should do the trick:</p>
  
  <pre><code>ls = "Beautiful is better than ugly. Explicit..."
  uniques = list({s:0 for s in ls})
  
  &gt;&gt;&gt; ['B', 'e', 'a', 'u', 't', 'i', 'f', 'l', ' ', 's', 'b', 'r', 'h', 'n', 'g', 'y', '.', 'E', 'x', 'p', 'c']
  </code></pre>
  
  <p>This will preserve the ordering by first appearance and get rid of all duplicates.</p>
  
  <p>I'd like to know what the community thinks of this use case and the order preserving feature in general.  </p>
  
  <ul>
  <li>Is there any reason this method shouldn't be used?</li>
  <li>Are there better ways to solve this problem? </li>
  <li>Is this method Pythonic?</li>
  </ul>
  
  <p>Reading through the Zen of Python, I am conflicted. The method is simple but relies on implicit ordering.</p>
  
  <p>Please let me know what you think. Thank you.</p>