Permit any callable, not just a function, for format

For instance, a class that implements a `__call__` method is also fine.