<i>Also, Python is getting header files (called &quot;stub&quot; files), like C. In most modern languages, such as Go and Rust, that&#x27;s all handled automatically by storing type info in the object files. But in future Python, that will be manual.</i><p>Stub files are not mandatory; type annotations <i>can</i> be in the same file as the code. This is perfectly legal, for example:<p><pre><code>    def add(first_value: int, second_value: int) -&gt; int:
        return first_value + second_value
</code></pre>
Stub files exist because the syntax support didn&#x27;t exist in earlier versions of Python, so if you write a library that supports older versions of Python you ship a stub file rather than causing syntax errors for a subset of your users.