title: How can I create chain of callbacks in python?
body: <p>In javascript I can do following:</p>
  
  <pre><code>var some = 100;
  
  var param1 = 1;
  func1(param1, function(res1) {
  
      var param2 = res1 + some;
      func2(param2, function(res2) {
          // ...
      });
  });
  </code></pre>
  
  <p>In php same:</p>
  
  <pre><code>$some = 100;
  
  $param1 = 1;
  func1($param1, function($res1) use ($some) {
  
      $param2 = $res1 + $some;
      func2($param2, function($res2) {
          // ...
      });
  });
  </code></pre>
  
  <p>How can I do same thing in python?</p>
  
  <p>................................................</p>