title: Setting default/empty attributes for user classes in __init__
body: <p>I have a decent level of programming, and get much value from the community here. However I have never had much academic teaching in programming nor worked next to really experienced programmers. Consequently I sometimes struggle with 'best practice'.</p>
  <p>Question:</p>
  <p>When I am creating a new class, should I set all instance attributes in <code>__init__</code>, even if they are <code>None</code> and in fact later assigned values in class methods?</p>
  <p>See example below for the attribute <code>results</code> of <code>MyClass</code>:</p>
  <pre><code>class MyClass:
      def __init__(self,df):
            self.df = df
            self.results = None
  
      def results(df_results):
           #Imagine some calculations here or something
           self.results = df_results
  </code></pre>
  <p>I have found in other projects, class attributes can get buried when they only appear in class methods and there is a lot going.</p>
  <p>So to an experienced professional programmer what is standard practice for this? Would you define all instance attributes in <code>__init__</code> for readability?</p>
  <p>And if anyone has any links for materials on where I can find such principles then please put them in an answer, it will be much appreciated. I know about PEP-8 and have already searched my question above several times, and cant find anyone touching on this.</p>
  <p>Thanks</p>
  <p>Andy</p>