title: How to document python function parameter types?
body: <p>I know that the parameters can be any object but for the documentation it is quite important to specify what you would expect.</p>
  
  <p>First is how to specify a parameter types like these below?</p>
  
  <ul>
  <li><code>str</code> (or use <code>String</code> or <code>string</code>?)</li>
  <li><code>int</code></li>
  <li><code>list</code></li>
  <li><code>dict</code></li>
  <li>function()</li>
  <li><code>tuple</code></li>
  <li>object instance of class <code>MyClass</code></li>
  </ul>
  
  <p>Second, how to specify params that can be of multiple types like a function that can handle a single parameter than can be <code>int</code> or <code>str</code>?</p>
  
  <p>Please use the below example to demonstrate the syntax needed for documenting this with your proposed solution. Mind that it is desired to be able to hyperlink reference to the "Image" class from inside the documentation. </p>
  
  <pre><code>def myMethod(self, name, image):
      """
      Does something ...
  
      name String: name of the image
      image Image: instance of Image Class or a string indicating the filename.
  
      Return True if operation succeeded or False.
      """
      return True
  </code></pre>
  
  <p>Note, you are welcome to suggest the usage of any documentation tool (sphinx, oxygen, ...) as long it is able to deal with the requirements. </p>
  
  <h2>Update:</h2>
  
  <p>It seams that there is some kind of support for documenting parameter types in doxygen in. general. The code below works but adds an annoying $ to the param name (because it was initially made for php).</p>
  
  <pre><code>    @param str $arg description
      @param str|int $arg description
  </code></pre>