News for hackers. Stuff that matters.
Re:Escape from Callback Hell: Callbacks are the modern goto by zenbot on Saturday November 03, 2012 @10:11AM (#4736631)
This is possible in Twisted, using inline callbacks:

  try:
      data = doManyFancyThingsWith(yield asyncResult())
      print 'Parsed data:', data
  except:
      print 'Oh no, something went wrong!'
I find that I use inline callbacks for the common case and work with deferreds directly only when it makes more sense to handle callbacks explicitly.

There are no comments on this comment yet.