title: why is defining an object variable outside of __init__ frowned upon?
body: <p>I sometimes define an object variable outside of <code>__init__</code>. <code>plint</code> and my IDE (PyCharm) complain.</p>
  
  <pre><code>class MyClass():
      def __init__(self):
          self.nicevariable = 1   # everyone is happy
  
      def amethod(self):
          self.uglyvariable = 2   # everyone complains
  </code></pre>
  
  <p><code>plint</code> output:</p>
  
  <pre><code>W:  6, 8: Attribute 'uglyvariable' defined outside __init__ (attribute-defined-outside-init)
  </code></pre>
  
  <p>Why is this a incorrect practice?</p>