title: How do I determine what to put inside the __init__ function in a python class?
body: <p>So I understand how to use <a href="https://stackoverflow.com/questions/8609153/why-do-we-use-init-in-python-classes">init</a> when defining a class in Python. However, I am confused as to what to put inside the init function, or if I should use it at all. For example:</p>
  
  <p>Here I make the user define concept when the class is instantiated:</p>
  
  <pre><code>class Fruit(object):
      def __init__(self, concept):
          self.concept = concept
  </code></pre>
  
  <p>But I could also do this, and the user can just change the concept attribute themselves:</p>
  
  <pre><code>class Fruit(object):
      def __init__(self):
          self.concept = "I am a fruit"
  </code></pre>
  
  <p>Or I could just abandon the <strong>init</strong> function altogether:</p>
  
  <pre><code>class Fruit(object):
      concept = "I am a fruit"
  </code></pre>
  
  <p>In each of these examples, I can change the concept attribute as such</p>
  
  <pre><code>test = Fruit()
  test.concept = 'Whatever I want'
  </code></pre>
  
  <p>So I'm not sure why I use the init function in the first place. It seems to only be convenient for defining all the attributes up front.</p>
  
  <p>Moreover, how do I know what to put inside an init function and what to just define outside of the init?</p>