Is `elif callable(o):` inappropriate here? If not, then I recommend it.