title: Python instance has no __call__ method
body: <p>I've been learning how to use Python for the better part of today after giving up on an ugly bash script. </p>
  
  <p>I'm trying to use 2 classes to define a few arrays of objects in which to store some unique strings and integers (1-10). The objects will consist of the following:</p>
  
  <pre><code>object[i].user
           .n     # n = i
           .name
           .coords
           .hero
  </code></pre>
  
  <p>(param1, param2, param3) will be different for each object.n and object.user, so I'm trying to use an assignment method that doesn't look like garbage after writing 90 unique strings. Nesting an example I found didn't work, so here's the compromise:</p>
  
  <pre><code>class CityBean:
      def __init__(self,name,coords,hero):
          self.name = name
          self.coords = coords
          self.hero = hero
  
  class Castles:
      def __init__(self,user,n):
          self.user = user
          self.n = n
          if self.user == 'user1':
              temp = {
                  1:  CityBean( "name1"  , "coord1" , "hero1"),
                  ... blah blah blah
                  10: CityBean( "name10" , "coord10" , "hero10" )}[self.n]()
          if self.user == 'user2':
              temp = {
                  1:  CityBean( "name11" , "coord11" , "hero11" ),
                  ... blah blah blah
                  10: CityBean( "name20" , "coord20" , "hero20" ) }[self.n]()
          if self.user == 'user3':
              temp = {
                  1:  CityBean( "name21" , "coord21" , "hero21" ),
                  ... blah blah blah
                  10: CityBean( "name30" , "coord30" , "hero30" ) }[self.n]()
          self.name = temp.name
          self.coords = temp.coords
          self.hero = temp.coords
          __del__(temp)
  </code></pre>
  
  <p>I call it with something like this:</p>
  
  <pre><code>cities = list( Castles("user2",i) for i in range(1,11) )
  </code></pre>
  
  <p>It gives me this error:</p>
  
  <pre><code>AttributeError: CityBean instance has no __call__ method
  </code></pre>
  
  <p>And it blames this line:</p>
  
  <pre><code>                10: CityBean( "name20" , "coord20" , "hero20" ) }[self.n]() # pseudo
                  10: CityBean( "" , "" , "" ) }[self.n]() # what is actually looks like
  </code></pre>
  
  <p>What's wrong with my cruddy classes? I'm doing something retarded, aren't I?</p>