title: how to get attribute information through another attribute in a class
body: <p>I have a class like this:</p>
  <pre><code>class School:
      instances = []
      def __init__(self, name, number, hour, income):
          self.__class__.instances.append(weakref.proxy(self))
          self.name = name
          self.number = number
          self.hour = hour
          self.income = income
  </code></pre>
  <p>And an instance like this:</p>
  <p><code>n1 = School('Namjoo', 114, 50, 30)</code></p>
  <p>how can I extract the name attribute by having <code>114</code>, <code>50</code> or <code>30</code>?</p>
  <p>I can't use a dictionary as not all the data stays unique</p>