title: When trying to run a method, get 'NoneType is not callable'
body: <p>I'm new to programming so please be gentle. Over the past few days or so I've messed around with the code trying to get it to work, and I've done a lot of research (well, a lot for me I guess) in and out of stackoverflow, so hopefully I won't be repeating a question for the billionth time.
  Also, my apologies for the poor and probably difficult to read code. I'm doing this to teach myself about using classes and methods.</p>
  
  <p>The problem is somewhere between <code>return self.rm3</code> in the rm1 method, and the code for rm3 itself.</p>
  
  <p>My code is this:</p>
  
  <pre><code>from sys import exit
  from random import randint
  
  def death():
      print 'You are "dead", I guess.'
      exit(0)
  
  def inp(prompt='What do you do? '):
      to_return = raw_input(prompt).lower()
      if to_return == 'q' or to_return == 'quit':
          print "Bye now~"
          exit(0)
      else:
          return to_return
  
  class Rooms(object):
      def __init__(self):
          current_room = self.rm1
          self.items = []
          while True:
              current_room = current_room()
      def rm1(self):
          print "=== You are in Room 1 ==="
          print "You are in a dark room."
          print "Obvious exits are east and south."
          while True:
              choice = inp()
              if choice == "east":
                  return self.rm2
              elif choice == "south":
                  return self.rm3
              elif choice == "look":
                  return self.rm1
      def rm2(self):
          print "=== You are in Room 2 ==="
          if "haircomb" not in self.items:
              print "There is a high-tech looking keypad on the southernly wall,"
              print "next to the door."
              print "Upon closer inspection there are not numbers, but three"
              print "letters on the keypad: A, M, and Z."
              print "Do you try to guess the code?"
          print "Obvious exits are west and south."
          while True:
              choice = inp()
              if "guess code" in choice and "haircomb" not in self.items:
                  return self.rm2guess
              elif choice == "west":
                  return self.rm1
              elif choice == "south" and "haircomb" not in self.items:
                  print "The door is firmly locked."
              elif choice == "south" and "haircomb" in self.items:
                  return self.rm4
              elif choice == "look":
                  return self.rm2
      def rm2guess(self):
          correct_answer = randint(1,3)
          guesses_left = 2
          print "You approach the keypad."
          while True:
              guess = inp("Which key do you press? ").lower()
              if guess == "a" or guess == "m" or guess == "z":
                  if guess == "a":
                      guess = 1
                  elif guess == "m":
                      guess = 2
                  elif guess == "z":
                      guess = 3
                  if guess == correct_answer:
                      print "The machine whirrs and then beeps."
                      print "The southernly door seems to be open now."
                      print "Suddenly, a haircomb falls from the bottom of the "
                      print "keypad. You take it."
                      self.items.append("haircomb")
                      return self.rm2
                  elif guess != correct_answer and guesses_left &gt; 0:
                      print "The machine whirrs and clicks %s times." \
                                                          % guesses_left
                      guesses_left -= 1
                  elif guess != correct_answer and guesses_left == 0:
                      print "An alarm goes off and the police pick you up."
                      print "You are put on death row, because you live under a"
                      print "horrible dictatorship."
                      death()
              else:
                  print "That ain't no key on the pad, yo."
      def rm3(self):
          def __init__(self):
              if "coin" not in self.items:
                  print "You come into a room. A man stands at the doorway."
                  print "He tells you that in order to pass the door, you need to"
                  print "guess which hand holds the coin."
                  print "Do you try to guess?"
              print "Obvious exits are east and north."
              while True:
                  choice = inp()
                  if "guess" in choice:
                      return self.rm3guess
                  elif choice == "north":
                      return self.rm1
      def rm4(self):
          def __init__(self):
              print "room 4"
              raw_input
              return self.rm4
      def rm5(self):
          pass
      def rm6(self):
          pass
  
  game = Rooms()
  </code></pre>
  
  <p>Output when running and typing in 'south' is:</p>
  
  <pre><code>=== You are in Room 1 ===
  You are in a dark room.
  Obvious exits are east and south.
  What do you do? south
  Traceback (most recent call last):
    File "ta.py", line 141, in &lt;module&gt;
      game = Rooms()
    File "ta.py", line 44, in __init__
      current_room = current_room()
  TypeError: 'NoneType' object is not callable
  
  shell returned 1
  </code></pre>
  
  <p>I'm not sure how such an error could happen? Why is the method rm3 a None type when it's obviously defined in the class?</p>