How to document a Python variable?
<p>How can I document a variable in Python. In JavaScript / JSDoc I can do something like that.:</p>

<pre><code>/** @type {Array&lt;Number&gt;} */
var foo;
/** @type {Number[]} */
var bar;
</code></pre>

<p>Some IDEs than can give better code completion.</p>

<p>Is this also possible in Python?</p>

<p><code>x, y, z = [], [], [] # type: (List[int], List[int], List[str])</code> is how it is defined in the spec ... your particular IDE may or may not implement it in this way ...</p>

<p>see also: <a href="https://www.python.org/dev/peps/pep-0484/#type-comments" rel="nofollow">https://www.python.org/dev/peps/pep-0484/#type-comments</a></p>

python documentation