Bring back 'callable' which is supported again since 3.2

This reduces the difference between the Python 2 and 3 codebases, but
requires at least Python 3.2 for the Python 3 version.
Simplify dict-generator expressions

During 2 to 3 conversion, the [] braces were replaced by () to turn the
list-expressions into generator expressions. This is not required if the
statement is the sole argument to a callable.