2012-07-05

At Europython I learned...

Today I learned something magical that has transformed all my twisted
program examples:

from __future__ import print_function

Whee! This means that you can quickly and easily do
d.addCallback(print) without any pain. You can even do
d.addCallback(print, 'somedata', 1, 'etc').

>>> d = defer.succeed(None)
>>> d.addCallback(print, 'somedata', 1, 'etc')
None somedata 1 etc


Huzzah!