title: Python - Class variables vs dictionary of values
body: <p>Lets say I've got a class which represents an object that has many properties (simple data types like strings and integers). Should they be represented as instance variables or would the better "pythonic" be to put them into a dictionary?</p>
  
  <p>For example: </p>
  
  <pre><code>class FruitBasket:
      def __init__(self,apples, oranges, bananas, pears): #number of apples, oranges etc...
          self.apples = apples
          self.oranges = oranges
          self.bananas = bananas
          self.pears = pears
  
  
  
  class FruitBasket:
      def __init__(self, fruits): #fruits is a dictionary
          self.fruits = fruits
  </code></pre>