title: Should a class convert types of the parameters at init time? If so, how?
body: <p>I've defined a class with 5 instance variables</p>
  
  <pre><code>class PassPredictData:
      def __init__(self, rating, name, lat, long, elev):
          self.rating = rating
          # rest of init code
  </code></pre>
  
  <p>I want to ensure:</p>
  
  <ul>
  <li><code>rating</code> is an int</li>
  <li><code>name</code> is a str</li>
  <li><code>lat</code>, <code>long</code>, <code>elev</code> are floats</li>
  </ul>
  
  <p>When reading my input file, everything works creating a list of objects based on my class. When I start comparing values I got weird results since the instance variables were still strings.</p>
  
  <p>Is the "most Pythonic way" to cast the values as the object is being created using <code>int(string)</code> and <code>float(string)</code> when calling the constructor or should this casting be done with logic inside the class?</p>