title: setting attributes outside of class
body: <p>so I have a class,</p>
  
  <pre><code>class Interval:  
      def __init__(self, min, max):
          self.min = min 
          self.max = max
          self.compare_mode = None 
  
      def min_max(min, max = None)-&gt; 'Interval Object':
          '''Code to return properly initialized Interval Object
          '''
          ...
          return Interval(min, max)
  </code></pre>
  
  <p>this is just the main parts of my class for my questions. Here I have two properly initialized Interval objects </p>
  
  <pre><code>l = Interval.min_max(1.0,5.0)
  r = Interval.min_max(4.0,6.0)
  </code></pre>
  
  <p>now I am trying to just update the class' self.compare_mode attribute by just binding certain strings to it with the following code:</p>
  
  <pre><code>Interval.compare_mode = 'liberal'
  </code></pre>
  
  <p>now when I print out the value from outside the class using <code>print(Interval.compare_mode)</code>
  it looks like the value is bounded but when I try access this string from other methods within my Interval class it still initialed to None. I just want to update the class' compare_mode attribute after the Interval objects are created using <code>Interval.compare_mode = 'some string'</code> at any point this code is initiated. </p>