title: Pubnub History Api
body: <p>I am trying to extract the message from my pubnub history, where I wish to compare any change of messages. For the same I am calling pubnub.history in my main callback function (used by pubnub.subscribe) - </p>
  
  <p>pubnub.history(channel=channel, count = 1, callback =_callback,error=_error)</p>
  
  <p>and I define my _callback as:</p>
  
  <pre><code>def _callback(message):
      _type = message[0]
      _type_ = _type[0]
      prevMess = _type_['command']
  
      if prevMess == "..":
          flag = 1
  
      elif prevMess == "...":
          flag = 4
  
      elif prevMess == "....":
          flag = 7
  
      print flag
  </code></pre>
  
  <p>How can I successfully 'return' the flag value from the _callback() to my callback()? Or in that case return "prevMess" value from _callback() to callback()?</p>