Truth value of empty set : <p>I am interested in the truth value of Python sets like <code>{'a', 'b'}</code>, or the empty set <code>set()</code> (which is not the same as the empty dictionary <code>{}</code>). In particular, I would like to know whether <code>bool(my_set)</code> is <code>False</code> if and only if the set <code>my_set</code> is empty.</p>

<p>Ignoring primitive (such as numerals) as well as user-defined types, <a href="https://docs.python.org/3/library/stdtypes.html#truth" rel="noreferrer">https://docs.python.org/3/library/stdtypes.html#truth</a> says:</p>

<blockquote>
  <p>The following values are considered false:</p>
  
  <ul>
  <li>[...]</li>
  <li>any empty sequence, for example, <code>''</code>, <code>()</code>, <code>[]</code>.</li>
  <li>any empty mapping, for example, <code>{}</code>.</li>
  <li>[...]</li>
  </ul>
  
  <p>All other values are considered true</p>
</blockquote>

<p>According to <a href="https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range" rel="noreferrer">https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range</a>, a set is not a sequence (it is unordered, its elements do not have indices, etc.):</p>

<blockquote>
  <p>There are three basic sequence types: lists, tuples, and range objects.</p>
</blockquote>

<p>And, according to <a href="https://docs.python.org/3/library/stdtypes.html#mapping-types-dict" rel="noreferrer">https://docs.python.org/3/library/stdtypes.html#mapping-types-dict</a>,</p>

<blockquote>
  <p>There is currently only one standard mapping type, the <em>dictionary</em>.</p>
</blockquote>

<p>So, as far as I understand, the set type is not a type that can ever be <code>False</code>. However, when I try, <code>bool(set())</code> evaluates to <code>False</code>.</p>

<p>Questions:</p>

<ul>
<li>Is this a documentation problem, or am I getting something wrong?</li>
<li>Is the empty set the only set whose truth value is <code>False</code>?</li>
</ul>
