title: __getattr__ going recursive in python
body: <p>I have the declared a class in following way</p>
  
  <pre><code>class A:
      def __init__(self, list_1, list_2):
          self.list1 = list_1
          self.list2 = list_2
  
      def __getattr__(self, item):
          if item in self.list1: return "It is in list 1"
          elif item in self.list2: return "It is in list 2"
          else: return "It is in neither list 1 nor list 2"
  </code></pre>
  
  <p>Here when I am adding <code>__setattr__</code> <code>self.list</code>1 goes recursive, since <code>__getattr__</code> get called after every <code>self.list1</code> and this recursion is unstoppable. Can you please help me out with it. I need to implement like this.</p>
  
  <p>Thanks</p>