title: Typerror: unorderable types
body: <p>I'm writing a class for temperatures and I'm trying to compare if temp1>temp2 and so on.</p>
  
  <p>This is part of the code for one of the function definitions that's supposed to handle comparisons.</p>
  
  <pre><code> def __eq__(self, other):
      if self.__valid==True and other.__valid==True:
          if self.__scale==other.__scale:
              if self.__mag==other.__mag:
                  return True
              else:
                  return False
              #if self.__mag&gt;other.__mag:
                  #return True
              #else:
                  #return False
              #if self.__mag&gt;=other.__mag:
                  #return True
              #else:
                  #return False
          else:
              if self.__scale=="C":
                  A=other.celsius()
                  if self.__mag==A.__mag:
                      return True
                  else:
                      return False
  
              if self.__scale=="F":
                  B=other.fahrenheit()
                  if self.__mag==B.__mag:
                      return True
                  else:
                      return False
  
  
  
      else:
          return False
  </code></pre>
  
  <p>But when I do:</p>
  
  <pre><code>A=Temperature(37.0, "C")&lt;br&gt;
  B=Temperature(30.0, "C")&lt;br&gt;
  print(A&gt;B)
  </code></pre>
  
  <p>I get an error: </p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\owner\Desktop\temperature.py", line 218, in &lt;module&gt;
      print(A&gt;B)
  TypeError: unorderable types: Temperature() &gt; Temperature()
  </code></pre>
  
  <p>I'm trying to compare the magnitudes of the two but this is an ongoing issue.</p>