Do union types actually exist in python?
<p>Since python is dynamically typed, of course we can do something like this:</p>

<pre><code>def f(x):
    return 2 if x else "s"
</code></pre>

<p>But is this the way python was actually intended to be used? Or in other words, do union types exist in the sense they do in Racket for example? Or do we only use them like this:</p>

<pre><code>def f(x):
    if x:
        return "s"
</code></pre>

<p>where the only "union" we need is with None?</p>