title: TypeError: object is not callable
body: <p>I have some functions that process the parameter, like :</p>
  
  <pre><code>def createDataModel(objectModel):
      ......
  def createLayoutModel(objectModel):
      ......
  def createWidgetModel(objectModel):
      ......
  </code></pre>
  
  <p>I have some xml as input files, with a specific root tag name, like ( dataModel, layout, page) then I convert them to a object model. I have a map that determines which function should process the object model</p>
  
  <pre><code>xsdPathsMap = {
      "dataModel": createDataModelFromXml,
      "layout": createLayoutModel,
      "page": createWidgetModelFromXml
  }
  </code></pre>
  
  <p>Then I create object models from xml and assign them the function that should process them,</p>
  
  <pre><code>result = xsdPathsMap[xmlRootName]
  # a is objectified xml
  a.modelerFunction = result
  </code></pre>
  
  <p>when I want to pass the object to its closure method I got this exception:</p>
  
  <pre><code>a.modelerFunction(a)
  
  TypeError: object is not callable    
  </code></pre>
  
  <p>what is the problem?</p>
  
  <p>and this is my Traceback :</p>
  
  <pre><code>Traceback (most recent call last):
    File "model/xmlTranporter.py", line 204, in &lt;module&gt;
      a = main("main/schema")
    File "model/xmlTranporter.py", line 200, in main
      a(obj)
  TypeError: 'lxml.objectify.StringElement' object is not callable
  </code></pre>