title: How do I ensure parameter is correct type in Python?
body: <p>I'm new to Python, and am trying to figure out if there is a way to specify the variable type in a parameter definition.  For example:</p>
  
  <pre><code>def function(int(integer))
  </code></pre>
  
  <p>as opposed to:</p>
  
  <pre><code>def function(integer)
      int(integer)
  </code></pre>
  
  <p>I know it's not a major difference, but I'm trying to use good programming practices here, and if I'm defining a function with a large number of parameters, it could get messy.</p>